Snippets class

Reusable code snippets shared across architecture templates.

Anything that is identical or near-identical between the clean / mvvm / feature-first / simple template sets lives here, parameterized by the pieces that actually differ (folder paths, import locations, class and provider names). Architecture templates compose these instead of copy-pasting the same Dart source.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

appConfig({required String title, required List<String> flavors}) String
app_config.dart — the Flavor enum + AppConfig value object holding per-flavor settings (app name, API base URL, bundle suffix), plus the active AppConfig.current set at startup by the entry point.
appRouter({required String name, required String homeImport, required String homeWidget}) String
The go_router config with a single home route.
appWidget({required String name, required String title, required String themeImport, required String routerImport, String? configImport}) String
lib/app.dart — the MaterialApp.router wrapper.
dioClient({String? name, String? configImport}) String
The Dio HTTP client provider.
flavorEntryPoint({required String name, required String flavor, required String configImport, String? storageImport}) String
A flavored entry point — lib/main_<flavor>.dart. Selects the flavor's config via AppConfig.current, then runs the shared MyApp.
flavorFiles({required String name, required String title, required String configDir, required List<String> flavors, String? storageImport}) Map<String, String>
The extra files a flavored project adds on top of the base architecture files: the shared app_config.dart plus one entry point per flavor. Keyed by path relative to the project root, matching the architecture maps.
homeScreen({required String name, required String title, required String designDir, required String className, required String providerName, List<String> providerImports = const [], String inlineProvider = ''}) String
The home screen / view — a ConsumerWidget rendering an AsyncValue.when body. The watched provider must expose an object with title and subtitle String fields.
mainDart(String name, {String? storageImport}) String
lib/main.dart.
welcomeModel(String className) String
A plain Equatable data model with title + subtitle.