-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathday6.dart
69 lines (63 loc) · 1.65 KB
/
day6.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
import 'package:flutter/material.dart';
class Day6 extends StatefulWidget {
Day6() : super();
final String title = "7 Day Diet Plan To Survive Quarintine";
@override
_Day6State createState() => _Day6State();
}
class _Day6State extends State<Day6> {
List<String> days;
@override
void initState() {
super.initState();
days = List();
addDays();
}
addDays() {
days.add("Lukewarm water with freshlime and ½ tsp of Honey");
days.add("Ginger and tulsi tea");
days.add("1 Tbsp Chawanprash");
days.add("Paneer paratha with curd");
days.add("Fruit Chat (250g)");
days.add(
"Rice (2-3 tsp) with 1 bowl of dal, 1 bowl of veggies & 1 bowl of curd or raita");
days.add("1 cup of ginger tea");
days.add("A handful of almonds/nuts");
days.add("1 chapati, with 1 bowl of dal/paneer");
days.add("1 bowl of fresh fruits");
days.add("1 cup Milk with ½ tsp organic turmeric");
}
Widget list() {
return ListView.builder(
padding: EdgeInsets.all(20),
itemCount: days.length,
itemBuilder: (BuildContext context, int index) {
return row(context, index);
},
);
}
Widget row(context, index) {
return Dismissible(
key: Key(days[index]),
onDismissed: (direction) {},
child: Card(
shadowColor: Color(0xFF44BEA3),
child: ListTile(
title: Text(days[index]),
),
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: const Color(0xFF009688),
title: Text("DAY 6"),
),
body: Container(
child: list(),
),
);
}
}