Skip to content

Commit

Permalink
Update flutter_animate version
Browse files Browse the repository at this point in the history
  • Loading branch information
esDotDev committed Feb 13, 2024
1 parent 01ba5f6 commit c00dae0
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 20 deletions.
4 changes: 2 additions & 2 deletions lib/ui/common/collectible_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)
]);
}
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 2 additions & 4 deletions lib/ui/screens/editorial/widgets/_circular_title_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/screens/home_menu/home_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class _HomeMenuState extends State<HomeMenu> {
_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(),
Expand Down
26 changes: 17 additions & 9 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c00dae0

Please sign in to comment.