Skip to content

Commit

Permalink
fix analyze issues (#2177)
Browse files Browse the repository at this point in the history
  • Loading branch information
buenaflor authored Jul 17, 2024
1 parent 8ad0478 commit 62ae1b3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class WebEnricherEventProcessor implements EnricherEventProcessor {

int? _getMemorySize() {
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory
// ignore: invalid_null_aware_operator
final size = _window.navigator.deviceMemory?.toDouble();
final memoryByteSize = size != null ? size * 1024 * 1024 * 1024 : null;
return memoryByteSize?.toInt();
Expand Down Expand Up @@ -102,5 +103,6 @@ class WebEnricherEventProcessor implements EnricherEventProcessor {
}

extension on web.Navigator {
// ignore: unused_element
external double? get deviceMemory;
}

0 comments on commit 62ae1b3

Please sign in to comment.