Summary page done

This commit is contained in:
warlock
2022-03-02 09:24:26 +05:30
parent 8c7ea9b86e
commit 4576957b4c
16 changed files with 974 additions and 409 deletions

View File

@@ -85,7 +85,7 @@ class _TasksState extends State<Tasks> {
} else {
Color color = HexColor.fromHex(element.cat?.color ?? '#000000');
bool productive = element.cat?.productive ?? true;
Widget task = TaskCard(context, name, productive, color);
Widget task = TaskCard(context, name, productive, color, element.cat?.name ?? 'n/a');
_tasks.add(task);
}
});
@@ -95,7 +95,7 @@ class _TasksState extends State<Tasks> {
bool selecting = false;
Widget TaskCard(
BuildContext context, String name, bool productive, Color color) {
BuildContext context, String name, bool productive, Color color, String catName) {
return Row(children: [
// Container(),
(selecting)
@@ -140,12 +140,16 @@ class _TasksState extends State<Tasks> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(name,
style: TextStyle(color: Colors.white)),
),
// Icon(Icons.analytics, color: color, size: 20,),
Icon(Icons.circle,
color: (productive)
? Colors.green
: Colors.red)
Container(
padding: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: (productive) ? Colors.green : Colors.red
),
child:Text(catName)
)
]),
],
)))),