Skip to main content

Say My Frame

Say My Frame (SMF) generates Flutter apps from independent modules. You choose what the app needs, such as a router, tabs at the bottom, dependency injection, a state manager, Firebase services or screens, and smf create generates a Flutter project in which these pieces already work together. The routes of the screens are in the router, the tabs show the screens, the services are registered in the container, and the start-up code runs in the right order.

dart pub global activate smf_flutter_cli
smf create my_app -m home,bottom_tabs,get_it,bloc

The same modules, picked by answering the questions of smf create in a terminal.

What you get is a regular Flutter project. It does not depend on SMF at run time, and nothing in it has to be generated again, so the code is yours from the first commit.

Why modules​

A module is one piece of an app, such as the router or the analytics, and modules do not know about each other. A module that shows screens says that it needs a router, without knowing that the router is go_router. The analytics module can follow the screens the user sees when the app has a router, whichever router it is. SMF calls these shared parts roles, and more than one module can provide the same role.

That is why any combination works: you can add or leave out a module, or swap one provider of a role for another, and the app still compiles. Continuous integration generates apps from the modules in many combinations and checks each one with flutter analyze.

The modules​

RoleModules that provide itHow many in an app
App entryflutter_corealways one
Routergo_routernone or one
Layoutbottom_tabsnone or one
State managementbloc, riverpodnone or one
Dependency injectionget_itnone or one
Eventsevent_busnone or one
Crash reportingfirebase_crashlyticsany number
Analyticsfirebase_analyticsany number

Two modules provide no role: the feature home, a start screen, and firebase_core, which sets up Firebase for the other Firebase modules.

Status​

SMF generates apps for Flutter 3.44 or newer and Dart 3.12 or newer. It is tested on macOS, Linux and Windows.

Where to go next​