Afroz Shaikh
Afroz Shaikh

Reputation: 1

I can't add a flare splash screen to y app

Here's my code

When i try to run the code i get the error

error: The argument type 'HomePage Function(dynamic)' can't be assigned to the parameter type 'Widget'. (argument_type_not_assignable at [ttt] lib\main.dart:37)

Here' the full code

return
  MaterialApp(

 home: SplashScreen.navigate(
 name: 'tic.flr',
 next: (context) => HomePage(),
 until: () => Future.delayed(Duration(seconds: 5)),
 startAnimation: '1',
 ),
 );

Upvotes: 0

Views: 98

Answers (1)

MickaelHrndz
MickaelHrndz

Reputation: 3832

Did you try to only pass the widget ? So :

next: HomePage(),

Upvotes: 1

Related Questions