Closed D-Ajay-Kumar closed 3 years ago
Can I work on this issue?
Umm... I created the issue so I guess I should be assigned to it if it gets accepted. Maybe you can find some other issue to work on?
Sure @D-Ajay-Kumar, this issue will be assigned to you, but before that, we need to cover up the UI and API part. I'll create an issue for API soon.
Sure @D-Ajay-Kumar, this issue will be assigned to you, but before that, we need to cover up the UI and API part. I'll create an issue for API soon.
Also, we need to discuss that we will be using Provider only for the architecture. As there numerous other state management techniques like BLoC, Redux, get_it or a flavor of Provider like Stacked, my personal favorite.
@Rishabh510 I prefer provider as of now, because we don't have much complex features in the app.
@D-Ajay-Kumar would you like to work on this? If so, let me know. we'll discuss the issue in details
Feature Request ✨
Introducing provider package and managing state correctly and passing data following good practices.
Use Case
When real data would be added, the provider package and the products provider class would help managing the state easily.
Possible Solution
Adding the provider package for state management. Cleaning the code by passing objects between widgets and not attributes of the model.
Context
The current code doesn't have any state management solution and adding it now would make things very easy in the future else a lot of code would be needed to change and replace for state management.
Detailed Description
Currently the products list is in the constants file and is accessed from there. I want to introduce the provider package, create a new products provider class with change notifier and shift the dummy products list there and manage the state of the app using this products provider class.
Apart from that, currently all the attributes of a product are individually passed to widgets like products card and product screen, which renders the product model moot. I want to clear that code and make the widgets share objects instead of all attributes individually.
I would like to start working on this issue if it gets approved. I am also a participant in GSSOC'21.