@@ -13,75 +13,74 @@ bool isDone = false;
13
13
class _Task_WidgetState extends State <Task_Widget > {
14
14
@override
15
15
Widget build (BuildContext context) {
16
- return Scaffold (
17
- backgroundColor: backgroundColors,
18
- body: SafeArea (
19
- child: Padding (
20
- padding: const EdgeInsets .symmetric (horizontal: 15 , vertical: 15 ),
21
- child: Container (
22
- width: double .infinity,
23
- height: 130 ,
24
- decoration: BoxDecoration (
25
- borderRadius: BorderRadius .circular (10 ),
26
- color: Colors .white,
27
- boxShadow: [
28
- BoxShadow (
29
- color: Colors .grey.withOpacity (0.2 ),
30
- spreadRadius: 5 ,
31
- blurRadius: 7 ,
32
- offset: Offset (0 , 2 ),
33
- ),
34
- ],
16
+ return get ();
17
+ }
18
+
19
+ Widget get () {
20
+ return Padding (
21
+ padding: const EdgeInsets .symmetric (horizontal: 15 , vertical: 10 ),
22
+ child: Container (
23
+ width: double .infinity,
24
+ height: 130 ,
25
+ decoration: BoxDecoration (
26
+ borderRadius: BorderRadius .circular (10 ),
27
+ color: Colors .white,
28
+ boxShadow: [
29
+ BoxShadow (
30
+ color: Colors .grey.withOpacity (0.2 ),
31
+ spreadRadius: 5 ,
32
+ blurRadius: 7 ,
33
+ offset: Offset (0 , 2 ),
35
34
),
36
- child: Padding (
37
- padding: const EdgeInsets .symmetric (horizontal: 10 ),
38
- child: Row (
39
- children: [
40
- // image
41
- imageee (),
42
- SizedBox (width: 25 ),
43
- // title and subtitle
44
- Expanded (
45
- child: Column (
46
- crossAxisAlignment: CrossAxisAlignment .start,
35
+ ],
36
+ ),
37
+ child: Padding (
38
+ padding: const EdgeInsets .symmetric (horizontal: 10 ),
39
+ child: Row (
40
+ children: [
41
+ // image
42
+ imageee (),
43
+ SizedBox (width: 25 ),
44
+ // title and subtitle
45
+ Expanded (
46
+ child: Column (
47
+ crossAxisAlignment: CrossAxisAlignment .start,
48
+ children: [
49
+ SizedBox (height: 5 ),
50
+ Row (
51
+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
47
52
children: [
48
- SizedBox (height: 5 ),
49
- Row (
50
- mainAxisAlignment: MainAxisAlignment .spaceBetween,
51
- children: [
52
- Text (
53
- 'title' ,
54
- style: TextStyle (
55
- fontSize: 18 ,
56
- fontWeight: FontWeight .bold,
57
- ),
58
- ),
59
- Checkbox (
60
- activeColor: custom_green,
61
- value: isDone,
62
- onChanged: (value) {
63
- setState (() {
64
- isDone = ! isDone;
65
- });
66
- },
67
- )
68
- ],
69
- ),
70
53
Text (
71
- 'subtitle ' ,
54
+ 'title ' ,
72
55
style: TextStyle (
73
- fontSize: 16 ,
74
- fontWeight: FontWeight .w400 ,
75
- color : Colors .grey.shade400 ),
56
+ fontSize: 18 ,
57
+ fontWeight: FontWeight .bold ,
58
+ ),
76
59
),
77
- Spacer (),
78
- edit_time ()
60
+ Checkbox (
61
+ activeColor: custom_green,
62
+ value: isDone,
63
+ onChanged: (value) {
64
+ setState (() {
65
+ isDone = ! isDone;
66
+ });
67
+ },
68
+ )
79
69
],
80
70
),
81
- ),
82
- ],
71
+ Text (
72
+ 'subtitle' ,
73
+ style: TextStyle (
74
+ fontSize: 16 ,
75
+ fontWeight: FontWeight .w400,
76
+ color: Colors .grey.shade400),
77
+ ),
78
+ Spacer (),
79
+ edit_time ()
80
+ ],
81
+ ),
83
82
),
84
- ) ,
83
+ ] ,
85
84
),
86
85
),
87
86
),
0 commit comments