Skip to content

Instantly share code, notes, and snippets.

@callingmybluff
Created February 21, 2019 14:09
Show Gist options
  • Save callingmybluff/d97c8aa2a9458f5e5b3034c5f6593f53 to your computer and use it in GitHub Desktop.
Save callingmybluff/d97c8aa2a9458f5e5b3034c5f6593f53 to your computer and use it in GitHub Desktop.
A minimal example of using Express
void main() {
runApp(
Express(
router: ExpressRouter(
routes: {
'/': ExpressRoute(
build: (BuildContext context) => FirstPage(),
actions: {
'next': '/secondPage',
},
),
'/secondPage': ExpressRoute(
build: (BuildContext context) => SecondPage(),
actions: {
'back': '/',
}
)
},
),
app: MaterialApp(
home: FirstPage(),
),
).render()
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment