File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed
Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 11import 'package:flutter/material.dart' ;
22import 'package:world_time_app/pages/home.dart' ;
3+ import 'package:world_time_app/pages/loading.dart' ;
4+ import 'package:world_time_app/pages/choose_location.dart' ;
35
46void main () => runApp (MaterialApp (
5- home: Home (),
7+ initialRoute: '/home' ,
8+ routes: {
9+ '/' : (context) => Loading (),
10+ '/home' : (context) => Home (),
11+ '/location' : (context) => ChooseLocation (),
12+ }
613));
714
Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ class ChooseLocation extends StatefulWidget {
88class _ChooseLocationState extends State <ChooseLocation > {
99 @override
1010 Widget build (BuildContext context) {
11- return Container ();
11+ return Scaffold (
12+ backgroundColor: Colors .grey[200 ],
13+ appBar: AppBar (
14+ backgroundColor: Colors .blue[900 ],
15+ title: Text ('Choose a Location' ),
16+ centerTitle: true ,
17+ elevation: 0 ,
18+ ),
19+ );
1220 }
1321}
Original file line number Diff line number Diff line change @@ -10,7 +10,19 @@ class _HomeState extends State<Home> {
1010 Widget build (BuildContext context) {
1111 return Scaffold (
1212 body: SafeArea (
13- child: Text ('home screen' ),
13+ child: Column (
14+ children: < Widget > [
15+ FlatButton .icon (
16+ onPressed: () {
17+ Navigator .pushNamed (context, '/location' );
18+ },
19+ icon: Icon (Icons .edit_location),
20+ label: Text (
21+ 'Edit Location'
22+ )
23+ )
24+ ],
25+ ),
1426 ),
1527 );
1628 }
You can’t perform that action at this time.
0 commit comments