Skip to content

Instantly share code, notes, and snippets.

@paulallies
Created June 20, 2018 10:58
Show Gist options
  • Save paulallies/7866b894bfe047dcd39ff30f7d656d8d to your computer and use it in GitHub Desktop.
Save paulallies/7866b894bfe047dcd39ff30f7d656d8d to your computer and use it in GitHub Desktop.
tab1 of Flutter Nav
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