Skip to content

Commit

Permalink
fix minor bugs & updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chocodon committed Sep 4, 2020
1 parent 280c9e9 commit 9b21b52
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 47 deletions.
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# task_manager
# Tasks Manager

A new Flutter project.
Application that help you manage tasks & event

## Getting Started
## Screenshot

This project is a starting point for a Flutter application.
<img src="src/screenshot/ss_homepage.png" width="23%"></img> <img src="src/screenshot/ss_all_task.png" width="23%"></img> <img src="src/screenshot/ss_detail_screen.png" width="23%"></img> <img src="src/screenshot/ss_menu.png" width="23%"></img> <img src="src/screenshot/ss_notification.png" width="23%"></img> <img src="src/screenshot/ss_task_editor.png" width="23%"></img>

A few resources to get you started if this is your first Flutter project:
## Changelog

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
### v1.0.0+2

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
Refactoring code and fixed some following bugs:

* Showing different tasks in detail screen when open a tasks
* Subtask in editor not showing
* If participants null it will showing description (Detail Screen)
* Can't navigate if open app from notification

### v1.0.0+1

* Initial Release
1 change: 1 addition & 0 deletions lib/core/util/route_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class RouteGenerator {
isNew: args.isNew,
function: args.function,
fromHome: args.fromHome,
task: args.task,
fromTaskPage: args.fromTaskPage),
settings: settings,
fullscreenDialog: true);
Expand Down
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class MyApp extends StatelessWidget {
scaffoldBackgroundColor: Colors.white,
cursorColor: Color(0xFFfabb18),
fontFamily: 'Roboto'),
//home: MenuDashboard(currentIndexPage: 0),
));
}
}
9 changes: 7 additions & 2 deletions lib/ui/screen/all_task_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import 'detail_screen.dart';
class AllTask extends StatefulWidget {
final Function function;
final Function onMenuTap;
AllTask({Key key, this.function, this.onMenuTap}) : super(key: key);
final bool fromMenu;
AllTask({Key key, this.function, this.onMenuTap, @required this.fromMenu})
: super(key: key);

_AllTaskState createState() => _AllTaskState();
}
Expand All @@ -44,7 +46,10 @@ class _AllTaskState extends State<AllTask> {
}

_navigator() {
Navigator.pushNamed(context, homeRoute);
if (widget.fromMenu == false)
Navigator.pop(context);
else
Navigator.pushNamed(context, homeRoute);
if (widget.function != null) widget.function.call();
}

Expand Down
36 changes: 16 additions & 20 deletions lib/ui/screen/detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ class _DetailTaskState extends State<DetailTask> {
});
}
} else if (state is TaskNotFound) {
//Navigator.pop(context);

Navigator.of(context)
.pushNamedAndRemoveUntil(homeRoute, (route) => false);
}
Expand Down Expand Up @@ -317,7 +315,10 @@ class _DetailTaskState extends State<DetailTask> {
SizedBox(
height: ScreenUtil().setHeight(30),
),
participantsTags(),
Padding(
padding: EdgeInsets.only(left: ScreenUtil().setWidth(60)),
child: participantsTags(),
),
SizedBox(height: ScreenUtil().setHeight(30)),
subtaskText(),
SizedBox(height: ScreenUtil().setHeight(30)),
Expand Down Expand Up @@ -438,7 +439,8 @@ class _DetailTaskState extends State<DetailTask> {
? widget.tasks.taskId
: widget.taskId));
if (widget.function != null) widget.function.call();
Navigator.pop(context);
Navigator.pushNamedAndRemoveUntil(
context, homeRoute, (route) => false);
}),
],
flexibleSpace: FlexibleSpaceBar(
Expand Down Expand Up @@ -477,10 +479,10 @@ class _DetailTaskState extends State<DetailTask> {
child: Text(
state.tasks.taskName,
overflow: TextOverflow.ellipsis,
maxLines: 3,
maxLines: 2,
style: TextStyle(
fontFamily: 'Roboto-Bold',
fontSize: 20,
fontSize: 21,
color: Colors.black87),
),
),
Expand All @@ -502,7 +504,7 @@ class _DetailTaskState extends State<DetailTask> {
color: Colors.black87,
fontFamily: 'Roboto-Medium',
decoration: TextDecoration.none,
fontSize: 16.0),
fontSize: 17.0),
);
}

Expand Down Expand Up @@ -539,7 +541,7 @@ class _DetailTaskState extends State<DetailTask> {
color: Colors.black87,
fontFamily: 'Roboto-Medium',
decoration: TextDecoration.none,
fontSize: 16.0),
fontSize: 17.0),
);
}

Expand All @@ -556,6 +558,7 @@ class _DetailTaskState extends State<DetailTask> {
index: index,
title: _tasks.participants[index],
active: true,
textStyle: TextStyle(fontSize: 16),
combine: ItemTagsCombine.withTextBefore,
color: Theme.of(context).primaryColor,
activeColor: Theme.of(context).primaryColor,
Expand All @@ -574,13 +577,8 @@ class _DetailTaskState extends State<DetailTask> {
);
},
)
: Padding(
padding: EdgeInsets.only(left: ScreenUtil().setWidth(60)),
child: Text("No Participants",
style: TextStyle(
color: Colors.black,
)),
);
: Text("No Participants",
style: TextStyle(color: Colors.black, fontSize: 16));
} else
return Container();
},
Expand All @@ -594,7 +592,7 @@ class _DetailTaskState extends State<DetailTask> {
color: Colors.black87,
fontFamily: 'Roboto-Medium',
decoration: TextDecoration.none,
fontSize: 16.0),
fontSize: 17.0),
);
}

Expand All @@ -605,7 +603,7 @@ class _DetailTaskState extends State<DetailTask> {
color: Colors.black87,
fontFamily: 'Roboto-Medium',
decoration: TextDecoration.none,
fontSize: 16.0),
fontSize: 17.0),
);
}

Expand All @@ -619,9 +617,7 @@ class _DetailTaskState extends State<DetailTask> {
state.tasks.description != ""
? state.tasks.description
: "No Description",
style: TextStyle(
color: Colors.black,
)),
style: TextStyle(color: Colors.black, fontSize: 16)),
);
} else
return Container();
Expand Down
1 change: 1 addition & 0 deletions lib/ui/screen/menu_dashboard_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class _MenuDashboardState extends State<MenuDashboard>
else if (index == 1)
return AllTask(
onMenuTap: function,
fromMenu: true,
);
else
return PinnedTaskPage(
Expand Down
23 changes: 12 additions & 11 deletions lib/ui/screen/task_editor_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class TaskEditor extends StatefulWidget {
@required this.function,
@required this.fromHome,
@required this.fromTaskPage,
this.task,
@required this.task,
this.onMenuTap});

@override
Expand Down Expand Up @@ -327,7 +327,7 @@ class _TaskEditorState extends State<TaskEditor> {
SizedBox(height: ScreenUtil().setHeight(60)),
Text(
'Description',
style: TextStyle(fontSize: 15.0, fontFamily: 'Roboto-Bold'),
style: TextStyle(fontSize: 16.0, fontFamily: 'Roboto-Bold'),
),
SizedBox(height: ScreenUtil().setHeight(30)),
_descriptionController.text == ""
Expand All @@ -336,21 +336,21 @@ class _TaskEditorState extends State<TaskEditor> {
SizedBox(height: ScreenUtil().setHeight(60)),
Text(
'Participants',
style: TextStyle(fontSize: 15.0, fontFamily: 'Roboto-Bold'),
style: TextStyle(fontSize: 16.0, fontFamily: 'Roboto-Bold'),
),
participantTextfield(),
SizedBox(height: ScreenUtil().setHeight(15)),
chipsTags(),
SizedBox(height: ScreenUtil().setHeight(60)),
Text(
'Category',
style: TextStyle(fontSize: 15.0, fontFamily: 'Roboto-Bold'),
style: TextStyle(fontSize: 16.0, fontFamily: 'Roboto-Bold'),
),
chipsCategory(),
SizedBox(height: ScreenUtil().setHeight(60)),
Text(
'SubTask',
style: TextStyle(fontSize: 15.0, fontFamily: 'Roboto-Bold'),
style: TextStyle(fontSize: 16.0, fontFamily: 'Roboto-Bold'),
),
listSubtask(),
SizedBox(height: ScreenUtil().setHeight(300)),
Expand Down Expand Up @@ -382,7 +382,7 @@ class _TaskEditorState extends State<TaskEditor> {
focusNode: _titleFocusNode,
cursorColor: Colors.black,
textCapitalization: TextCapitalization.words,
style: TextStyle(fontFamily: 'Roboto-Medium', fontSize: 18),
style: TextStyle(fontFamily: 'Roboto-Medium', fontSize: 19),
decoration: InputDecoration(
hintText: 'Tasks title',
hintStyle: TextStyle(fontFamily: 'Roboto-Medium', fontSize: 18),
Expand Down Expand Up @@ -438,7 +438,7 @@ class _TaskEditorState extends State<TaskEditor> {
? DateFormat('EEEE dd, MMMM yyyy').format(_selectedDate)
: 'Pick Date',
style: TextStyle(
fontSize: 15.0,
fontSize: 16.0,
color: (_selectedDate != null) ? Colors.black : Colors.black54),
)
],
Expand Down Expand Up @@ -486,7 +486,7 @@ class _TaskEditorState extends State<TaskEditor> {
? '${_startTime.format(context)} - ${_endTime != null ? _endTime.format(context) : ""}'
: 'Pick Time',
style: TextStyle(
fontSize: 15.0,
fontSize: 16.0,
color: (_startTime != null) ? Colors.black : Colors.black54),
)
],
Expand Down Expand Up @@ -533,7 +533,7 @@ class _TaskEditorState extends State<TaskEditor> {
textCapitalization: TextCapitalization.words,
cursorColor: Colors.black,
onEditingComplete: () => FocusScope.of(context).unfocus(),
style: TextStyle(fontSize: 15.0),
style: TextStyle(fontSize: 16.0),
decoration: InputDecoration(
hintText: 'Insert Location',
border: InputBorder.none,
Expand Down Expand Up @@ -586,7 +586,7 @@ class _TaskEditorState extends State<TaskEditor> {
style: TextStyle(
color: Colors.grey,
fontFamily: 'Roboto-Medium',
fontSize: 14),
fontSize: 16),
)),
)),
);
Expand Down Expand Up @@ -614,6 +614,7 @@ class _TaskEditorState extends State<TaskEditor> {
key: Key(index.toString()),
index: index,
title: _participants[index],
textStyle: TextStyle(fontSize: 16),
active: true,
combine: ItemTagsCombine.withTextBefore,
color: Theme.of(context).primaryColor,
Expand Down Expand Up @@ -651,7 +652,7 @@ class _TaskEditorState extends State<TaskEditor> {
itemConfig: const ChipsChoiceItemConfig(
selectedColor: Color(0xFFfabb18),
selectedBrightness: Brightness.dark,
labelStyle: TextStyle(fontSize: 13)),
labelStyle: TextStyle(fontSize: 15)),
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/ui/widget/custom_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class CustomCard extends StatelessWidget {
style: TextStyle(
color: Colors.grey,
fontWeight: FontWeight.w400,
fontSize: 13.0),
fontSize: 14.0),
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/widget/detail_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class _DetailTaskWidgetState extends State<DetailTaskWidget> {
style: TextStyle(
decoration: TextDecoration.none,
fontStyle: FontStyle.normal,
fontSize: 15.0,
fontSize: 16.0,
fontWeight: FontWeight.normal,
color: (widget.text == "") ? Colors.black54 : Colors.black),
)
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widget/reorderable_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ class _ReoderableItemState extends State<ReoderableItem> {
color: Colors.grey,
fontStyle: FontStyle.italic,
decoration: TextDecoration.lineThrough,
)
: null,
fontSize: 16)
: TextStyle(color: Colors.black, fontSize: 16),
onChanged: (value) {
setState(() {
firstBuild = false;
Expand Down
Binary file removed src/img/pic.jpg
Binary file not shown.
Binary file added src/screenshot/ss_all_task.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/screenshot/ss_detail_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/screenshot/ss_homepage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/screenshot/ss_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/screenshot/ss_notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/screenshot/ss_task_editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9b21b52

Please sign in to comment.