Skip to content

Commit b230903

Browse files
committed
lesson-14
1 parent c0c676c commit b230903

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

myapp/lib/main.dart

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,32 @@ class Home extends StatelessWidget {
1313
centerTitle: true,
1414
backgroundColor: Colors.red[600]
1515
),
16-
body: Column(
17-
mainAxisAlignment: MainAxisAlignment.center,
18-
crossAxisAlignment: CrossAxisAlignment.start,
16+
body: Row(
1917
children: <Widget>[
20-
Container(
21-
padding: EdgeInsets.all(20.0),
22-
color: Colors.cyan,
23-
child: Text('one'),
18+
Expanded(child: Image.asset('assets/space-2.jpg')),
19+
Expanded(
20+
flex: 3,
21+
child: Container(
22+
padding: EdgeInsets.all(30.0),
23+
color: Colors.cyan,
24+
child: Text('1'),
25+
),
2426
),
25-
Container(
26-
padding: EdgeInsets.all(30.0),
27-
color: Colors.pinkAccent,
28-
child: Text('two'),
27+
Expanded(
28+
flex: 2,
29+
child: Container(
30+
padding: EdgeInsets.all(30.0),
31+
color: Colors.pinkAccent,
32+
child: Text('2'),
33+
),
2934
),
30-
Container(
31-
padding: EdgeInsets.all(40.0),
32-
color: Colors.amber,
33-
child: Text('three'),
35+
Expanded(
36+
flex: 1,
37+
child: Container(
38+
padding: EdgeInsets.all(30.0),
39+
color: Colors.amber,
40+
child: Text('3'),
41+
),
3442
),
3543
],
3644
),

0 commit comments

Comments
 (0)