deprecation fix
This commit is contained in:
1 parent
4975b5366e
commit
53d073d8f2
4 files changed
+5
-5
No files matched your search
@@ -1,2 +1,2 @@
|
||||
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 'dart:html' as html;
|
||||
import 'package:web/web.dart' as web;
|
||||
|
||||
class BrowserDetection {
|
||||
static bool get isChrome {
|
||||
final userAgent = html.window.navigator.userAgent.toLowerCase();
|
||||
final userAgent = web.window.navigator.userAgent.toLowerCase();
|
||||
final isChrome = userAgent.contains('chrome');
|
||||
return isChrome;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user