-
Notifications
You must be signed in to change notification settings - Fork 12
/
dashboard.dart
73 lines (67 loc) · 1.82 KB
/
dashboard.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
64
65
66
67
68
69
70
71
72
73
import 'package:flutter/material.dart';
import 'package:iamrick/utilities/constants.dart';
import 'package:provider/provider.dart';
import 'package:iamrick/models/task_data.dart';
// After Provider
//class Dashboard extends StatelessWidget {
// @override
// Widget build(BuildContext context) {
// return SafeArea(
// bottom: false,
// child: Column(
// children: <Widget>[
// SizedBox(height: 20.0),
// CircleAvatar(
// radius: 27.0,
// backgroundColor: Colors.white,
// child: Icon(
// Icons.list,
// size: 39.0,
// color: kColourPrimary,
// ),
// ),
// SizedBox(height: 20.0),
// Text("Rick's To-Do List", style: kTextStyleTitle),
// SizedBox(height: 8.0),
// Text(
// "${Provider.of<TaskData>(context).numberOfTasks()} Tasks",
// style: kTextStyleTasks,
// ),
// SizedBox(height: 10.0),
// ],
// ),
// );
// }
//}
// Before Provider
class Dashboard extends StatelessWidget {
final int numberOfTasks;
Dashboard({
@required this.numberOfTasks,
});
@override
Widget build(BuildContext context) {
return SafeArea(
bottom: false,
child: Column(
children: <Widget>[
SizedBox(height: 20.0),
CircleAvatar(
radius: 27.0,
backgroundColor: Colors.white,
child: Icon(
Icons.list,
size: 39.0,
color: kColourPrimary,
),
),
SizedBox(height: 20.0),
Text("Rick's To-Do List", style: kTextStyleTitle),
SizedBox(height: 8.0),
Text("$numberOfTasks Tasks", style: kTextStyleTasks),
SizedBox(height: 10.0),
],
),
);
}
}