Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.43 KB

06_hooks_and_riverpod.md

File metadata and controls

35 lines (22 loc) · 1.43 KB

Flutter Hooks / Riverpod

As running of the code committed with this markdown document, we can see this result. updated app UI

Which consists of these two widgets:

Counter

  • 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.

User List

  • 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.

UserList Data Flow

Next, we'll add app's declarative routes with go_router. Stay tuned for more!