create-flutterinit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.ts +3 -0
- package/package.json +46 -0
- package/templates/base/.cursor/rules/flutter-project.mdc.hbs +132 -0
- package/templates/base/AGENTS.md.hbs +137 -0
- package/templates/base/DESIGN.md.hbs +149 -0
- package/templates/base/README.md.hbs +19 -0
- package/templates/base/SETUP.md.hbs +253 -0
- package/templates/base/analysis_options.yaml +88 -0
- package/templates/base/assets/.keep +1 -0
- package/templates/base/assets/icons/apple.svg +1 -0
- package/templates/base/assets/icons/facebook.svg +1 -0
- package/templates/base/assets/icons/google.svg +1 -0
- package/templates/base/assets/images/.gitkeep +0 -0
- package/templates/base/flutter_native_splash.yaml.hbs +8 -0
- package/templates/base/lib/main.dart.hbs +43 -0
- package/templates/base/lib/src/app.dart.hbs +105 -0
- package/templates/base/lib/src/config/app_config.dart.hbs +112 -0
- package/templates/base/lib/src/extensions/collection_extension.dart.hbs +55 -0
- package/templates/base/lib/src/extensions/context_extension.dart.hbs +167 -0
- package/templates/base/lib/src/extensions/date_time_extension.dart.hbs +40 -0
- package/templates/base/lib/src/extensions/extensions.dart.hbs +6 -0
- package/templates/base/lib/src/extensions/num_extension.dart.hbs +14 -0
- package/templates/base/lib/src/extensions/string_extension.dart.hbs +91 -0
- package/templates/base/lib/src/extensions/widget_extension.dart.hbs +47 -0
- package/templates/base/lib/src/imports/core_imports.dart.hbs +50 -0
- package/templates/base/lib/src/imports/imports.dart.hbs +2 -0
- package/templates/base/lib/src/imports/packages_imports.dart.hbs +110 -0
- package/templates/base/lib/src/routing/(isGetX)@app_bindings.dart.hbs +23 -0
- package/templates/base/lib/src/routing/app_router.dart.hbs +252 -0
- package/templates/base/lib/src/routing/app_routes.dart.hbs +46 -0
- package/templates/base/lib/src/routing/global_navigator.dart.hbs +15 -0
- package/templates/base/lib/src/services/auth_service.dart.hbs +78 -0
- package/templates/base/lib/src/services/copy_service.dart.hbs +16 -0
- package/templates/base/lib/src/services/internet_connection_service.dart.hbs +10 -0
- package/templates/base/lib/src/services/services.dart.hbs +45 -0
- package/templates/base/lib/src/shared/app_assets.dart.hbs +15 -0
- package/templates/base/lib/src/shared/enums/app_status.dart.hbs +40 -0
- package/templates/base/lib/src/shared/enums/button_enums.dart.hbs +22 -0
- package/templates/base/lib/src/shared/enums/enums.dart.hbs +3 -0
- package/templates/base/lib/src/shared/enums/snack_bar_type.dart.hbs +22 -0
- package/templates/base/lib/src/shared/helpers/format_number.dart.hbs +18 -0
- package/templates/base/lib/src/shared/helpers/imports.dart.hbs +3 -0
- package/templates/base/lib/src/shared/helpers/show_app_sheet.dart.hbs +42 -0
- package/templates/base/lib/src/shared/helpers/show_dialog.dart.hbs +49 -0
- package/templates/base/lib/src/shared/helpers/show_toast.dart.hbs +92 -0
- package/templates/base/lib/src/shared/hooks/hooks.dart.hbs +13 -0
- package/templates/base/lib/src/shared/hooks/use_copy.dart.hbs +41 -0
- package/templates/base/lib/src/shared/hooks/use_timer.dart.hbs +158 -0
- package/templates/base/lib/src/shared/shared.dart.hbs +12 -0
- package/templates/base/lib/src/shared/widgets/app_button.dart.hbs +144 -0
- package/templates/base/lib/src/shared/widgets/app_card.dart.hbs +126 -0
- package/templates/base/lib/src/shared/widgets/app_divider.dart.hbs +88 -0
- package/templates/base/lib/src/shared/widgets/app_empty_state.dart.hbs +73 -0
- package/templates/base/lib/src/shared/widgets/app_error_widget.dart.hbs +69 -0
- package/templates/base/lib/src/shared/widgets/app_icon.dart.hbs +25 -0
- package/templates/base/lib/src/shared/widgets/app_loading.dart.hbs +54 -0
- package/templates/base/lib/src/shared/widgets/app_text_field.dart.hbs +89 -0
- package/templates/base/lib/src/shared/widgets/app_top_bar.dart.hbs +105 -0
- package/templates/base/lib/src/shared/widgets/common_image.dart.hbs +120 -0
- package/templates/base/lib/src/shared/widgets/toast/imports.dart.hbs +4 -0
- package/templates/base/lib/src/shared/widgets/toast/raw_toast.dart.hbs +109 -0
- package/templates/base/lib/src/shared/widgets/toast/toast.dart.hbs +142 -0
- package/templates/base/lib/src/shared/widgets/toast/toast_card.dart.hbs +57 -0
- package/templates/base/lib/src/shared/widgets/widgets.dart.hbs +14 -0
- package/templates/base/lib/src/shared/wrappers/(isRiverpod,isProvider,isBloc,isGetX,isMobX)@state_wrapper.dart.hbs +51 -0
- package/templates/base/lib/src/shared/wrappers/(supportsLocalization)@localization_wrapper.dart.hbs +25 -0
- package/templates/base/lib/src/shared/wrappers/(usesScreenutil)@screen_util_wrapper.dart.hbs +27 -0
- package/templates/base/lib/src/shared/wrappers/(usesSkeletonizer)@skeleton_wrapper.dart.hbs +81 -0
- package/templates/base/lib/src/shared/wrappers/session_listener_wrapper.dart.hbs +258 -0
- package/templates/base/lib/src/shared/wrappers/wrappers.dart.hbs +15 -0
- package/templates/base/lib/src/theme/app_borders.dart.hbs +70 -0
- package/templates/base/lib/src/theme/app_curves.dart.hbs +69 -0
- package/templates/base/lib/src/theme/app_durations.dart.hbs +48 -0
- package/templates/base/lib/src/theme/app_shadows.dart.hbs +73 -0
- package/templates/base/lib/src/theme/app_spacing.dart.hbs +80 -0
- package/templates/base/lib/src/theme/color_schemes.dart.hbs +126 -0
- package/templates/base/lib/src/theme/text_theme.dart.hbs +167 -0
- package/templates/base/lib/src/theme/theme.dart.hbs +431 -0
- package/templates/base/lib/src/theme/theme_constants.dart.hbs +20 -0
- package/templates/base/lib/src/utils/app_utils.dart.hbs +46 -0
- package/templates/base/lib/src/utils/debouncer.dart.hbs +31 -0
- package/templates/base/lib/src/utils/error_handler.dart.hbs +14 -0
- package/templates/base/lib/src/utils/failure.dart.hbs +30 -0
- package/templates/base/lib/src/utils/input_formatters.dart.hbs +27 -0
- package/templates/base/lib/src/utils/logger.dart.hbs +37 -0
- package/templates/base/lib/src/utils/platform_info.dart.hbs +13 -0
- package/templates/base/lib/src/utils/task_runner.dart.hbs +42 -0
- package/templates/base/lib/src/utils/typedefs.dart.hbs +6 -0
- package/templates/base/lib/src/utils/utils.dart.hbs +9 -0
- package/templates/base/pubspec.yaml.hbs +256 -0
- package/templates/base/test/widget_test.dart.hbs +56 -0
- package/templates/overlays/architecture/clean/architecture.md +6 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/data/models/user_model.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/data/repositories/auth_repository_impl.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/domain/entities/user.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/domain/repositories/auth_repository.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isBloc)@auth_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isBloc)@session_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isGetX)@auth_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isGetX)@session_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isMobX)@auth_store.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isMobX)@session_store.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isNoneState)@session_manager.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isProvider,isRiverpod)@auth_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isProvider,isRiverpod)@session_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/screens/forgot_password_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/screens/login_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/screens/signup_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/home/presentation/screens/home_page.dart.hbs +1 -0
- package/templates/overlays/architecture/clean/lib/src/features/onboarding/presentation/screens/onboarding_page.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/architecture.md +5 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/data/models/user_model.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/data/repositories/auth_repository_impl.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/domain/entities/user.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/domain/repositories/auth_repository.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isBloc)@auth_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isBloc)@session_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isGetX)@auth_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isGetX)@session_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isMobX)@auth_store.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isMobX)@session_store.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isNoneState)@session_manager.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isProvider,isRiverpod)@auth_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isProvider,isRiverpod)@session_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/screens/forgot_password_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/screens/login_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/screens/signup_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/home/presentation/screens/home_page.dart.hbs +1 -0
- package/templates/overlays/architecture/feature-first/lib/src/features/onboarding/presentation/screens/onboarding_page.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/architecture.md +6 -0
- package/templates/overlays/architecture/layer-first/lib/src/data/datasources/local/.gitkeep +0 -0
- package/templates/overlays/architecture/layer-first/lib/src/data/datasources/remote/.gitkeep +0 -0
- package/templates/overlays/architecture/layer-first/lib/src/data/models/user_model.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/data/repositories/auth_repository_impl.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/domain/entities/user.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/domain/repositories/auth_repository.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/domain/usecases/auth/.gitkeep +0 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isBloc)@auth_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isBloc)@session_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isGetX)@auth_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isGetX)@session_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isMobX)@auth_store.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isMobX)@session_store.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isNoneState)@auth_view_model.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isNoneState)@session_manager.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isProvider,isRiverpod)@auth_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isProvider,isRiverpod)@session_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/auth/forgot_password_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/auth/login_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/auth/signup_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/home/home_page.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/onboarding/onboarding_page.dart.hbs +1 -0
- package/templates/overlays/architecture/layer-first/lib/src/presentation/widgets/.gitkeep +0 -0
- package/templates/overlays/architecture/mvc/architecture.md +5 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isBloc)@auth_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isBloc)@session_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isGetX)@auth_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isGetX)@session_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isMobX)@auth_store.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isMobX)@session_store.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isNoneState)@session_manager.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isProvider,isRiverpod)@auth_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isProvider,isRiverpod)@session_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/models/user_model.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/services/auth_repository.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/services/auth_repository_impl.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/views/auth/forgot_password_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/views/auth/login_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/views/auth/signup_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/views/home/home_page.dart.hbs +1 -0
- package/templates/overlays/architecture/mvc/lib/src/views/onboarding/onboarding_page.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/architecture.md +6 -0
- package/templates/overlays/architecture/mvvm/lib/src/data/models/user_model.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/data/repositories/auth_repository.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/data/repositories/auth_repository_impl.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isBloc)@bloc/auth_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isBloc)@bloc/session_bloc.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isGetX)@controllers/auth_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isGetX)@controllers/session_controller.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isMobX)@stores/auth_store.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isMobX)@stores/session_store.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isNoneState)@view_models/auth_view_model.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isNoneState)@view_models/session_manager.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isProvider,isRiverpod)@providers/auth_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isProvider,isRiverpod)@providers/session_provider.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/forgot_password_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/login_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/auth/signup_screen.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/home/home_page.dart.hbs +1 -0
- package/templates/overlays/architecture/mvvm/lib/src/ui/onboarding/onboarding_page.dart.hbs +1 -0
- package/templates/overlays/backend/appwrite/lib/src/services/(usesAppwriteAuth)@auth_service.dart.hbs +101 -0
- package/templates/overlays/backend/custom/lib/src/services/auth_service.dart.hbs +158 -0
- package/templates/overlays/backend/firebase/lib/src/services/(usesFirebaseAuth)@auth_service.dart.hbs +96 -0
- package/templates/overlays/backend/supabase/lib/src/services/(usesSupabaseAuth)@auth_service.dart.hbs +97 -0
- package/templates/overlays/device/app_version_update/lib/src/services/(usesAppVersionUpdate)@version_update_service.dart.hbs +118 -0
- package/templates/overlays/device/device_info/lib/src/services/(usesDeviceInfoPlus)@device_info_service.dart.hbs +54 -0
- package/templates/overlays/extras/dotenv/.env.hbs +33 -0
- package/templates/overlays/extras/flavors/lib/src/flavors.dart.hbs +15 -0
- package/templates/overlays/extras/localization/assets/translations/en.json.hbs +47 -0
- package/templates/overlays/media/lib/src/services/(usesImagePicker,usesFilePicker)@media_service.dart.hbs +148 -0
- package/templates/overlays/networking/cached_image/lib/src/shared/widgets/app_cached_image.dart.hbs +160 -0
- package/templates/overlays/networking/dio/lib/src/services/(usesDio)@dio_service.dart.hbs +50 -0
- package/templates/overlays/networking/http/lib/src/services/(usesHttp)@http_service.dart.hbs +82 -0
- package/templates/overlays/storage/hive/lib/src/services/(usesHive)@hive_service.dart.hbs +59 -0
- package/templates/overlays/storage/secure_storage/lib/src/services/(usesSecureStorage)@secure_storage_service.dart.hbs +39 -0
- package/templates/overlays/storage/shared_preferences/lib/src/services/(usesSharedPreferences)@storage_service.dart.hbs +53 -0
- package/templates/overlays/utilities/geolocator/lib/src/services/(usesGeolocator)@location_service.dart.hbs +78 -0
- package/templates/overlays/utilities/path_provider/lib/src/services/(usesPathProvider)@path_service.dart.hbs +30 -0
- package/templates/overlays/utilities/permission_handler/lib/src/services/(usesPermissionHandler)@permission_service.dart.hbs +28 -0
- package/templates/overlays/utilities/permission_handler/lib/src/shared/hooks/use_permission.dart.hbs +44 -0
- package/templates/overlays/utilities/share_plus/lib/src/services/(usesSharePlus)@share_service.dart.hbs +22 -0
- package/templates/overlays/utilities/share_plus/lib/src/shared/hooks/use_share.dart.hbs +26 -0
- package/templates/overlays/utilities/url_launcher/lib/src/services/(usesUrlLauncher)@url_launcher_service.dart.hbs +37 -0
- package/templates/overlays/utilities/url_launcher/lib/src/shared/hooks/use_launch_url.dart.hbs +52 -0
- package/templates/partials/features/auth/auth_logic.hbs +611 -0
- package/templates/partials/features/auth/auth_repository.hbs +32 -0
- package/templates/partials/features/auth/auth_repository_impl.hbs +116 -0
- package/templates/partials/features/auth/forgot_password_screen.hbs +368 -0
- package/templates/partials/features/auth/login_screen.hbs +540 -0
- package/templates/partials/features/auth/session_provider.hbs +437 -0
- package/templates/partials/features/auth/signup_screen.hbs +511 -0
- package/templates/partials/features/auth/user_model.hbs +23 -0
- package/templates/partials/features/home/home_page.hbs +156 -0
- package/templates/partials/features/onboarding/onboarding_page.hbs +264 -0
- package/templates/partials/llm/add-feature-workflow.hbs +38 -0
- package/templates/partials/llm/architecture-rules.hbs +92 -0
- package/templates/partials/llm/backend-rules.hbs +30 -0
- package/templates/partials/llm/build-runner-note.hbs +15 -0
- package/templates/partials/llm/design-quick-ref.hbs +14 -0
- package/templates/partials/llm/design-quick-reference.hbs +14 -0
- package/templates/partials/llm/navigation-rules.hbs +27 -0
- package/templates/partials/llm/networking-rules.hbs +16 -0
- package/templates/partials/llm/packages-list.hbs +26 -0
- package/templates/partials/llm/services-conventions.hbs +20 -0
- package/templates/partials/llm/stack-summary.hbs +22 -0
- package/templates/partials/llm/state-management-rules.hbs +40 -0
- package/templates/partials/state_label.hbs +1 -0
package/bin/index.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-flutterinit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Scaffold production-ready Flutter projects from your terminal",
|
|
5
|
+
"bin": {
|
|
6
|
+
"create-flutterinit": "./bin/index.ts"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "bun run bin/index.ts",
|
|
10
|
+
"test": "bun test",
|
|
11
|
+
"build": "bun build ./bin/index.ts --outdir ./dist --target node",
|
|
12
|
+
"sync-templates": "bash ../scripts/sync-templates.sh"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/",
|
|
16
|
+
"templates/",
|
|
17
|
+
"bin/"
|
|
18
|
+
],
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@clack/prompts": "^1.5.1",
|
|
21
|
+
"handlebars": "latest",
|
|
22
|
+
"picocolors": "latest"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/bun": "latest",
|
|
26
|
+
"@types/handlebars": "latest",
|
|
27
|
+
"typescript": "latest"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"flutter",
|
|
31
|
+
"scaffold",
|
|
32
|
+
"cli",
|
|
33
|
+
"boilerplate",
|
|
34
|
+
"clean-architecture",
|
|
35
|
+
"riverpod",
|
|
36
|
+
"bloc",
|
|
37
|
+
"flutterinit"
|
|
38
|
+
],
|
|
39
|
+
"author": "Arjun Mahar <https://github.com/Arjun544>",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"homepage": "https://flutterinit.com",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://github.com/Arjun544/flutter_init"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: {{appName}} — FlutterInit stack, architecture, design conventions, and agent zones
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {{appName}} — Cursor project context
|
|
7
|
+
|
|
8
|
+
{{#if description}}{{description}}{{/if}}
|
|
9
|
+
|
|
10
|
+
Generated by FlutterInit. Package: `{{packageId}}`.
|
|
11
|
+
|
|
12
|
+
**Extended docs (read when changing setup or deep UI):**
|
|
13
|
+
|
|
14
|
+
- **[AGENTS.md](AGENTS.md)** — full agent guide (duplicate of sections below + packages list)
|
|
15
|
+
- **[DESIGN.md](DESIGN.md)** — complete design system
|
|
16
|
+
- **[SETUP.md](SETUP.md)** — env, Firebase/Supabase/Appwrite, native config, permissions
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
{{> llm/stack-summary}}
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
{{> llm/architecture-rules}}
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
{{> llm/state-management-rules}}
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
{{> llm/navigation-rules}}
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
{{#unless (eq backend.provider "none")}}
|
|
37
|
+
{{> llm/backend-rules}}
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
{{/unless}}
|
|
41
|
+
|
|
42
|
+
{{> llm/networking-rules}}
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
{{> llm/services-conventions}}
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
{{> llm/design-quick-reference}}
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
{{> llm/add-feature-workflow}}
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## File zones
|
|
59
|
+
|
|
60
|
+
### Safe to modify
|
|
61
|
+
|
|
62
|
+
| Path | Guidance |
|
|
63
|
+
|------|----------|
|
|
64
|
+
{{#if (or (eq architecture "clean") (eq architecture "feature-first"))}}| `lib/src/features/**` | Feature screens, widgets, domain/data/presentation |{{/if}}
|
|
65
|
+
{{#if (eq architecture "mvc")}}| `lib/src/views/**`, `lib/src/controllers/**` | UI and controllers |{{/if}}
|
|
66
|
+
{{#if (eq architecture "mvvm")}}| `lib/src/ui/**`, `lib/src/data/**` | UI and data for features |{{/if}}
|
|
67
|
+
{{#if (eq architecture "layer-first")}}| `lib/src/presentation/**`, `lib/src/domain/**`, `lib/src/data/**` | Layer slices |{{/if}}
|
|
68
|
+
| `lib/src/shared/widgets/**` | Shared UI components |
|
|
69
|
+
| `test/**` | Tests |
|
|
70
|
+
|
|
71
|
+
### Modify with caution
|
|
72
|
+
|
|
73
|
+
| Path | Why |
|
|
74
|
+
|------|-----|
|
|
75
|
+
| `lib/src/routing/app_router.dart` | All navigation |
|
|
76
|
+
| `lib/main.dart` | Init order (SDKs, dotenv, l10n) |
|
|
77
|
+
| `lib/src/config/app_config.dart` | Dio / SDK clients |
|
|
78
|
+
| `lib/src/theme/**` | Global design tokens |
|
|
79
|
+
| `lib/src/imports/**` | Barrel exports |
|
|
80
|
+
| `pubspec.yaml` | Dependencies |
|
|
81
|
+
{{#if flags.usesDotenv}}| `.env` | Secrets |{{/if}}
|
|
82
|
+
|
|
83
|
+
### Do not touch
|
|
84
|
+
|
|
85
|
+
| Path | Why |
|
|
86
|
+
|------|-----|
|
|
87
|
+
| `android/`, `ios/`, `web/`, desktop native trees | Platform config |
|
|
88
|
+
{{#if flags.usesDotenv}}| `.env` with production secrets | Security |{{/if}}
|
|
89
|
+
{{#if flags.usesFirebase}}| `google-services.json`, `GoogleService-Info.plist` | Firebase credentials |{{/if}}
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
{{> llm/packages-list}}
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Quick rules (always enforce)
|
|
98
|
+
|
|
99
|
+
- Import: `package:{{flags.appSlug}}/src/imports/imports.dart`
|
|
100
|
+
- Services: `ClassName.instance` + `runTask()` → `FutureEither<T>`; use `rootContext`, not `BuildContext` in services
|
|
101
|
+
- UI: `context.colors`, `context.textTheme`, `AppSpacing`, `AppBorders` — no hardcoded hex or magic padding
|
|
102
|
+
- Routes: only `lib/src/routing/app_router.dart`
|
|
103
|
+
- Network/backend: `lib/src/services/` + `app_config.dart` — never from widgets
|
|
104
|
+
- No second state-management or routing library
|
|
105
|
+
- No business logic in `build()`; no empty `catch` blocks
|
|
106
|
+
{{#if flags.isRiverpod}}- Riverpod: `ref.watch` in build only; `ref.read` in callbacks; no `@riverpod` codegen{{/if}}
|
|
107
|
+
{{#if flags.isBloc}}- Bloc: immutable state/events; delegate logic out of handlers{{/if}}
|
|
108
|
+
{{#if flags.isProvider}}- Provider: `watch` in build, `read` in callbacks{{/if}}
|
|
109
|
+
{{#if flags.isGetX}}- GetX: bindings; no GoRouter/AutoRoute mix{{/if}}
|
|
110
|
+
{{#if flags.isMobX}}- MobX: mutate via `@action`; run `build_runner` after store edits{{/if}}
|
|
111
|
+
{{#if flags.supportsLocalization}}- Copy: `easy_localization` + `assets/translations/*.json`{{/if}}
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Verify after changes
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
flutter pub get
|
|
119
|
+
flutter analyze
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
{{> llm/build-runner-note}}
|
|
123
|
+
|
|
124
|
+
{{#if flags.supportsLocalization}}
|
|
125
|
+
```bash
|
|
126
|
+
flutter pub run easy_localization:generate -S assets/translations -O lib/src/core/i18n -o locale_keys.g.dart
|
|
127
|
+
```
|
|
128
|
+
{{/if}}
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
flutter test
|
|
132
|
+
```
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Agent guide — {{appName}}
|
|
2
|
+
|
|
3
|
+
{{> llm/stack-summary}}
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
{{> llm/architecture-rules}}
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
{{> llm/state-management-rules}}
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
{{> llm/navigation-rules}}
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
{{#unless (eq backend.provider "none")}}
|
|
20
|
+
{{> llm/backend-rules}}
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
{{/unless}}
|
|
24
|
+
|
|
25
|
+
{{> llm/networking-rules}}
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
{{> llm/services-conventions}}
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
{{> llm/packages-list}}
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
{{> llm/add-feature-workflow}}
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Safe to modify
|
|
42
|
+
|
|
43
|
+
| Path | Guidance |
|
|
44
|
+
|------|----------|
|
|
45
|
+
{{#if (or (eq architecture "clean") (eq architecture "feature-first"))}}| `lib/src/features/**` | Feature screens, widgets, domain/data/presentation code |{{/if}}
|
|
46
|
+
{{#if (eq architecture "mvc")}}| `lib/src/views/**`, `lib/src/controllers/**` | UI and controllers for your features |{{/if}}
|
|
47
|
+
{{#if (eq architecture "mvvm")}}| `lib/src/ui/**`, `lib/src/data/**` | UI and data layer for your features |{{/if}}
|
|
48
|
+
{{#if (eq architecture "layer-first")}}| `lib/src/presentation/**`, `lib/src/domain/**`, `lib/src/data/**` | Layer slices for new behavior |{{/if}}
|
|
49
|
+
| `lib/src/shared/widgets/**` | Reusable UI components |
|
|
50
|
+
| `lib/src/shared/helpers/**` | App-wide helpers (when not generated-only) |
|
|
51
|
+
| `test/**` | Unit and widget tests |
|
|
52
|
+
| `README.md` | Project documentation |
|
|
53
|
+
|
|
54
|
+
## Modify with caution
|
|
55
|
+
|
|
56
|
+
| Path | Why |
|
|
57
|
+
|------|-----|
|
|
58
|
+
| `lib/src/routing/app_router.dart` | Central navigation — breaks deep links if wrong |
|
|
59
|
+
| `lib/main.dart` | Initialization order (Firebase, dotenv, localization, flavors) |
|
|
60
|
+
| `lib/src/config/app_config.dart` | SDK and HTTP client setup |
|
|
61
|
+
| `lib/src/theme/**` | Global visual system |
|
|
62
|
+
| `lib/src/imports/**` | Barrel exports — keep pattern consistent |
|
|
63
|
+
| `pubspec.yaml` | Dependency graph for the whole app |
|
|
64
|
+
{{#if flags.usesDotenv}}| `.env` | Secrets — never commit real values |{{/if}}
|
|
65
|
+
|
|
66
|
+
## Do not touch
|
|
67
|
+
|
|
68
|
+
| Path | Why |
|
|
69
|
+
|------|-----|
|
|
70
|
+
| `android/`, `ios/`, `web/`, desktop folders | Native project configuration |
|
|
71
|
+
{{#if flags.usesDotenv}}| `.env` with real secrets | Security |{{/if}}
|
|
72
|
+
{{#if flags.usesFirebase}}| `google-services.json`, `GoogleService-Info.plist` | Environment-specific credentials |{{/if}}
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Verification after changes
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
flutter pub get
|
|
80
|
+
flutter analyze
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
{{> llm/build-runner-note}}
|
|
84
|
+
|
|
85
|
+
{{#if flags.supportsLocalization}}
|
|
86
|
+
### Localization
|
|
87
|
+
|
|
88
|
+
After editing `assets/translations/*.json`:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
flutter pub run easy_localization:generate -S assets/translations -O lib/src/core/i18n -o locale_keys.g.dart
|
|
92
|
+
```
|
|
93
|
+
{{/if}}
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
flutter test
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
{{#if flags.usesPermissionHandler}}
|
|
102
|
+
## Native Permissions
|
|
103
|
+
|
|
104
|
+
This project uses `permission_handler` to manage runtime permissions.
|
|
105
|
+
|
|
106
|
+
Configured permissions:
|
|
107
|
+
{{#if flags.usesCamera}}- Camera and photo library (Android + iOS){{/if}}
|
|
108
|
+
{{#if flags.usesImagePicker}}- Image picker (camera + gallery access){{/if}}
|
|
109
|
+
{{#if flags.usesFilePicker}}- File system / document picker{{/if}}
|
|
110
|
+
{{#if flags.usesGeolocator}}- Location (fine + coarse on Android, WhenInUse + Always on iOS){{/if}}
|
|
111
|
+
{{#if flags.usesNotifications}}- Local notifications (POST_NOTIFICATIONS on Android 13+){{/if}}
|
|
112
|
+
|
|
113
|
+
### Permission Request Pattern
|
|
114
|
+
|
|
115
|
+
Always check permission status before requesting:
|
|
116
|
+
|
|
117
|
+
```dart
|
|
118
|
+
final status = await Permission.camera.status;
|
|
119
|
+
if (status.isDenied) {
|
|
120
|
+
await Permission.camera.request();
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Never request permissions on app launch. Request contextually — when the
|
|
125
|
+
user triggers the feature that needs the permission.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
{{/if}}
|
|
130
|
+
## Hard limits
|
|
131
|
+
|
|
132
|
+
- Do not disable `flutter_lints` rules without an explanatory comment.
|
|
133
|
+
- Do not call backend or networking code directly from widgets.
|
|
134
|
+
- Do not commit `.env` files containing production secrets.
|
|
135
|
+
- Do not introduce a second state-management or routing library.
|
|
136
|
+
- For platform setup and API keys, use **[SETUP.md](SETUP.md)**.
|
|
137
|
+
- For UI tokens and spacing, use **[DESIGN.md](DESIGN.md)**.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Design system — {{appName}}
|
|
2
|
+
|
|
3
|
+
This file documents the design conventions established at generation time. Consult it before changing UI code.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Theme overview
|
|
8
|
+
|
|
9
|
+
- **Preset:** `{{theme.preset}}`{{#if flags.isCupertino}} (Cupertino-style widgets where applicable){{/if}}
|
|
10
|
+
- **Material 3:** {{#unless flags.isCupertino}}Primary app chrome uses Material 3 theming in `lib/src/theme/theme.dart`.{{else}}Cupertino preset — still uses shared tokens from `lib/src/theme/`.{{/unless}}
|
|
11
|
+
- **Dark mode:** {{#if flags.hasDarkMode}}Light and dark themes are supported{{#if theme.darkMode.system}}; app can follow system brightness{{/if}}. Use semantic colors — do not branch on brightness in widgets for basic surfaces.{{else}}Light mode only — avoid hardcoded colors that will not adapt if dark mode is added later.{{/if}}
|
|
12
|
+
- **Customization:** Global `ThemeData` lives in `lib/src/theme/theme.dart` — avoid one-off `ThemeData` overrides in feature widgets.
|
|
13
|
+
|
|
14
|
+
{{#if theme.primaryColor}}
|
|
15
|
+
- **Seed color:** `{{theme.primaryColor}}` (used to derive `ColorScheme` via `ColorScheme.fromSeed` where applicable).
|
|
16
|
+
{{/if}}
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Color system
|
|
21
|
+
|
|
22
|
+
- Use `context.colors` (`ColorScheme`) for standard Material roles: `primary`, `onPrimary`, `secondary`, `surface`, `onSurface`, `error`, etc.
|
|
23
|
+
- Use `context.appColors` for semantic extensions: `success`, `warning`, `info`, and their `on*` / container variants (see `lib/src/theme/color_schemes.dart`).
|
|
24
|
+
- Definitions: `lib/src/theme/color_schemes.dart`, applied through `lib/src/theme/theme.dart`.
|
|
25
|
+
- **Do not** hardcode hex colors in widgets — use theme roles or `appColors`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Typography
|
|
30
|
+
|
|
31
|
+
- Use `context.textTheme` (alias `context.typography`) for all text styles.
|
|
32
|
+
- Roles follow Material 3: `display*`, `headline*`, `title*`, `body*`, `label*`.
|
|
33
|
+
{{#if flags.hasCustomFonts}}
|
|
34
|
+
### Custom fonts
|
|
35
|
+
|
|
36
|
+
Primary family: **{{flags.primaryFontFamily}}**
|
|
37
|
+
|
|
38
|
+
{{#each flags.fontFamilies}}
|
|
39
|
+
- **{{family}}** — {{fonts.length}} file(s) configured in `pubspec.yaml`{{#if @first}} (app-wide `fontFamily` when primary){{/if}}
|
|
40
|
+
{{/each}}
|
|
41
|
+
|
|
42
|
+
Do not set raw `fontFamily:` strings in widgets — use `textTheme` roles or theme configuration in `lib/src/theme/text_theme.dart`.
|
|
43
|
+
{{else}}
|
|
44
|
+
- No custom fonts uploaded — platform default typography (Roboto / SF Pro) via Material/Cupertino theme.
|
|
45
|
+
{{/if}}
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Spacing, borders, motion
|
|
50
|
+
|
|
51
|
+
Import tokens via `package:{{flags.appSlug}}/src/theme/theme_constants.dart`.
|
|
52
|
+
|
|
53
|
+
| Token class | Purpose |
|
|
54
|
+
|-------------|---------|
|
|
55
|
+
| `AppSpacing` | Padding, gaps (`xxs` … `xxxl`, plus `pagePadding`, `itemGap`, `cardPadding`) |
|
|
56
|
+
| `AppBorders` | Border radii (`xs` … `xl`, `button`, `card`, `input`, `dialog`, …) |
|
|
57
|
+
| `AppShadows` | Elevation shadows (`none`, `subtle`, `card`, `elevated`, `modal`) |
|
|
58
|
+
| `AppDurations` | Animation durations (`fast`, `normal`, `medium`, `slow`, …) |
|
|
59
|
+
| `AppCurves` | Standard curves (`standard`, `emphasized`, `pageEnter`, …) |
|
|
60
|
+
|
|
61
|
+
**Rules**
|
|
62
|
+
|
|
63
|
+
- Do not use magic numbers for padding — use `AppSpacing`.
|
|
64
|
+
- Do not use inline `BorderRadius.circular(n)` — use `AppBorders`.
|
|
65
|
+
- Prefer Material 3 tonal elevation on `Card` / `Surface` — custom shadows only via `AppShadows`.
|
|
66
|
+
|
|
67
|
+
{{#if flags.usesScreenutil}}
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Responsive scaling (ScreenUtil)
|
|
71
|
+
|
|
72
|
+
- `ScreenUtilInit` is already applied in the app wrapper — do not add another.
|
|
73
|
+
- Design size baseline: **390×844** (iPhone 14 class).
|
|
74
|
+
- In templates and new code, use the `res` convention: widths `.w`, heights `.h`, radius `.r`, font sizes `.sp` when ScreenUtil is enabled.
|
|
75
|
+
- ScreenUtil values are runtime — avoid `const` widgets that depend on `.w` / `.sp`.
|
|
76
|
+
{{else}}
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Responsive layout (no ScreenUtil)
|
|
80
|
+
|
|
81
|
+
- Use `MediaQuery`, `LayoutBuilder`, `Flexible`, and `Expanded` for responsiveness.
|
|
82
|
+
- Fixed pixel sizes are acceptable only for elements that should not scale (e.g. icon touch targets defined by tokens).
|
|
83
|
+
{{/if}}
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Context extensions
|
|
88
|
+
|
|
89
|
+
Defined in `lib/src/extensions/context_extension.dart`:
|
|
90
|
+
|
|
91
|
+
| Member | Use |
|
|
92
|
+
|--------|-----|
|
|
93
|
+
| `context.colors` | `ColorScheme` |
|
|
94
|
+
| `context.textTheme` / `context.typography` | Text styles |
|
|
95
|
+
| `context.appColors` | Semantic success/warning/info |
|
|
96
|
+
| `context.designTokens` | Theme extension tokens |
|
|
97
|
+
| `context.isDarkMode` | Brightness check |
|
|
98
|
+
| `context.width` / `context.height` | Screen size |
|
|
99
|
+
| `context.showAppDialog` | Dialog helper |
|
|
100
|
+
| `context.showTypedSnackBar` | Status snackbars |
|
|
101
|
+
|
|
102
|
+
Prefer these shortcuts over repeating `Theme.of(context)` in widgets.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Component conventions
|
|
107
|
+
|
|
108
|
+
- Reusable widgets belong in `lib/src/shared/widgets/`.
|
|
109
|
+
- Default style parameters to theme values, not hardcoded colors.
|
|
110
|
+
- Widget file names match the widget class (`primary_button.dart` → `PrimaryButton`).
|
|
111
|
+
- Do not read theme inside `const` constructors.
|
|
112
|
+
|
|
113
|
+
{{#if flags.hasDarkMode}}
|
|
114
|
+
### Dark mode checklist
|
|
115
|
+
|
|
116
|
+
- No raw `Colors.white` / `Colors.black` for surfaces — use `colorScheme` roles.
|
|
117
|
+
- Verify new screens in both light and dark theme.
|
|
118
|
+
{{/if}}
|
|
119
|
+
|
|
120
|
+
{{#if flags.supportsLocalization}}
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Localization
|
|
124
|
+
|
|
125
|
+
- User-visible strings use `easy_localization` — files in `assets/translations/`.
|
|
126
|
+
- Do not hardcode display strings in widgets.
|
|
127
|
+
- Add keys to JSON translation files, then run the generate command in **SETUP.md**.
|
|
128
|
+
- Use interpolation in JSON — do not concatenate translated strings in Dart.
|
|
129
|
+
{{/if}}
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Do / Don't
|
|
134
|
+
|
|
135
|
+
**Do**
|
|
136
|
+
|
|
137
|
+
- `context.colors` / `context.appColors` for color
|
|
138
|
+
- `context.textTheme` for typography
|
|
139
|
+
- `AppSpacing`, `AppBorders`, `AppShadows`, `AppDurations`, `AppCurves` for layout and motion
|
|
140
|
+
- `showAppDialog` and shared widgets for consistent UX
|
|
141
|
+
|
|
142
|
+
**Don't**
|
|
143
|
+
|
|
144
|
+
- Hardcode hex colors or arbitrary font families in widgets
|
|
145
|
+
- Magic padding/radius numbers
|
|
146
|
+
- Duplicate theme definitions per screen
|
|
147
|
+
- Bypass design tokens for one-off “quick” UI
|
|
148
|
+
|
|
149
|
+
For agent workflows and architecture boundaries, see **[AGENTS.md](AGENTS.md)**.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# {{appName}}
|
|
2
|
+
|
|
3
|
+
Generated with the Flutter Scaffolding Wizard.
|
|
4
|
+
|
|
5
|
+
## What's inside
|
|
6
|
+
- Opinionated theme with Material 3
|
|
7
|
+
- Onboarding presentation starter
|
|
8
|
+
- Routing scaffold {{#if flags.routerPackage}}using `{{flags.routerPackage}}`{{else}}with `MaterialApp` routes{{/if}}
|
|
9
|
+
- {{> state_label}}
|
|
10
|
+
- Backend: {{backend.provider}}
|
|
11
|
+
|
|
12
|
+
## Getting started
|
|
13
|
+
```bash
|
|
14
|
+
flutter pub get
|
|
15
|
+
{{#if (or flags.usesJsonSerializable (or flags.isMobX (eq flags.routerPackage "auto_route")))}}
|
|
16
|
+
flutter pub run build_runner build --delete-conflicting-outputs
|
|
17
|
+
{{/if}}
|
|
18
|
+
flutter run
|
|
19
|
+
```
|