| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 import 'package:sky/painting/text_style.dart'; | 5 import 'package:sky/painting/text_style.dart'; |
| 6 import 'package:sky/widgets/basic.dart'; | 6 import 'package:sky/widgets/basic.dart'; |
| 7 import 'package:sky/widgets/drawer.dart'; | 7 import 'package:sky/widgets/drawer.dart'; |
| 8 import 'package:sky/widgets/drawer_divider.dart'; | 8 import 'package:sky/widgets/drawer_divider.dart'; |
| 9 import 'package:sky/widgets/drawer_header.dart'; | 9 import 'package:sky/widgets/drawer_header.dart'; |
| 10 import 'package:sky/widgets/drawer_item.dart'; | 10 import 'package:sky/widgets/drawer_item.dart'; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 DrawerStatus _drawerStatus = DrawerStatus.inactive; | 87 DrawerStatus _drawerStatus = DrawerStatus.inactive; |
| 88 | 88 |
| 89 void _handleOpenDrawer() { | 89 void _handleOpenDrawer() { |
| 90 setState(() { | 90 setState(() { |
| 91 _drawerShowing = true; | 91 _drawerShowing = true; |
| 92 _drawerStatus = DrawerStatus.active; | 92 _drawerStatus = DrawerStatus.active; |
| 93 }); | 93 }); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void _handleDrawerStatusChange(DrawerStatus status) { | 96 void _handleDrawerStatusChange(DrawerStatus status) { |
| 97 if (status == DrawerStatus.inactive && navigator.currentRoute.name == "/draw
er") { | |
| 98 navigator.pop(); | |
| 99 } | |
| 100 setState(() { | 97 setState(() { |
| 101 _drawerStatus = status; | 98 _drawerStatus = status; |
| 102 }); | 99 }); |
| 103 } | 100 } |
| 104 | 101 |
| 105 void _handleShowSettings() { | 102 void _handleShowSettings() { |
| 106 navigator.pop(); | 103 navigator.pop(); |
| 107 navigator.pushNamed('/settings'); | 104 navigator.pushNamed('/settings'); |
| 108 } | 105 } |
| 109 | 106 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 Widget build() { | 196 Widget build() { |
| 200 return new Scaffold( | 197 return new Scaffold( |
| 201 toolbar: buildToolBar(), | 198 toolbar: buildToolBar(), |
| 202 body: buildBody(), | 199 body: buildBody(), |
| 203 snackBar: buildSnackBar(), | 200 snackBar: buildSnackBar(), |
| 204 floatingActionButton: buildFloatingActionButton(), | 201 floatingActionButton: buildFloatingActionButton(), |
| 205 drawer: buildDrawer() | 202 drawer: buildDrawer() |
| 206 ); | 203 ); |
| 207 } | 204 } |
| 208 } | 205 } |
| OLD | NEW |