kamilgadek / to_do_list_kamilg

1 stars 0 forks source link

TasksRepository uses LocalStorage #53

Open mszakacz opened 6 days ago

mszakacz commented 6 days ago

As we discussed during our call, we don't want to use LocalStorage directly in the app. We treat it as Data Layer so the app should not connect with this layer directly. Instead, repository layer should connect with LocalStorage

Step by step 1) Refactor LocalStorage initialization - create constructor, similar like you did with models 2) init localStorage in main (you've already done it but do it other way, using constructor) 3) pass localStorage instance to the TasksRepository in main 4) add local_storage as dependency in tasks_repository package pubspec.yaml 5) in TasksRepository create a methods: getTasks, addTask in which you will use localStotage methods