can't launch this app
Opened this issue · 1 comments
Tommypee commented
Hi afprogrammer,
you did not upload the simple_animations.dart file.
import 'package:simple_animations/simple_animations.dart';
if you can upload i will be grateful
thank you
Programmer-0-0 commented
For anyone having a problem with this in the future. Here is what you need to do:
flutter pub add simple_animations && flutter pub get
for the fade_animation file you can use my modified version which supports the new version of simple_animations package:
import 'package:flutter/material.dart';
import 'package:simple_animations/simple_animations.dart';
class FadeAnimation extends StatelessWidget {
final double delay;
final Widget child;
const FadeAnimation(this.delay, this.child, {super.key});
@override
Widget build(BuildContext context) {
final tween = MovieTween()
..scene(
begin: const Duration(milliseconds: 0),
duration: const Duration(milliseconds: 500),
).tween('opacity', Tween<double>(begin: 0.0, end: 1.0)).tween(
'translateY', Tween<double>(begin: -30.0, end: 0.0),
curve: Curves.easeOut);
return PlayAnimationBuilder<Movie>(
delay: Duration(milliseconds: (500 * delay).round()),
duration: tween.duration,
tween: tween,
builder: (context, value, child) {
return Opacity(
opacity: value.get('opacity'),
child: Transform.translate(
offset: Offset(0, value.get('translateY')),
child: child,
),
);
},
child: child,
);
}
}