app built
minimalist todo planner app built around the idea of efficiency and clean aesthetic.
showcase
development
deer uses bloc (business logic component) pattern to manage app state. if you want to use streams in your flutter project, then i think this is the way to go. bloc plays exceptionally well with flutter’s reactive nature, especially since flutter has built-in streambuilder
widget.
each screen is splitted into 4 files:
- actions
- bloc
- screen (ui itself)
- state
instead of calling setstate()
in screen file, an action is pushed to bloc’s input stream<action>
.
then, bloc resolves that action and updates the output stream<state>
. every state update is listened to inside screen with streambuilder
, which updates the ui when needed. this way we achieve clear separation of concerns.
usually with bloc, sink
is used for input stream, and behaviorsubject
for output stream.
check those resources for more details on the pattern:
using built_value
flutter packages pub run build_runner build --delete-conflicting-outputs
Comments are closed.