Desktop test
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:tasktracker/Data.dart';
|
||||
import 'package:tasktracker/NewProject.dart';
|
||||
import 'User.dart' as User;
|
||||
@@ -65,6 +66,7 @@ class _ProjectsState extends State<Projects> {
|
||||
List<Widget> projectWidgets = [];
|
||||
|
||||
for (var element in User.projects) {
|
||||
if(element.cat==null){print(element.name + " has no cat");continue;}
|
||||
projectWidgets.add(ProjectCard(element));
|
||||
}
|
||||
|
||||
@@ -82,20 +84,40 @@ class _ProjectsState extends State<Projects> {
|
||||
onTap: (){},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(project.name),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.green,
|
||||
borderRadius: BorderRadius.circular(8)
|
||||
),
|
||||
child:Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
|
||||
child: Text("Work"),
|
||||
))
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(project.name ,style: TextStyle(fontSize: 18)),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: (project.cat!.productive) ?Colors.green : Colors.red,
|
||||
borderRadius: BorderRadius.circular(8)
|
||||
),
|
||||
child:Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
|
||||
child: Text(project.cat!.name),
|
||||
))
|
||||
],
|
||||
),
|
||||
Divider(),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("${project.steps.length} steps"),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.redAccent,
|
||||
borderRadius: BorderRadius.circular(8)
|
||||
),
|
||||
child:Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
|
||||
child: Text("Deadline : " +DateFormat("yyyy-MM-dd").format(project.deadline)),
|
||||
))
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user