Created
June 20, 2018 10:58
-
-
Save paulallies/7866b894bfe047dcd39ff30f7d656d8d to your computer and use it in GitHub Desktop.
tab1 of Flutter Nav
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
import 'package:flutter/material.dart'; | |
class HomeTab1 extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
// TODO: implement build | |
return Container( | |
width: double.infinity, | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
Text("Home"), | |
new Padding( | |
padding: const EdgeInsets.only(top: 16.0), | |
child: new FlatButton.icon( | |
onPressed: () { | |
Navigator.of(context).pushNamed("/detail"); | |
}, | |
color: Colors.red, | |
textColor: Colors.white, | |
icon: const Icon(Icons.navigate_next, size: 18.0), | |
label: const Text('Go To Details'), | |
), | |
), | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment