-
Notifications
You must be signed in to change notification settings - Fork 104
/
align.dart
45 lines (43 loc) · 1.33 KB
/
align.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
43
44
45
import 'package:flutter/material.dart';
class MyAlign extends StatelessWidget {
const MyAlign({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Align')),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const RotatedBox(
quarterTurns: 3,
child: Text('↓ +1 _____________to_______________ -1 ↓'),
),
Container(
padding: const EdgeInsets.all(10.0),
height: 300,
width: 300,
color: Colors.black12,
child: const Align(
alignment: Alignment(0.60, -0.80),
child: Text(
'Hello!',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
const Text(' ↑ -1 ______________to_______________ +1 ↑'),
],
),
),
);
}
}