Summary page done
This commit is contained in:
@@ -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)
|
||||
)
|
||||
]),
|
||||
],
|
||||
)))),
|
||||
|
||||
Reference in New Issue
Block a user