Skip to content

Commit

Permalink
migrate device_info_plus to package:web
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran committed Feb 29, 2024
1 parent fbc8e61 commit f854044
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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 @@ -28,7 +28,9 @@ class DeviceInfoPlusWebPlugin extends DeviceInfoPlatform {
'appCodeName': _navigator.appCodeName,
'appName': _navigator.appName,
'appVersion': _navigator.appVersion,
'deviceMemory': _navigator.deviceMemory,
// property is missing.
// ticket: https://github.com/dart-lang/web/issues/192
// 'deviceMemory': _navigator.deviceMemory,
'language': _navigator.language,
'languages': _navigator.languages,
'platform': _navigator.platform,
Expand Down
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.3.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.2.0 <4.0.0"
flutter: ">=3.3.0"

0 comments on commit f854044

Please sign in to comment.