Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: sky/sdk/example/demo_launcher/lib/main.dart

Issue 1230053005: We can't use block when we have constrained space anymore. Use Flex instead. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/mojo/activity.dart' as activity; 5 import 'package:sky/mojo/activity.dart' as activity;
6 import 'package:sky/mojo/asset_bundle.dart'; 6 import 'package:sky/mojo/asset_bundle.dart';
7 import 'package:sky/painting/box_painter.dart'; 7 import 'package:sky/painting/box_painter.dart';
8 import 'package:sky/theme/colors.dart' as colors; 8 import 'package:sky/theme/colors.dart' as colors;
9 import 'package:sky/theme/typography.dart' as typography; 9 import 'package:sky/theme/typography.dart' as typography;
10 import 'package:sky/widgets/basic.dart'; 10 import 'package:sky/widgets/basic.dart';
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 child: new Card( 139 child: new Card(
140 child: new Flex([ 140 child: new Flex([
141 new Flexible( 141 new Flexible(
142 child: new Stack([ 142 child: new Stack([
143 new Container( 143 new Container(
144 decoration: demo.decoration, 144 decoration: demo.decoration,
145 child: new Container() 145 child: new Container()
146 ), 146 ),
147 new Container( 147 new Container(
148 margin: const EdgeDims.all(24.0), 148 margin: const EdgeDims.all(24.0),
149 child: new Block([ 149 child: new Flex([
150 new Text(demo.name, style: demo.textTheme.title), 150 new Text(demo.name, style: demo.textTheme.title),
151 new Text(demo.description, style: demo.textTheme.subhead) 151 new Flexible(
152 ]) 152 child: new Text(demo.description, style: demo.textTheme. subhead)
153 )
154 ],
155 direction: FlexDirection.vertical,
156 alignItems: FlexAlignItems.start)
153 ) 157 )
154 ]) 158 ])
155 ), 159 ),
156 ], direction: FlexDirection.vertical) 160 ], direction: FlexDirection.vertical)
157 ) 161 )
158 ) 162 )
159 ); 163 );
160 } 164 }
161 165
162 Widget build() { 166 Widget build() {
(...skipping 23 matching lines...) Expand all
186 ) 190 )
187 ) 191 )
188 ) 192 )
189 ); 193 );
190 } 194 }
191 } 195 }
192 196
193 void main() { 197 void main() {
194 runApp(new SkyHome()); 198 runApp(new SkyHome());
195 } 199 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698