smf_flutter_cli 0.5.1
smf_flutter_cli: ^0.5.1 copied to clipboard
The smf command of Say My Frame: generates Flutter apps from independent modules, such as a router, tabs, sign-in, dependency injection, state management and Firebase.
SMF Flutter CLI #
smf generates Flutter apps from independent modules. You pick what the app needs, such as a router, tabs at the bottom, sign-in, dependency injection, a state manager, Firebase or a start screen, and smf create generates a Flutter project in which these parts already work together. The project does not depend on SMF at run time, so its code is yours from the first commit.

With the modules onboarding, sign_in, home, bottom_tabs, material_theme and gen_l10n, the app opens on an onboarding and then asks the user to sign in. It has a start screen, an account screen, a settings screen with a theme mode and a language, and a light and a dark theme:

sign_in needs a Firebase project for its accounts. The other modules of this app need none.
SMF generates apps for Flutter 3.44 or newer and Dart 3.12 or newer. It is tested on macOS, Linux and Windows.
The documentation is at doc.saymyframe.com.
Install #
dart pub global activate smf_flutter_cli
smf --version
smf create uses the Flutter SDK of the flutter on your PATH.
Create an app #
In a terminal, smf create asks for what the command line does not give: the name of the app, its organization and its modules:
smf create
With the modules on the command line and --no-input, it asks nothing:
smf create my_app --org com.example -m home,bottom_tabs,get_it,bloc --no-input
smf create adds the modules that the chosen ones need, such as go_router for the start screen of home. The main options:
| Option | What it does |
|---|---|
-m, --modules |
The modules, separated by commas. |
--org |
The organization in reverse domain notation, com.example by default. |
-o, --output |
The directory in which the app's directory is created. |
--no-input |
Ask nothing; everything comes from the options. |
--explain |
Print what would be generated and whether the machine is ready, then stop. |
--strict |
Stop instead of leaving out a module that cannot work in the app. |
--skip-external-setup |
Never install tools, log in or configure external services. |
--on-conflict |
What to do when the app's directory exists and is not empty: prompt, replace, copy or cancel. |
--start |
The full path of the screen the app starts on, such as /home. |
--locales |
The languages of the app among those that the texts of its modules are in, such as en,uk. All of them by default. |
--auth-mode |
Who may use the app without an account: nobody (required, the default), everyone (guest), or everyone as an anonymous user (anonymous). |
smf create exits with 0 on success, 1 when generation failed, 64 for a wrong command line, 70 for an unexpected error and 130 when you cancel it. The reference of smf create has the details.
Modules #
| Module | What it adds to the app |
|---|---|
flutter_core |
The Flutter project for Android and iOS, main(), the start-up, the root widget, and the screen that an app shows while it has no screen to start on. Every app has it. |
go_router |
Routes and a typed navigation facade, with go_router. |
bottom_tabs |
The main navigation as tabs in a bar at the bottom. |
home |
A start screen that welcomes the developer of the app, with the name of the app and the next steps. |
settings |
A settings screen with the settings of the modules of the app in one group, a row for each. |
onboarding |
An onboarding that a new user goes through on the first launch, before every other screen. |
material_theme |
A light and a dark Material 3 theme with a palette and a bundled font, and the theme mode that the user selects, which the app remembers. |
bloc |
State management with flutter_bloc. |
riverpod |
State management with flutter_riverpod. |
gen_l10n |
Localization with gen-l10n of Flutter: the texts of the modules in ARB files, one for each language of the app. |
get_it |
Dependency injection: the services of the modules, registered in get_it. |
event_bus |
Events between parts of the app that do not know each other, with event_bus. |
shared_preferences |
The settings of the app that are no secret, such as the theme mode, remembered between its launches with shared_preferences. |
firebase_core |
Firebase, set up with flutterfire configure after generation. |
firebase_crashlytics |
Crash reporting with Firebase Crashlytics. |
firebase_analytics |
Analytics with Firebase Analytics and, with a router, a screen view for each screen the user sees. |
firebase_auth |
Sign-in with Firebase Authentication: an email address and a password, or an anonymous user. The sign-in methods are enabled in the Firebase project after generation. |
sign_in |
Screens of sign-in, sign-up and password reset with an email address and a password, and the screen of the account with its entry on the settings screen, with BLoC or with Riverpod. |
A module knows only the modules it depends on. A screen needs a router, not go_router, and analytics follows the screens of whichever router the app has. SMF calls these shared parts roles: a module that needs a role works with every module that provides it. You can also write modules of your own, and a command of your own with them; see Extending SMF.
Support #
- Discord: saymyframe.com/discord
- Issues: GitHub Issues
- Email: support@saymyframe.com
