Replies: 1 comment 1 reply
-
|
Show me your SAppRoutes.pages |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
iam using named route. this is my app() but in this when i give a wrong or invalid url , it wont fallback to unknownRoute
class App extends StatelessWidget {
const App({super.key});
@OverRide
Widget build(BuildContext context) {
return GetMaterialApp(
builder: (context, child) {
ErrorWidget.builder = (FlutterErrorDetails errorDetails) {
return CustomErrorWidget(errorDetails: errorDetails);
};
return child ?? const SizedBox.shrink();
},
title: STexts.appName,
themeMode: ThemeMode.light,
defaultTransition: Transition.noTransition,
theme: TAppTheme.lightTheme,
darkTheme: TAppTheme.darkTheme,
debugShowCheckedModeBanner: false,
getPages: SAppRoutes.pages,
initialRoute: SRoutes.dashboard,
unknownRoute: GetPage(
name: '/not-found',
page: () => const Scaffold(
backgroundColor: TColors.error,
body: Center(
child: Text('404 not found'),
),
),
),
initialBinding: GeneralBindings(),
);
}
}
Beta Was this translation helpful? Give feedback.
All reactions