From 1a449b929a67528fbcc624ad51a341d0e75e2713 Mon Sep 17 00:00:00 2001 From: Erick Date: Fri, 26 Jul 2024 13:29:54 -0300 Subject: [PATCH] chore: update to latest flame (#44) * chore: update to latest flame * fix --- .../lib/services/storage/desktop.dart | 4 +- .../lib/services/storage/web.dart | 2 +- .../lib/widgets/simple_animation_widget.dart | 2 +- fire_atlas_editor/pubspec.lock | 40 ++++++------------- fire_atlas_editor/pubspec.yaml | 4 +- 5 files changed, 18 insertions(+), 34 deletions(-) diff --git a/fire_atlas_editor/lib/services/storage/desktop.dart b/fire_atlas_editor/lib/services/storage/desktop.dart index 3548bac..9c070e5 100644 --- a/fire_atlas_editor/lib/services/storage/desktop.dart +++ b/fire_atlas_editor/lib/services/storage/desktop.dart @@ -12,7 +12,7 @@ class FireAtlasStorage extends FireAtlasStorageApi { Future loadProject(String path) async { final file = File(path); final raw = await file.readAsBytes(); - final atlas = FireAtlas.deserialize(raw); + final atlas = FireAtlas.deserializeBytes(raw); return LoadedProjectEntry(path, atlas); } @@ -57,7 +57,7 @@ class FireAtlasStorage extends FireAtlasStorageApi { const typeGroup = XTypeGroup(label: 'fire atlas', extensions: ['fa']); final file = await _selectDialog(typeGroup); final bytes = await file.readAsBytes(); - final atlas = FireAtlas.deserialize(bytes); + final atlas = FireAtlas.deserializeBytes(bytes); return LoadedProjectEntry(file.path, atlas); } diff --git a/fire_atlas_editor/lib/services/storage/web.dart b/fire_atlas_editor/lib/services/storage/web.dart index 910f390..710fa8b 100644 --- a/fire_atlas_editor/lib/services/storage/web.dart +++ b/fire_atlas_editor/lib/services/storage/web.dart @@ -121,6 +121,6 @@ class FireAtlasStorage extends FireAtlasStorageApi { FireAtlas _readBase64Project(String base64) { final jsonRaw = base64Decode(base64); - return FireAtlas.deserialize(jsonRaw); + return FireAtlas.deserializeBytes(jsonRaw); } } diff --git a/fire_atlas_editor/lib/widgets/simple_animation_widget.dart b/fire_atlas_editor/lib/widgets/simple_animation_widget.dart index c40009a..e4ba312 100644 --- a/fire_atlas_editor/lib/widgets/simple_animation_widget.dart +++ b/fire_atlas_editor/lib/widgets/simple_animation_widget.dart @@ -55,7 +55,7 @@ class _AnimationPlayerWidget extends State @override void initState() { super.initState(); - _ticker = widget.animation.ticker(); + _ticker = widget.animation.createTicker(); _controller = AnimationController(vsync: this) ..addListener(() { diff --git a/fire_atlas_editor/pubspec.lock b/fire_atlas_editor/pubspec.lock index 2806747..b79c338 100644 --- a/fire_atlas_editor/pubspec.lock +++ b/fire_atlas_editor/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: archive - sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.3.7" + version: "3.6.1" async: dependency: transitive description: @@ -49,14 +49,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" cross_file: dependency: transitive description: @@ -69,10 +61,10 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" cupertino_icons: dependency: "direct main" description: @@ -173,18 +165,18 @@ packages: dependency: "direct main" description: name: flame - sha256: "6954277d14731fa497a7a878bb34cf01c090b20e3ffe5c6e093a7c1f823bfac5" + sha256: "79133dc46a3ff870950f41d0dc1598414e7bd7ae2c29bd9f0a9de208d9a70cb7" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.18.0" flame_fire_atlas: dependency: "direct main" description: name: flame_fire_atlas - sha256: "072cc15ee4be55e2363c71f66252b11b7ae4e8e2bf3c2f9e75fbef0de4c794bb" + sha256: f86a40c40abd5abbf609ce3c8af4a68ff8270cc1f7238d44541551ebd6366d74 url: "https://pub.dev" source: hosted - version: "1.3.6" + version: "1.5.2" flame_lint: dependency: "direct main" description: @@ -284,10 +276,10 @@ packages: dependency: transitive description: name: ordered_set - sha256: "3fedcc9121b3ba24c0a84f32da2989c42e36c159b73feadbc2f402dc55966b81" + sha256: "1bfaaaee0419e43ecc9eaebd410eb4bd5039657b72011de75ff3e2915c9aac60" url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "5.0.3" path: dependency: transitive description: @@ -336,14 +328,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.3" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 - url: "https://pub.dev" - source: hosted - version: "3.6.2" process: dependency: transitive description: @@ -574,5 +558,5 @@ packages: source: hosted version: "0.2.0+3" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/fire_atlas_editor/pubspec.yaml b/fire_atlas_editor/pubspec.yaml index c3b9097..d0765b2 100644 --- a/fire_atlas_editor/pubspec.yaml +++ b/fire_atlas_editor/pubspec.yaml @@ -15,8 +15,8 @@ dependencies: file_selector_linux: ^0.9.1 file_selector_macos: ^0.9.0+4 file_selector_windows: ^0.9.1+4 - flame: ^1.8.0 - flame_fire_atlas: ^1.3.6 + flame: ^1.18.0 + flame_fire_atlas: ^1.5.2 flame_lint: ^1.0.0 flutter: sdk: flutter