forked from md-siam/widget_of_the_day
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext_n_styling.dart
63 lines (58 loc) · 2.02 KB
/
text_n_styling.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import 'package:flutter/material.dart';
class MyTextStyle extends StatelessWidget {
const MyTextStyle({Key? key}) : super(key: key);
final pinkFont = const TextStyle(
fontSize: 16,
color: Colors.pink,
fontStyle: FontStyle.normal,
);
final greenFont = const TextStyle(
fontSize: 30,
color: Colors.green,
fontStyle: FontStyle.italic,
);
final paragraphFont = const TextStyle(
fontSize: 14,
color: Colors.purple,
);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Text & Style")),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
const Text("Text Widget Tutorial"),
Text(
"How to customise and style texts with flutter :D",
style: pinkFont,
),
Text(
"Another text widget",
style: greenFont,
),
Padding(
padding: const EdgeInsets.all(15.0),
child: Container(
decoration: BoxDecoration(
color: Colors.yellow,
borderRadius: BorderRadius.circular(15),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"The birth centenary of Father of the Nation Bangabandhu Sheikh Mujibur Rahman is being celebrated across the country in 2020-21. Under the ICT Division of the Government of the People’s Republic of Bangladesh, different initiatives have been taken by the Bangladesh Computer Council’s iDEA project to organize the Mujib Year, most notably the “Bangabandhu Innovation Grant 2020 (BIG)” event.",
style: paragraphFont,
textAlign: TextAlign.justify,
textDirection: TextDirection.ltr,
),
),
),
),
],
),
),
);
}
}