forestTreesTagging icon indicating copy to clipboard operation
forestTreesTagging copied to clipboard

Refactor code to use Provider Architecture

Open sameeerkashyap opened this issue 4 years ago • 5 comments

Feature request:

On the course the current code is headed, it can get really messy to manage state and other code. It'd be best if architecture is implemented when the code hasn't grown too much yet.

I'd like to propose using the Provider package with ChangeNotifier as this is beginner-friendly and least complex to implement.

The Tasks of this issue would be

  • Adding provider package and creating a MultiProvider using ChangeNotifier for any state.
  • Create a ChangeNotifier for handling Authentication and move auth logic into that.

Since we'll be having multiple services as this app demands so, we will use getIt package for easy singleton access across the app.

  • Refactor any service class to use GetIt.

This issue can of course be split up as it'll be a lot of code refactoring to be done by two people

sameeerkashyap avatar Apr 12 '21 05:04 sameeerkashyap

Can we use Bloc state management @Sameerkash?

Mohitmadhav avatar May 12 '21 11:05 Mohitmadhav

@Mohitmadhav I think Bloc would make it necessarily complicated. Provider would be preferred.

sameeerkashyap avatar May 14 '21 01:05 sameeerkashyap

Can I work on this issue? I can solve this issue using provider

Priyanshu078 avatar Oct 23 '21 15:10 Priyanshu078

@Sameerkash

Priyanshu078 avatar Oct 23 '21 15:10 Priyanshu078

Hi, is there anyone working on this issue? if not then can I work on this.

Runner-Shane avatar Apr 07 '22 11:04 Runner-Shane