mirror of
				https://github.com/flame-engine/flame.git
				synced 2025-11-01 01:18:38 +08:00 
			
		
		
		
	docs: Fix non-web examples (#2411)
Fix build for non-web platforms, by hiding dart:html into platform-specific import.
This commit is contained in:
		| @ -1,5 +1,6 @@ | ||||
| import 'dart:html'; | ||||
| import 'package:dashbook/dashbook.dart'; | ||||
| import 'package:examples/platform/stub_provider.dart' | ||||
|     if (dart.library.html) 'platform/web_provider.dart'; | ||||
| import 'package:examples/stories/animations/animations.dart'; | ||||
| import 'package:examples/stories/bridge_libraries/audio/audio.dart'; | ||||
| import 'package:examples/stories/bridge_libraries/flame_isolate/isolate.dart'; | ||||
| @ -29,10 +30,7 @@ import 'package:flame/game.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
|  | ||||
| void main() { | ||||
|   var page = window.location.search ?? ''; | ||||
|   if (page.startsWith('?')) { | ||||
|     page = page.substring(1); | ||||
|   } | ||||
|   final page = PageProviderImpl().getPage(); | ||||
|  | ||||
|   final routes = <String, FlameGame Function()>{ | ||||
|     'constant_volume_joint': ConstantVolumeJointExample.new, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Eugene Kleshnin
					Eugene Kleshnin