Started projects
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tasktracker/Categories.dart';
|
||||
import 'package:tasktracker/Projects.dart';
|
||||
import 'package:tasktracker/Todo.dart';
|
||||
import 'package:tasktracker/Welcome.dart';
|
||||
import 'package:tasktracker/splash.dart';
|
||||
@@ -95,7 +96,7 @@ class MyApp extends StatelessWidget {
|
||||
'/Categories': (context) => const Categories(),
|
||||
'/Activities': (context) => const Activities(),
|
||||
'/Settings': (context) => const SettingsPage(),
|
||||
'/Todo':(context)=> const TodoPage()
|
||||
'/Projects':(context)=> const Projects()
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -282,6 +283,10 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
trackedTime += value;
|
||||
});
|
||||
int untrackedTime = 1440-trackedTime;
|
||||
if(untrackedTime<0){
|
||||
User.refreshUserData().then((val)=>LoadStats());
|
||||
print("Shit went wrong!");
|
||||
}
|
||||
print("Tracked time : $trackedTime");
|
||||
|
||||
dailyData.sort((a, b) {
|
||||
@@ -718,15 +723,26 @@ Drawer navDrawer(BuildContext context, int pageIndex) {
|
||||
Divider(),
|
||||
ListTile(
|
||||
selected: (pageIndex == 7),
|
||||
title: Text('TODO'),
|
||||
leading: Icon(Icons.check, color: Theme.of(context).primaryColor),
|
||||
title: Text('Projects'),
|
||||
leading: Icon(Icons.work_outline_sharp, color: Theme.of(context).primaryColor),
|
||||
onTap: () {
|
||||
if (pageIndex == 7) {
|
||||
return;
|
||||
}
|
||||
Navigator.of(context).pushReplacementNamed('/Todo');
|
||||
Navigator.of(context).pushReplacementNamed('/Projects');
|
||||
},
|
||||
),
|
||||
// ListTile(
|
||||
// selected: (pageIndex == 7),
|
||||
// title: Text('TODO'),
|
||||
// leading: Icon(Icons.check, color: Theme.of(context).primaryColor),
|
||||
// onTap: () {
|
||||
// if (pageIndex == 7) {
|
||||
// return;
|
||||
// }
|
||||
// // Navigator.of(context).pushReplacementNamed('/Todo');
|
||||
// },
|
||||
// ),
|
||||
Divider(),
|
||||
ListTile(
|
||||
selected: (pageIndex == 5),
|
||||
|
||||
Reference in New Issue
Block a user