You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The argument type 'AuthWrapper Function(BuildContext, Map<String, dynamic>)' can't be assigned to the parameter type 'Widget? Function(BuildContext?, Map<String, List<String>>)'.
#240
Hello i have an error with Fluro when i set handlerFunc
this is my codes:
`
class AppRouter {
static final router = FluroRouter();
var usersHandler = Handler(
handlerFunc: (BuildContext context, Map<String, dynamic> params) {
return AuthWrapper();
},
);
void defineRoutes(FluroRouter router) {
router.define("/auth", handler: usersHandler);
}
}
AuthWrapper screen:
class AuthWrapper extends StatefulWidget {const AuthWrapper({Key? key}) : super(key: key);
@OverRide
_AuthWrapperState createState() => _AuthWrapperState();
}
class _AuthWrapperState extends State {
bool loading = false;
@OverRide
Widget build(BuildContext context) {
ThemeSetting theme = Provider.of(context);
return AnnotatedRegion(
value: SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light,
statusBarColor: Colors.transparent,
systemNavigationBarIconBrightness: Brightness.light,
systemNavigationBarColor: Colors.transparent,
),
child: loading
? Scaffold(
backgroundColor: theme.primary,
body: Center(
child: LoadingWidget(),
),
)
: Scaffold(
backgroundColor: theme.primary,
bottomNavigationBar: BottomAppBar(
elevation: 0,
color: Colors.transparent,
child: TabBar(
labelColor: theme.secondary,
unselectedLabelColor: theme.secondary.withOpacity(.8),
indicatorColor: theme.secondary,
tabs: [
Tab(text: 'SignIn'),
Tab(text: 'SignUp'),
],
),
),
body: TabBarView(
children: [
SignUp(),
SignIn(),
],
),
),
);
}
}
`
The text was updated successfully, but these errors were encountered: