Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FirstMain extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body:TabviewWidget(),
- drawer: Drawer(
- child: ListView(
- children: <Widget>[
- ListTile(
- title: Text('Item 2'),
- onTap: () {
- Navigator.push(
- context,
- MaterialPageRoute(builder: (context) => SecondRoute()),
- );
- },
- ),
- ],
- ),
- ),
- );
- }
- }
- class SecondRoute extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: Text("Second Route"),
- ),
- body: Center(
- child: RaisedButton(
- onPressed: () {
- Navigator.pop(context);
- },
- child: Text('Go back!'),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement