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

Side by Side Diff: sky/home.dart

Issue 1209233002: Let's hide double.INFINITY a bit more, by providing cleaner APIs for the cases where we're currentl… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « sky/examples/widgets/styled_text.dart ('k') | sky/sdk/lib/rendering/block.dart » ('j') | 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 'dart:sky'; 5 import 'dart:sky';
6 6
7 import 'package:mojom/intents/intents.mojom.dart'; 7 import 'package:mojom/intents/intents.mojom.dart';
8 import 'package:sky/framework/shell.dart' as shell; 8 import 'package:sky/framework/shell.dart' as shell;
9 import 'package:sky/theme/colors.dart' as colors; 9 import 'package:sky/theme/colors.dart' as colors;
10 import 'package:sky/theme/edges.dart'; 10 import 'package:sky/theme/edges.dart';
(...skipping 21 matching lines...) Expand all
32 String href; 32 String href;
33 33
34 SkyDemo(String text, this.href) : this.text = text, super(key: text); 34 SkyDemo(String text, this.href) : this.text = text, super(key: text);
35 35
36 void _handlePress() { 36 void _handlePress() {
37 launch(href); 37 launch(href);
38 } 38 }
39 39
40 Widget build() { 40 Widget build() {
41 return new ConstrainedBox( 41 return new ConstrainedBox(
42 // TOOD(ianh): Fix so we don't need INFINITY here. 42 constraints: const BoxConstraints.expandWidth(),
43 constraints: new BoxConstraints.tightFor(width: double.INFINITY),
44 child: new RaisedButton( 43 child: new RaisedButton(
45 child: new Text(text), 44 child: new Text(text),
46 onPressed: _handlePress 45 onPressed: _handlePress
47 ) 46 )
48 ); 47 );
49 } 48 }
50 } 49 }
51 50
52 class SkyHome extends App { 51 class SkyHome extends App {
53 Widget build() { 52 Widget build() {
(...skipping 25 matching lines...) Expand all
79 justifyContent: FlexJustifyContent.spaceAround 78 justifyContent: FlexJustifyContent.spaceAround
80 ) 79 )
81 ) 80 )
82 ); 81 );
83 } 82 }
84 } 83 }
85 84
86 void main() { 85 void main() {
87 runApp(new SkyHome()); 86 runApp(new SkyHome());
88 } 87 }
OLDNEW
« no previous file with comments | « sky/examples/widgets/styled_text.dart ('k') | sky/sdk/lib/rendering/block.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698