From c00dae0b979ce72ec810eaa2c035b94c01e723cb Mon Sep 17 00:00:00 2001 From: Shawn Date: Tue, 13 Feb 2024 11:37:06 -0700 Subject: [PATCH] Update flutter_animate version --- lib/ui/common/collectible_item.dart | 4 +-- .../collectible_found_screen.dart | 9 ++++--- .../widgets/_circular_title_bar.dart | 6 ++--- lib/ui/screens/home_menu/home_menu.dart | 2 +- pubspec.lock | 26 ++++++++++++------- pubspec.yaml | 2 +- 6 files changed, 29 insertions(+), 20 deletions(-) diff --git a/lib/ui/common/collectible_item.dart b/lib/ui/common/collectible_item.dart index 8e3b7e88..3aa7d7eb 100644 --- a/lib/ui/common/collectible_item.dart +++ b/lib/ui/common/collectible_item.dart @@ -56,9 +56,9 @@ class CollectibleItem extends StatelessWidget with GetItMixin { .animate(onPlay: (controller) => controller.repeat()) .shimmer(delay: 4000.ms, duration: $styles.times.med * 3) .shake(curve: Curves.easeInOutCubic, hz: 4) - .scale(begin: 1.0, end: 1.1, duration: $styles.times.med) + .scale(begin: Offset(1.0, 1.0), end: Offset(1.1, 1.1), duration: $styles.times.med) .then(delay: $styles.times.med) - .scale(begin: 1.0, end: 1 / 1.1), + .scale(begin: Offset(1.0, 1.0), end: Offset(1 / 1.1, 1 / 1.1)), ), ), ), diff --git a/lib/ui/screens/collectible_found/collectible_found_screen.dart b/lib/ui/screens/collectible_found/collectible_found_screen.dart index 57d6a1ae..7b4332ee 100644 --- a/lib/ui/screens/collectible_found/collectible_found_screen.dart +++ b/lib/ui/screens/collectible_found/collectible_found_screen.dart @@ -44,7 +44,10 @@ class CollectibleFoundScreen extends StatelessWidget { fit: BoxFit.contain, ), ), - ).animate().scale(begin: 1.5, end: 3, curve: Curves.easeInExpo, delay: t, duration: t * 3).fadeOut(), + ) + .animate() + .scale(begin: Offset(1.5, 1.5), end: Offset(3, 3), curve: Curves.easeInExpo, delay: t, duration: t * 3) + .fadeOut(), ) ]); } @@ -140,14 +143,14 @@ class CollectibleFoundScreen extends StatelessWidget { child: child, ), ) - .scale(begin: 0.3, duration: t * 2, curve: Curves.easeOutExpo, alignment: Alignment(0, 0.7)); + .scale(begin: Offset(0.3, 0.3), duration: t * 2, curve: Curves.easeOutExpo, alignment: Alignment(0, 0.7)); } Widget _buildRibbon(BuildContext context) { Duration t = $styles.times.fast; return _AnimatedRibbon($strings.collectibleFoundTitleArtifactDiscovered.toUpperCase()) .animate() - .scale(begin: 0.3, duration: t * 2, curve: Curves.easeOutExpo, alignment: Alignment(0, -1)); + .scale(begin: Offset(0.3, 0.3), duration: t * 2, curve: Curves.easeOutExpo, alignment: Alignment(0, -1)); } Widget _buildTitle(BuildContext context, String text, TextStyle style, Color color, Duration delay) { diff --git a/lib/ui/screens/editorial/widgets/_circular_title_bar.dart b/lib/ui/screens/editorial/widgets/_circular_title_bar.dart index f4c3ac5e..d5156509 100644 --- a/lib/ui/screens/editorial/widgets/_circular_title_bar.dart +++ b/lib/ui/screens/editorial/widgets/_circular_title_bar.dart @@ -35,10 +35,8 @@ class _CircularTitleBar extends StatelessWidget { BottomCenter( child: Padding( padding: EdgeInsets.only(bottom: 20), - child: Image.asset('${ImagePaths.common}/${icons[index]}') - .animate(key: ValueKey(index)) - .fade() - .scale(begin: .5, end: 1, curve: Curves.easeOutBack, duration: $styles.times.med), + child: Image.asset('${ImagePaths.common}/${icons[index]}').animate(key: ValueKey(index)).fade().scale( + begin: Offset(.5, .5), end: Offset(1, 1), curve: Curves.easeOutBack, duration: $styles.times.med), ), ), ], diff --git a/lib/ui/screens/home_menu/home_menu.dart b/lib/ui/screens/home_menu/home_menu.dart index bccca5d2..ce794dad 100644 --- a/lib/ui/screens/home_menu/home_menu.dart +++ b/lib/ui/screens/home_menu/home_menu.dart @@ -70,7 +70,7 @@ class _HomeMenuState extends State { _buildIconGrid(context) .animate() .fade(duration: $styles.times.fast) - .scale(begin: .8, curve: Curves.easeOut), + .scale(begin: Offset(.8, .8), curve: Curves.easeOut), Gap($styles.insets.lg), _buildBottomBtns(context), //Spacer(), diff --git a/pubspec.lock b/pubspec.lock index e843490a..bdd05617 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -178,10 +178,10 @@ packages: dependency: "direct main" description: name: flutter_animate - sha256: "1f6fdee1f63eda3c35e04c07664593c31b7fdae290b6b0dc513d2fdfb2d27c76" + sha256: "7c8a6594a9252dad30cc2ef16e33270b6248c4dedc3b3d06c86c4f3f4dc05ae5" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "4.5.0" flutter_circular_text: dependency: "direct main" description: @@ -227,6 +227,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.17" + flutter_shaders: + dependency: transitive + description: + name: flutter_shaders + sha256: "02750b545c01ff4d8e9bbe8f27a7731aa3778402506c67daa1de7f5fc3f4befe" + url: "https://pub.dev" + source: hosted + version: "0.1.2" flutter_staggered_grid_view: dependency: "direct main" description: @@ -476,18 +484,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.5.0" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.10.0" nested: dependency: transitive description: @@ -532,10 +540,10 @@ packages: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.8.3" path_parsing: dependency: transitive description: @@ -998,5 +1006,5 @@ packages: source: hosted version: "2.0.2" sdks: - dart: ">=3.3.0-0 <4.0.0" + dart: ">=3.2.3 <4.0.0" flutter: ">=3.16.6" diff --git a/pubspec.yaml b/pubspec.yaml index 60377eb3..70e40dd4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: equatable: ^2.0.5 extra_alignments: ^1.0.0+1 flextras: ^1.0.0 - flutter_animate: ^1.0.0 + flutter_animate: ^4.5.0 flutter_circular_text: ^0.3.1 flutter_displaymode: ^0.6.0 flutter_native_splash: ^2.3.3