-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default transition is not working #20
Comments
Hello :) Did you check the example project ? https://github.com/jaumard/flare_splash_screen/blob/master/example/lib/main.dart#L15 What do you mean by |
Yes checked it. This is not working: by default it does a fade animation but you can customize it by using transitionsBuilder |
It doesnt work |
I've tried using transitionBuilder but it didn't work either. |
I'm having the same issue as well. There is no animation (fade or my implementation of slide) that occurs when the "loading" (in this case an simulation of 10 seconds. Here's my implementation: SplashScreen.navigate(
name: 'lib/graphics/splash-screen.flr',
next: (context) => LibraryNavigator(),
transitionsBuilder: (_, animation, __, child) {
return SlideTransition(
position: Tween<Offset>(
begin: const Offset(0, -1),
end: Offset.zero,
).animate(animation),
child: child,
);
},
until: () => Future.delayed(Duration(seconds: 10)),
backgroundColor: const Color(0xFF32407b),
alignment: Alignment.center,
height: 300,
width: 300,
loopAnimation: 'loading',
endAnimation: 'done',
), |
I just get a dark screen and the app is stuck |
Check pubspec.yaml, path to your flr file or names for animations. I had problem with those. |
Hi! I have read in the documentation that the SplashScreen.navigate method has a default fade transition but for me it's not working. I have tried replacing it by transitionsBuilder but this transition it's not working either. Here is my code:
`class SplashAnimationScreen extends StatefulWidget {
@OverRide
_SplashAnimationScreenState createState() => _SplashAnimationScreenState();
}
class _SplashAnimationScreenState extends State {
bool _isLoading = true;
Widget _initialPage = HomeScreen();
@OverRide
void initState() {
_setInitialRoute();
super.initState();
}
@OverRide
Widget build(BuildContext context) {
return SplashScreen.navigate(
name: 'assets/animations/splash_animation.flr',
next: (_) => _initialPage,
isLoading: _isLoading,
startAnimation: 'StartAnimation',
backgroundColor: Styles.primaryColorDark,
transitionsBuilder: (context, animation, secondaryAnimation, child) {
var begin = Offset(0.0, 1.0);
var end = Offset.zero;
var curve = Curves.ease;
}
_setInitialRoute() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
String initialRoute = (prefs.getString('initialRoute') ?? onboardingRoute);
}
}`
¿I am doing something wrong?
Thank you in advance!
The text was updated successfully, but these errors were encountered: