mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-14 22:55:12 +10:00
deprecation fix
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
export 'browser_detection_stub.dart'
|
export 'browser_detection_stub.dart'
|
||||||
if (dart.library.html) 'browser_detection_web.dart';
|
if (dart.library.js_interop) 'browser_detection_web.dart';
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
// ignore: avoid_web_libraries_in_flutter
|
import 'package:web/web.dart' as web;
|
||||||
import 'dart:html' as html;
|
|
||||||
|
|
||||||
class BrowserDetection {
|
class BrowserDetection {
|
||||||
static bool get isChrome {
|
static bool get isChrome {
|
||||||
final userAgent = html.window.navigator.userAgent.toLowerCase();
|
final userAgent = web.window.navigator.userAgent.toLowerCase();
|
||||||
final isChrome = userAgent.contains('chrome');
|
final isChrome = userAgent.contains('chrome');
|
||||||
return isChrome;
|
return isChrome;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1083,7 +1083,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
web:
|
web:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: web
|
name: web
|
||||||
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
|
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ dependencies:
|
|||||||
path_provider: ^2.1.5
|
path_provider: ^2.1.5
|
||||||
share_plus: ^12.0.1
|
share_plus: ^12.0.1
|
||||||
build_pipe: ^0.3.1
|
build_pipe: ^0.3.1
|
||||||
|
web: ^1.1.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user