From 4a7e6e9bcfe88bb26b60791f25b5e620a4fb3f1f Mon Sep 17 00:00:00 2001 From: Viktor Lidholt Date: Fri, 2 Oct 2015 15:10:02 -0700 Subject: [PATCH] Updates work with latest Flutter changes --- examples/game/pubspec.yaml | 2 -- examples/game/test_physics.dart | 31 +++++++++++-------------------- skysprites/pubspec.yaml | 2 -- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/examples/game/pubspec.yaml b/examples/game/pubspec.yaml index 07125ee96..8f12e9194 100644 --- a/examples/game/pubspec.yaml +++ b/examples/game/pubspec.yaml @@ -11,5 +11,3 @@ dependency_overrides: path: ../../sky/packages/sky skysprites: path: ../../skysprites - box2d: - path: ../../../../box2d.dart diff --git a/examples/game/test_physics.dart b/examples/game/test_physics.dart index 1ba81aa33..a7c23f9b1 100644 --- a/examples/game/test_physics.dart +++ b/examples/game/test_physics.dart @@ -16,7 +16,6 @@ final AssetBundle _bundle = _initBundle(); ImageMap _images; SpriteSheet _spriteSheet; -TestBedApp _app; main() async { _images = new ImageMap(_bundle); @@ -28,29 +27,21 @@ main() async { String json = await _bundle.loadString('assets/sprites.json'); _spriteSheet = new SpriteSheet(_images['assets/sprites.png'], json); - _app = new TestBedApp(); - runApp(_app); -} - -class TestBedApp extends App { - - Widget build() { - ThemeData theme = new ThemeData( + runApp(new App( + title: 'Test Physics', + theme: new ThemeData( brightness: ThemeBrightness.light, primarySwatch: Colors.purple - ); - - return new Theme( - data: theme, - child: new Title( - title: 'Test Physics', - child: new SpriteWidget( + ), + routes: { + '/': (navigator, route) { + return new SpriteWidget( new TestBed(), SpriteBoxTransformMode.letterbox - ) - ) - ); - } + ); + } + } + )); } class TestBed extends NodeWithSize { diff --git a/skysprites/pubspec.yaml b/skysprites/pubspec.yaml index 418a5eb9d..b2fbf5441 100644 --- a/skysprites/pubspec.yaml +++ b/skysprites/pubspec.yaml @@ -10,5 +10,3 @@ dependencies: dependency_overrides: sky: path: ../sky/packages/sky - box2d: - path: ../../../box2d.dart