Created
February 21, 2019 14:09
-
-
Save callingmybluff/d97c8aa2a9458f5e5b3034c5f6593f53 to your computer and use it in GitHub Desktop.
A minimal example of using Express
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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