2024-03-28 11:38:11 +08:00
|
|
|
import 'dart:js' as js;
|
2024-08-26 12:13:11 +08:00
|
|
|
import 'dart:html' as html;
|
2024-03-22 13:16:37 +08:00
|
|
|
|
|
|
|
final isAndroid_ = false;
|
|
|
|
final isIOS_ = false;
|
|
|
|
final isWindows_ = false;
|
|
|
|
final isMacOS_ = false;
|
|
|
|
final isLinux_ = false;
|
|
|
|
final isWeb_ = true;
|
2024-03-28 11:38:11 +08:00
|
|
|
final isWebDesktop_ = !js.context.callMethod('isMobile');
|
2024-03-22 13:16:37 +08:00
|
|
|
|
|
|
|
final isDesktop_ = false;
|
2024-03-28 11:38:11 +08:00
|
|
|
|
|
|
|
String get screenInfo_ => js.context.callMethod('getByName', ['screen_info']);
|
2024-08-26 12:13:11 +08:00
|
|
|
|
|
|
|
final _userAgent = html.window.navigator.userAgent.toLowerCase();
|
|
|
|
|
|
|
|
final isWebOnWindows_ = _userAgent.contains('win');
|
|
|
|
final isWebOnLinux_ = _userAgent.contains('linux');
|
|
|
|
final isWebOnMacOS_ = _userAgent.contains('mac');
|