Hourglass improved + projects delete
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:tasktracker/Data.dart';
|
||||
import 'package:tasktracker/NewProject.dart';
|
||||
import 'package:tasktracker/NotificationsManager.dart';
|
||||
import 'main.dart';
|
||||
import 'User.dart' as User;
|
||||
@@ -128,7 +129,7 @@ class Dialogs{
|
||||
context=navigatorKey.currentContext;
|
||||
List<Widget> stepWidgets = [];
|
||||
for (ProjectStep value in project.steps) {
|
||||
stepWidgets.add(Text('[${value.progress}%] ${value.eta}h -> ${value.stepName}'));
|
||||
stepWidgets.add(Text('[${value.progress}%] ${value.eta}h -> ${value.stepName}',style: TextStyle(fontSize: 14)));
|
||||
}
|
||||
if(context!=null) {
|
||||
return showDialog(
|
||||
@@ -142,9 +143,10 @@ class Dialogs{
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("deadline : ${project.deadline}"),
|
||||
Text("Steps"),
|
||||
SizedBox(height: 5),
|
||||
Text("Deadline : ${DateFormat("yyyy-MM-dd").format(project.deadline)}"),
|
||||
Divider(),
|
||||
Text("Steps",style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
SizedBox(height: 20),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -155,6 +157,7 @@ class Dialogs{
|
||||
actions: [
|
||||
MaterialButton(
|
||||
onPressed: (){
|
||||
User.UserOperations.deleteProject(project.name);
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text('Delete', style:TextStyle(color: Colors.red)),
|
||||
@@ -162,6 +165,7 @@ class Dialogs{
|
||||
MaterialButton(
|
||||
onPressed: (){
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).push(MaterialPageRoute(builder: (context)=>NewProject(multiline: project.steps.isNotEmpty, projectName: project.name, selectedCategory: project.cat!.name,m_steps: project.steps,)));
|
||||
},
|
||||
child: Text('Edit', style:TextStyle(color: Colors.yellow)),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user