Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'dart:async';
import 'dart:html' as html show window, Navigator;
import 'package:web/web.dart' as html show window, Navigator;

import 'package:device_info_plus_platform_interface/device_info_plus_platform_interface.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
Expand Down Expand Up @@ -44,3 +44,10 @@ class DeviceInfoPlusWebPlugin extends DeviceInfoPlatform {
);
}
}

/// Property is missing.
/// Ticket: https://github.com/dart-lang/web/issues/192
/// Probably won't be an int? in the future!
extension on html.Navigator {
external int? get deviceMemory;
}
3 changes: 2 additions & 1 deletion packages/device_info_plus/device_info_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
meta: ^1.8.0
web: '>=0.5.0 <=0.6.0'

# win32 is compatible across v4 and v5 for Win32 only (not COM)
win32: ">=4.0.0 <6.0.0"
Expand All @@ -46,5 +47,5 @@ dev_dependencies:
test: ^1.22.0

environment:
sdk: ">=2.18.0 <4.0.0"
sdk: ">=3.3.0 <4.0.0"
flutter: ">=3.3.0"