Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/live working #18

Merged
merged 16 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions .flutter-plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is a generated file; do not edit or check into version control.
audioplayers=/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.19.1/
path_provider=/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/
path_provider_linux=/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.0.0/
path_provider_macos=/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.0/
path_provider_windows=/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.1/
1 change: 1 addition & 0 deletions .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audioplayers","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.19.1/","dependencies":["path_provider"]},{"name":"path_provider","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/","dependencies":[]}],"android":[{"name":"audioplayers","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.19.1/","dependencies":["path_provider"]},{"name":"path_provider","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.2/","dependencies":[]}],"macos":[{"name":"audioplayers","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.19.1/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.0/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.0.0/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.1/","dependencies":[]}],"web":[{"name":"audioplayers","path":"/Users/ismaelshakverdiev/tools/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.19.1/","dependencies":[]}]},"dependencyGraph":[{"name":"audioplayers","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-07-13 00:13:17.798658","version":"2.2.2"}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
**Note:** Inispired from Kalle Hallden's [time magement project](https://github.com/KalleHallden/Time-management-app)

An advanced, minimalist and powerful time management application. Where you can create task, give it a duration, and select which week days you wanna do it.
By doing this you can easily manage a whole week or a concrete day. Application sets "Today" automatically. And you can see your 24 hours as a circle which is divided by tasks. Also you can see the task's duration by tapping the divided item on day circle. Application has light and dark theme, and supports four language: *"English, Turkish, Russian, and Georgian"*.
By doing this you can easily manage a whole week or a concrete day, or a concrete task. Application sets "Today" automatically. And you can see your 24 hours as a circle which is divided by tasks. Also you can see the task's duration by tapping the divided item on day circle. Application has light and dark theme, and supports four language: *"English, Turkish, Russian, and Georgian"*. <br>
Issue - [#17](https://github.com/theiskaa/VTime/issues/17) is resolved by [#18](https://github.com/theiskaa/VTime/pull/18) PR, So you can start using concrete task as a timer, it will make noise when the task is completed. Also, you can enable "remove task after completing" to remove selected task when the timer is completed. And also you can leave working on task half, when you do it, it will update your task by current duration. (E.g: if your previous duration is 15 minute and you left it at 10 minutes, it will update your task by changing the duration 15 to 10).

## Overview
<img width="1000" src="https://github.com/theiskaa/VTime/blob/main/assets/screenshots/home.png" alt="Main page's screenshots">

<img width="1000" src="https://github.com/theiskaa/VTime/blob/main/assets/screenshots/create.png" alt="Create page's screenshots">

<img width="1000" src="https://github.com/theiskaa/VTime/blob/main/assets/screenshots/live-working.png" alt="Live work page screenshots">

<img width="1000" src="https://github.com/theiskaa/VTime/blob/main/assets/screenshots/more.png" alt="Other pages' screenshots">

---

## License
```md
MIT License
Expand Down
6 changes: 3 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include: package:flutter_lints/flutter.yaml
analyzer:
exclude: [build/**]
strong-mode:
implicit-casts: true # false
implicit-dynamic: true # false
implicit-casts: true
implicit-dynamic: true
linter:
rules:
camel_case_types: true
Expand All @@ -13,4 +13,4 @@ linter:
comment_references: true
control_flow_in_finally: true
prefer_single_quotes: true
prefer_initializing_formals: false # might come in handy to re-enable in the future
prefer_initializing_formals: false
Binary file added assets/.DS_Store
Binary file not shown.
Binary file added assets/alarms/0.mp3
Binary file not shown.
8 changes: 8 additions & 0 deletions assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@
"act.create": "Create",
"act.yes": "Yes",
"act.no": "No",
"act.delete": "Delete",
"act.addTask": "Add task",
"act.clearWeek": "Clear Week",
"clear.week.title": "Are you sure you want to clear your whole week?",
"act.start": "Start",
"act.stop": "Stop",

"prefs.settings": "Settings",
"prefs.appearance": "Appearance",
"prefs.appearance.light": "Light Theme",
"prefs.appearance.dark": "Dark Theme",
"prefs.lang": "Language",

"live_work.selected_task": "Selected Task",
"live_work.removeTaskAfterCompleting": "Remove task after completing",
"live_work.runtimeLogoutRequestError": "The task is still ongoing... Are you sure you want to quit?",
"live_work.leaveItHalf": "Leave it half",

"error.not_found_duration": "Please add duration for your task",
"error.selected_duration_more_than_remaining": "You selected duration which exceeds the remaining time of your selected day",
"error.title_field_validation": "Title can't be empty",
Expand Down
8 changes: 8 additions & 0 deletions assets/i18n/ka.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@
"act.create": "Შექმნა",
"act.yes": "დიახ",
"act.no": "არა",
"act.delete": "წაშლა",
"act.addTask": "დავალების დამატება",
"act.clearWeek": "გაასუფთავე კვირა",
"clear.week.title": "დარწმუნებული ხართ, რომ გსურთ თქვენი მთელი კვირის წაშლა?",
"act.start": "დაწყება",
"act.stop": "გაუქმება",

"prefs.settings": "პარამეტრები",
"prefs.appearance": "გარეგნობა",
"prefs.appearance.light": "ღია",
"prefs.appearance.dark": "მუქი",
"prefs.lang": "Ენა",

"live_work.selected_task": "ამორჩეული დავალება",
"live_work.removeTaskAfterCompleting": "წაშალე დავალება დამთავრების შემდეგ",
"live_work.runtimeLogoutRequestError": "დავალების პროცესი ჯერ კიდევ მიმდინარეობს ... დარწმუნებული ხართ, რომ გსურთ დამთავრება?",
"live_work.leaveItHalf": "შეაჩერე",

"error.not_found_duration": "გთხოვთ, დაამატოთ თქვენი დავალების ხანგრძლივობა",
"error.selected_duration_more_than_remaining": "თქვენ შეარჩიეთ ხანგრძლივობა, რომელიც აჭარბებს არჩეული დღის დანარჩენ დროს",
"error.title_field_validation": "სათაური არ შეიძლება იყოს ცარიელი",
Expand Down
8 changes: 8 additions & 0 deletions assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@
"act.create": "Создавать",
"act.yes": "Да",
"act.no": "Нет",
"act.delete": "Удалить",
"act.addTask": "Добавить задачу",
"act.clearWeek": "Ясная неделя",
"clear.week.title": "Вы уверены, что хотите очистить всю неделю?",
"act.start": "Начало",
"act.stop": "Стоп",

"prefs.settings": "Настройки",
"prefs.appearance": "Тема",
"prefs.appearance.light": "Светлая тема",
"prefs.appearance.dark": "Темная тема",
"prefs.lang": "Язык",

"live_work.selected_task": "Выбранная задача",
"live_work.removeTaskAfterCompleting": "Удалить задачу после завершения",
"live_work.runtimeLogoutRequestError": "Процесс еще продолжается... Вы уверены, что хотите бросить курить?",
"live_work.leaveItHalf": "Приостановить",

"error.not_found_duration": "Пожалуйста, укажите продолжительность вашей задачи",
"error.selected_duration_more_than_remaining": "Вы выбрали продолжительность, которая превышает оставшееся время выбранного вами дня",
"error.title_field_validation": "Заголовок не может быть пустым",
Expand Down
8 changes: 8 additions & 0 deletions assets/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@
"act.create": "Oluştur",
"act.yes": "Evet",
"act.no": "Hayır",
"act.delete": "Sil",
"act.addTask": "Görev ekle",
"act.clearWeek": "Haftayı Temizle",
"clear.week.title": "Bütün haftanı temizlemek istediğinden emin misin?",
"act.start": "Başlat",
"act.stop": "Durdur",

"prefs.settings": "Ayarlar",
"prefs.appearance": "Görünüm",
"prefs.appearance.light": "Açık Tema",
"prefs.appearance.dark": "Karanlık Tema",
"prefs.lang": "Dil",

"live_work.selected_task": "Seçilen Görev",
"live_work.removeTaskAfterCompleting": "Tamamladıktan sonra görevi kaldır",
"live_work.runtimeLogoutRequestError": "Görev hala devam ediyor... Sonlandırmak istediğinizden emin misiniz?",
"live_work.leaveItHalf": "Yarım bırak",

"error.not_found_duration": "Lütfen göreviniz için süre ekleyin",
"error.selected_duration_more_than_remaining": "Seçtiğiniz günün kalan süresini aşan bir süre seçtiniz",
"error.title_field_validation": "Başlık boş olamaz",
Expand Down
Binary file added assets/screenshots/live-working.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
PODS:
- audioplayers (0.0.1):
- Flutter
- Flutter (1.0.0)
- path_provider (0.0.1):
- Flutter

DEPENDENCIES:
- audioplayers (from `.symlinks/plugins/audioplayers/ios`)
- Flutter (from `Flutter`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)

EXTERNAL SOURCES:
audioplayers:
:path: ".symlinks/plugins/audioplayers/ios"
Flutter:
:path: Flutter
path_provider:
:path: ".symlinks/plugins/path_provider/ios"

SPEC CHECKSUMS:
audioplayers: 455322b54050b30ea4b1af7cd9e9d105f74efa8c
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c

Expand Down
7 changes: 7 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,12 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSMicrophoneUsageDescription</key>
<string>To play alarm music when app's timer ends</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>
4 changes: 2 additions & 2 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:vtime/view/set_up.dart';

import 'core/utils/intl.dart';
import 'core/utils/widgets.dart';
import 'view/home.dart';
import 'view/dashboard.dart';

class App extends VTStatefulWidget {
App({Key? key}) : super(key: key);
Expand All @@ -27,7 +27,7 @@ class _AppState extends VTState<App> {
@override
void initState() {
super.initState();
home = _dbService.isPreferencesSetted() ? Home() : AppSetup();
home = _dbService.isPreferencesSetted() ? Dashboard() : AppSetup();
}

@override
Expand Down
5 changes: 1 addition & 4 deletions lib/core/vt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ class VT {
set intl(Intl intl) => instances['intl'] = intl;
Intl get intl => instances['intl'];


set localDbService(LocalDBService localDbService) =>
instances['localDbService'] = localDbService;

LocalDBService get localDbService => instances['localDbService'];

}
}
15 changes: 15 additions & 0 deletions lib/generated_plugin_registrant.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Generated file. Do not edit.
//

// ignore_for_file: lines_longer_than_80_chars

import 'package:audioplayers/web/audioplayers_web.dart';

import 'package:flutter_web_plugins/flutter_web_plugins.dart';

// ignore: public_member_api_docs
void registerPlugins(Registrar registrar) {
AudioplayersPlugin.registerWith(registrar);
registrar.registerMessageHandler();
}
6 changes: 3 additions & 3 deletions lib/view/create.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:vtime/core/services/local_db_service.dart';
import 'package:vtime/core/utils/widgets.dart';
import 'package:vtime/view/widgets/utils.dart';

import 'home.dart';
import 'dashboard.dart';
import 'widgets/appbars.dart';

class CreateTaskPage extends VTStatefulWidget {
Expand Down Expand Up @@ -111,7 +111,7 @@ class CreateTaskPageState extends VTState<CreateTaskPage> {
ScaffoldMessenger.of(context).removeCurrentSnackBar();
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => Home()),
MaterialPageRoute(builder: (context) => Dashboard()),
(route) => false,
);
},
Expand Down Expand Up @@ -272,7 +272,7 @@ class CreateTaskPageState extends VTState<CreateTaskPage> {
ScaffoldMessenger.of(context).removeCurrentSnackBar();
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => Home()),
MaterialPageRoute(builder: (context) => Dashboard()),
);
}
}
Expand Down
51 changes: 16 additions & 35 deletions lib/view/home.dart → lib/view/dashboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ import 'package:vtime/core/model/task.dart';
import 'package:vtime/core/services/local_db_service.dart';
import 'package:vtime/core/utils/utils.dart';
import 'package:vtime/core/utils/widgets.dart';
import 'package:vtime/view/create.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:vtime/view/day_view.dart';
import 'package:vtime/view/widgets/mini_day_card.dart';

import 'day_view.dart';
import 'create.dart';
import 'settings.dart';
import 'widgets/mini_day_card.dart';
import 'widgets/appbars.dart';
import 'widgets/day_chart.dart';
import 'widgets/themes.dart';
import 'widgets/utils.dart';

class Home extends VTStatefulWidget {
Home({Key? key}) : super(key: key);
class Dashboard extends VTStatefulWidget {
Dashboard({Key? key}) : super(key: key);

@override
_HomeState createState() => _HomeState();
_DashboardState createState() => _DashboardState();
}

class _HomeState extends VTState<Home> {
class _DashboardState extends VTState<Dashboard> {
final titleTextController = TextEditingController();
final localDbService = LocalDBService();
final viewUtils = ViewUtils();

late Day today = weekDays(vt, context)[0];
ValueListenable<Box<Task>>? todaysBox;
Expand Down Expand Up @@ -172,9 +172,14 @@ class _HomeState extends VTState<Home> {
);
},
1: () {
showDialog(
context: context,
builder: (context) => clearWeekDialog(),
viewUtils.alert(
context,
vt,
title: vt.intl.of(context)!.fmt('clear.week.title'),
onAct: () {
localDbService.clearWeek();
Navigator.pop(context);
},
);
},
2: () {
Expand All @@ -189,30 +194,6 @@ class _HomeState extends VTState<Home> {

return methods[seleted]!.call();
}

AlertDialog clearWeekDialog() {
return AlertDialog(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
title: Text(vt.intl.of(context)!.fmt('clear.week.title')),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: Text(vt.intl.of(context)!.fmt('act.no')),
),
TextButton(
style: simpleButtonStyle(Colors.red),
onPressed: () {
localDbService.clearWeek();
Navigator.pop(context);
},
child: Text(
vt.intl.of(context)!.fmt('act.yes'),
style: const TextStyle(color: Colors.red),
),
),
],
);
}
}

class WeekView extends VTStatelessWidget {
Expand Down
1 change: 1 addition & 0 deletions lib/view/day_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class _DayViewState extends State<DayView> {
.map(
(task) => TaskCard(
task: task,
dayBox: box,
onDismissed: () => box.delete(task.key),
),
)
Expand Down
Loading