| 
									
										
										
										
											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-09-23 16:58:21 +08:00
										 |  |  | // cycle imports, maybe we can improve this
 | 
					
						
							|  |  |  | import 'package:flutter_hbb/consts.dart'; | 
					
						
							| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-23 16:58:21 +08:00
										 |  |  | final _localOs = js.context.callMethod('getByName', ['local_os', '']); | 
					
						
							|  |  |  | final isWebOnWindows_ = _localOs == kPeerPlatformWindows; | 
					
						
							|  |  |  | final isWebOnLinux_ = _localOs == kPeerPlatformLinux; | 
					
						
							|  |  |  | final isWebOnMacOS_ = _localOs == kPeerPlatformMacOS; |