-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask_card.dart
62 lines (55 loc) · 1.56 KB
/
task_card.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
import "package:flutter/material.dart";
import "main.dart";
class TaskCard extends StatefulWidget{
//Required details
//1. to do description
//2. Target date
//3. Target Time
String toDoDescription;
String targetDate ;
String title;
final VoidCallback? updateScreen;
//final VoidCallback? deleteTask;
int taskIndex = 0;
List<TaskCard> list = [];
TaskCard({required this.taskIndex, required this.toDoDescription, required this.targetDate, required this.title, required this.updateScreen});
@override
State<StatefulWidget> createState() => _TaskCardState();
}
class _TaskCardState extends State<TaskCard>{
get taskList => null;
@override
Widget build(BuildContext context) {
return Card(
color: Colors.grey,
shadowColor: Colors.black,
elevation: 20,
child: Stack(
children: [Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20)
),
alignment: Alignment.center,
height: 100,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(widget.title),
Text(widget.toDoDescription),
Text(widget.targetDate.toString())
],
),
),
Container(
alignment: Alignment.topRight,
child: ElevatedButton(onPressed: (){
//widget.list.remove(widget);
//_MyAppState.
taskList.remove(widget.taskIndex);
}, child: Text("-"),)
)
]
),
);
}
}