smf_flutter_core 0.3.0
smf_flutter_core: ^0.3.0 copied to clipboard
The module that creates the Flutter app every SMF app starts from, with its Android and iOS projects, main(), start-up and root widget.
The Flutter app that every SMF app starts from #
flutter_core is part of every app that the SMF CLI generates, so you never choose it. Without -m, an app has this module alone:
dart pub global activate smf_flutter_cli
smf create my_app --no-input
smf create adds it by itself and says why:
Adding flutter_core: the only provider of the app entry role, which every app needs.
The module writes the Android and iOS projects that flutter create writes, pubspec.yaml, analysis_options.yaml, the README of the app and this code:
lib/app.dart
lib/bootstrap.dart
lib/core/app/fallback_start_screen.dart
lib/main.dart
test/core/app/fallback_start_screen_test.dart
main() runs bootstrap() before the first frame. Other modules put their start-up code into bootstrap(), such as the start of Firebase, and their wrappers around the root widget, such as the ProviderScope of Riverpod:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await bootstrap();
runApp(const App());
}
The documentation has more on the flutter_core module and on the files of a generated app.