-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome_page.dart
More file actions
106 lines (100 loc) · 3.21 KB
/
home_page.dart
File metadata and controls
106 lines (100 loc) · 3.21 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:riferpord_test/Core/providers/add_task.dart';
import 'package:riferpord_test/Core/widgets/add_task_widgrt.dart';
import 'package:riferpord_test/Core/widgets/box_info_task.dart';
import 'package:riferpord_test/Core/widgets/custom_text.dart';
import 'package:riferpord_test/Core/widgets/task_widget.dart';
import 'package:riferpord_test/Core/widgets/top_bar.dart';
class HomePage extends ConsumerStatefulWidget {
const HomePage({super.key});
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends ConsumerState<HomePage> {
@override
Widget build(BuildContext context) {
final provider = ref.watch(fistProvider);
return Scaffold(
body: SafeArea(
child: Container(
margin: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// top bar
TopBar(),
// sizedBox
SizedBox(
height: 20,
),
// what's up, Jou
CustomText(
text: 'what\'s up, Mohammed!',
color: Colors.indigo.shade900,
fontSize: 30,
fontWeight: FontWeight.bold,
),
// sizedBox
SizedBox(
height: 30,
),
// catgoreis title
CustomText(
text: 'Catgories',
color: Colors.grey.shade600,
),
// sizedBox
SizedBox(
height: 20,
),
// info catogries Box
Container(
margin: EdgeInsets.all(5),
height: 130,
child: ListView.builder(
itemCount:
ref.watch(fistProvider.notifier).listTypesBoxInfo.length,
scrollDirection: Axis.horizontal,
itemBuilder: (con, ind) {
return BoxInfoTask(
boxInfoModelTask: ref
.watch(fistProvider.notifier)
.listTypesBoxInfo[ind]);
},
),
),
SizedBox(
height: 30,
),
// title today's tasks
CustomText(
text: 'TODAY\'s TASKS',
color: Colors.grey.shade600,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 20,
),
// Place ToDay Task
Expanded(
child: Container(
height: 80,
child: ListView.builder(
itemCount: provider.length,
itemBuilder: (con, ind) {
return TaskWidget(
taskModel: provider[ind],
ind: ind,
);
}),
),
),
],
),
),
),
floatingActionButton: AddTask(),
);
}
}