Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

effective todo

a lightweight & effective todo app made with flutter. supports english and korean.

effective todo

usage for effective todo

you can build and run effective todo by yourself. you’ll need git, flutter,and android studio installed first. after that, download this project by running command:

$ giantsol/blue-diary.git

open cloned directory with android studio and it’ll notify you to run packages get to install dependencies. do that.

lastly, when you try to run the project by pressing run button at the top, build will fail because this app uses sendgrid to send emails in settingsbloc file, and sendgrid_authorization constant isn’t git-controlled.

you can solve this in 2 ways:

  1. you can follow sendgrid guide and assign your own token to sendgrid_authorization constant:
// create lib/secrets.dart file
const sendgrid_authorization = 'bearer <<your api key>>';
  1. just replace sendgrid_authorizaton to ''. in this case, email sending won’t function, but other app functions will work just fine. in settingsbloc file:
headers: {
  httpheaders.authorizationheader: sendgrid_authorization,
  httpheaders.contenttypeheader: 'application/json',
},

replace above code with below:

headers: {
  httpheaders.authorizationheader: '',
  httpheaders.contenttypeheader: 'application/json',
},

press run button again, and it should build fine.

if you still can’t run it, please leave feedback!

architecture

this app is based on bloc pattern, together with my own architectural practices.

inside the lib folder, there are three main folders:

  1. data: this folder contains dart files that actually update/fetch data from preferences, databases, or network (although we don’t use network here). most of the files here are implementations of repository interface declared in domain/repository folder.
  2. domain: this folder contains the so called ‘business logic’ of this app. it is further divided into three main folders:
    • entity: contains pure data classes such as todo and category.
    • repository: contains interfaces defining functions that update/fetch data. actual implementations are located in data folder.
    • usecase: contains per-screen business logics that utilizes several repositories to achieve each screen’s needs. this is the layer that presentation has access to to utilize app data. for instance, weekscreen uses (well, actually weekbloc uses) weekusecases to interact with data underneath without directly touching repositories.
  3. presentation: this folder contains screens, blocs and states that are used to display ui. it is divided into further directories that correspond to each screens in the app.
    • **screen: where widget’s build method is called to build the actual ui shown to the user. ui is determined by values inside state, and any interactions users make (e.g. clicking a button) are delegated to corresponding blocs.
    • **bloc: what this basically does is “user does something (e.g. click a button)” -> “set/get data using corresponding usecase and update the values inside state obect” -> “notify screen that state has changed and you have to rebuild”.
    • **state: holds all the information screen needs to draw ui. for instance, currentdate, todos, and islocked kinds of things.

above three directories are divided to as closely follow uncle bob’s clean architecture pattern. any tackles, highly welcomed.

besides these directories are flat dart files inside lib folder:

  1. appcolors.dart: just simple color constants.
  2. delegators.dart: i used delegators when children needed to call parent’s methods. however, as i’ve become more familiar with flutter now, i guess ancestorstateoftype can just do that job… researching on it!
  3. dependencies.dart: contains singleton objects such as repositories and usecases. basically, it enables a very simple injection pattern like dependencies.weekusecases as in weekbloc.dart.
  4. localization.dart: where localization texts are declared.
  5. main.dart: the main entry point of this app.
  6. utils.dart: utils (duh).

if you have any questions on why the heck i’ve done something strange, or have any suggestions to make this app better, please do contact me as shown in feedback. thank you!

download


get it on google play

ios version, not yet.


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.