As running of the code committed with this markdown document, we can see this result.
Which consists of these two widgets:
- Example of Flutter Hooks
- Counter's HookWidget refatored from StatefulWidget of Flutter skeleton
- Using of Flutter Hooks is to increase code-sharing between widgets by removing duplicates.
- There are existing hooks in the package so use them to simplify code.
- Example of Riverpod
- UserList's ConsumerWidget is to show how to wire a provider("userspod") to UI.
- Using of Riverpod is the essense of this template app as example code listed below.
- Study the package to use it properly. It has a learning curve.
Next, we'll add app's declarative routes with go_router. Stay tuned for more!