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