mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-11-08 20:50:04 +00:00
updated: using_bottom_nav_bar example, refactored code
This commit is contained in:
29
using_bottom_nav_bar/lib/tabs/second.dart
Normal file
29
using_bottom_nav_bar/lib/tabs/second.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SecondTab extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new Scaffold(
|
||||
backgroundColor: Colors.green,
|
||||
body: new Container(
|
||||
child: new Center(
|
||||
child: new Column(
|
||||
// center the children
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new Icon(
|
||||
Icons.adb,
|
||||
size: 160.0,
|
||||
color: Colors.white,
|
||||
),
|
||||
new Text(
|
||||
"Second Tab",
|
||||
style: new TextStyle(color: Colors.white),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user