burhanrashid52 / WhatTodo

A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates
Apache License 2.0
1.19k stars 275 forks source link

Exchangeable backends #30

Open nightscape opened 3 years ago

nightscape commented 3 years ago

Hi @burhanrashid52,

I'm currently in the process of switching from Todoist to org-mode as project management solution. One thing where org-mode is a bit behind is a good-looking UI for Android. There's orgzly and it does its job, but it's far from being intuitive. Now I'm wondering if it would be possible to use WhatTodo as a frontend to org-mode. In order to do that, one would have to hide the current *Database classes behind abstract classes and provide another implementation of those classes using org-mode (potentially based on code from orgro).

I'm not a 100% how much effort this would be and if I want to invest the effort, but I wanted to ask in advance if this is a direction you could see the project evolving to, i.e. WhatTodo being really nice UI for different "storage mechanisms", with a built-in DB being the default.

nightscape commented 3 years ago

Another interesting option might be to use something like Firebase Cloud Firestore to turn this app into a collaborative one, which would almost make it a replacement for Todoist.

burhanrashid52 commented 3 years ago

@nightscape Yes. I agree with you and I am also looking forward in the same direction. Instead of a concrete class, it should expose the abstract class. This will allow us to swipe the data source. Ex Firebase. We can have different implementations for each platform as well. A good starting point to learn this is from flutter_architecture_samples where they have different implementation of TodoRepository.

burhanrashid52 commented 3 years ago

I will be happy to see a PR on this :) Let me know if you want to discuss more. We can move this into GitHub discussion.

nightscape commented 3 years ago

The flutter_architecture_samples are exactly what I had in mind! Down to the point where they have a ReactiveTodosRepository which streams the current Todos and therefore allows for real-time updates.