| 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 'dart:math' as math; | 5 import 'dart:math' as math; |
| 6 | 6 |
| 7 import 'package:sky/rendering/box.dart'; | 7 import 'package:sky/rendering/box.dart'; |
| 8 import 'package:sky/rendering/flex.dart'; | 8 import 'package:sky/rendering/flex.dart'; |
| 9 import 'package:sky/rendering/sky_binding.dart'; | 9 import 'package:sky/rendering/sky_binding.dart'; |
| 10 import 'package:sky/theme/colors.dart' as colors; | 10 import 'package:sky/theme/colors.dart' as colors; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 }); | 72 }); |
| 73 } | 73 } |
| 74 | 74 |
| 75 Widget build() { | 75 Widget build() { |
| 76 return new Theme( | 76 return new Theme( |
| 77 data: new ThemeData.light(primary: colors.Blue, darkToolbar: true), | 77 data: new ThemeData.light(primary: colors.Blue, darkToolbar: true), |
| 78 child: new Scaffold( | 78 child: new Scaffold( |
| 79 toolbar: new ToolBar( | 79 toolbar: new ToolBar( |
| 80 center: new Text('Sector Layout in a Widget Tree')), | 80 center: new Text('Sector Layout in a Widget Tree')), |
| 81 body: new Material( | 81 body: new Material( |
| 82 color: colors.Grey[50], |
| 82 edge: MaterialEdge.canvas, | 83 edge: MaterialEdge.canvas, |
| 83 child: new Flex([ | 84 child: new Flex([ |
| 84 new Container( | 85 new Container( |
| 85 padding: new EdgeDims.symmetric(horizontal: 8.0, vertical: 25.0)
, | 86 padding: new EdgeDims.symmetric(horizontal: 8.0, vertical: 25.0)
, |
| 86 child: new Flex([ | 87 child: new Flex([ |
| 87 new RaisedButton( | 88 new RaisedButton( |
| 88 enabled: enabledAdd, | 89 enabled: enabledAdd, |
| 89 child: new ShrinkWrapWidth( | 90 child: new ShrinkWrapWidth( |
| 90 child: new Flex([ | 91 child: new Flex([ |
| 91 new Container( | 92 new Container( |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } | 137 } |
| 137 } | 138 } |
| 138 | 139 |
| 139 void main() { | 140 void main() { |
| 140 runApp(new SectorApp()); | 141 runApp(new SectorApp()); |
| 141 SkyBinding.instance.onFrame = () { | 142 SkyBinding.instance.onFrame = () { |
| 142 // uncomment this for debugging: | 143 // uncomment this for debugging: |
| 143 // SkyBinding.instance.debugDumpRenderTree(); | 144 // SkyBinding.instance.debugDumpRenderTree(); |
| 144 }; | 145 }; |
| 145 } | 146 } |
| OLD | NEW |