forked from md-siam/widget_of_the_day
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflexible.dart
42 lines (40 loc) · 1002 Bytes
/
flexible.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import 'package:flutter/material.dart';
class MyFlexible extends StatelessWidget {
const MyFlexible({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('F L E X I B L E')),
body: Center(
child: Column(
children: [
Flexible(
flex: 1,
fit: FlexFit.tight,
child: Container(
height: 50,
color: Colors.blue,
),
),
Flexible(
flex: 1,
fit: FlexFit.tight,
child: Container(
height: 150,
color: Colors.orange,
),
),
Flexible(
flex: 1,
fit: FlexFit.tight,
child: Container(
height: 150,
color: Colors.red,
),
),
],
),
),
);
}
}