rustdesk/flutter/lib/web/common.dart
fufesou 4b4fd94f3e
feat: web v2 keyboard (#9175)
Signed-off-by: fufesou <linlong1266@gmail.com>
2024-08-26 12:13:11 +08:00

21 lines
583 B
Dart

import 'dart:js' as js;
import 'dart:html' as html;
final isAndroid_ = false;
final isIOS_ = false;
final isWindows_ = false;
final isMacOS_ = false;
final isLinux_ = false;
final isWeb_ = true;
final isWebDesktop_ = !js.context.callMethod('isMobile');
final isDesktop_ = false;
String get screenInfo_ => js.context.callMethod('getByName', ['screen_info']);
final _userAgent = html.window.navigator.userAgent.toLowerCase();
final isWebOnWindows_ = _userAgent.contains('win');
final isWebOnLinux_ = _userAgent.contains('linux');
final isWebOnMacOS_ = _userAgent.contains('mac');