Skip to content

Instantly share code, notes, and snippets.

@yaizudamashii
Created March 22, 2021 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaizudamashii/267082a369778649704bcbb187722160 to your computer and use it in GitHub Desktop.
Save yaizudamashii/267082a369778649704bcbb187722160 to your computer and use it in GitHub Desktop.
return MaterialApp(
onGenerateRoute: (settings) {
if (settings.name == '/information') {
return PageRouteBuilder(
pageBuilder: (context, animation1, animation2) => InformationScreen(),
transitionDuration: Duration(seconds: 0),
);
} else if (settings.name == '/privacy') {
return PageRouteBuilder(
pageBuilder: (context, animation1, animation2) => PrivacySettings(),
transitionDuration: Duration(seconds: 0),
);
} else if (settings.name == '/qrcode') {
return PageRouteBuilder(
pageBuilder: (context, animation1, animation2) => QRCodeReader(),
transitionDuration: Duration(seconds: 0),
);
} else if (settings.name == '/auth') {
return PageRouteBuilder(
pageBuilder: (context, animation1, animation2) => AuthScreen(),
transitionDuration: Duration(seconds: 0),
);
}
return null;
},
title: 'Flutter Demo',
theme: ...,
home: ...
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment