diff --git a/README.md b/README.md index 54e13e6..b62b13c 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,18 @@ A Reminder based on todo.txt synced via nextcloud -## Getting Started +## Current todos: -This project is a starting point for a Flutter application. +- make repeat-datatype (like: daily, weekly on mo/th/fr, bi-monthly, etc.) +- add interface for repeat-datatype in addReminder.dart +- save/load data to/from disk +- add Nextcloud-login for getting a Token +- use webdav for synchronizing with Nextcloud using that token -A few resources to get you started if this is your first Flutter project: +## Current looks: -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) +### Main Widget +![](img/2023-01-08_application.png) -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +### Adding Tasks +![](img/2023-01-08_addTask.png) \ No newline at end of file diff --git a/img/2023-01-08_addTask.png b/img/2023-01-08_addTask.png new file mode 100644 index 0000000..c55c056 Binary files /dev/null and b/img/2023-01-08_addTask.png differ diff --git a/img/2023-01-08_application.png b/img/2023-01-08_application.png new file mode 100644 index 0000000..db77213 Binary files /dev/null and b/img/2023-01-08_application.png differ diff --git a/lib/addReminder.dart b/lib/addReminder.dart index a98907d..82785fc 100644 --- a/lib/addReminder.dart +++ b/lib/addReminder.dart @@ -11,12 +11,13 @@ class AddTaskWidget extends StatefulWidget { State createState() => _AddTaskWidgetState(); } +//TODO: make _repeat changeable. + class _AddTaskWidgetState extends State with RestorationMixin { final _formKey = GlobalKey(); final _titleController = TextEditingController(); final int _repeat = 1; final RestorableDateTime _beginDate = RestorableDateTime(DateTime.now()); - final _dateTextField = const TextField(); @override void dispose() { @@ -67,10 +68,6 @@ class _AddTaskWidgetState extends State with RestorationMixin { if (newSelectedDate != null) { setState(() { _beginDate.value = newSelectedDate; - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text( - 'Selected: ${_beginDate.value.day}/${_beginDate.value.month}/${_beginDate.value.year}'), - )); }); } } @@ -126,7 +123,7 @@ class _AddTaskWidgetState extends State with RestorationMixin { const SnackBar(content: Text('Task added.')), ); widget.onSave(RepeatingTask( - title: _titleController.text, begin: _beginDate.value)); + title: _titleController.text, begin: _beginDate.value, repeat: _repeat,)); Navigator.pop(context); } },