Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

MSWS Flutter architecture starter

msws_starter

Module Service Widget Screen Flutter architecture project starter.

For examples visit Example project

Main abstractions

Main 5 types of abstractions.

Modules

FP-like modules of stateless functions that are expressed through static members of abstract classes. They are intended to contain all business logic functionality and are easy to use inside isolates. They have maximum referential transparency and their side effects do not modify state and are limited to database modification, terminal output, POST requests, and similar.

Providers

Similar to Modules, but provide static global data instead of functions: instances of widgets, UI constants, assets, or filled data models. They are used in every other abstraction type.

Services

Common stateful services that are expressed through classes that are registered in Arctium, they use Modules and manipulate data. They contain public ValueNotifier getters and use value_extensions to provide derived states.

Screens

Main widgets of screens, expressed through Arctium’s Injector widget. They bind the screen service’s lifecycle to their own and provide its instance down the Widget tree. They do not contain an internal state.

Widgets

Immutable and stateless Widgets that reflect Service’s state. They are expressed through StatelessWidgets / Arctium’s LocatorWidgets and contain bindings to service’s state fields.

Chart

Download Flutter architecture starter source code on GitHub

https://github.com/purplenoodlesoop/msws_starter
Exit mobile version