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.
Files changed (237) hide show
  1. package/bin/index.ts +3 -0
  2. package/package.json +46 -0
  3. package/templates/base/.cursor/rules/flutter-project.mdc.hbs +132 -0
  4. package/templates/base/AGENTS.md.hbs +137 -0
  5. package/templates/base/DESIGN.md.hbs +149 -0
  6. package/templates/base/README.md.hbs +19 -0
  7. package/templates/base/SETUP.md.hbs +253 -0
  8. package/templates/base/analysis_options.yaml +88 -0
  9. package/templates/base/assets/.keep +1 -0
  10. package/templates/base/assets/icons/apple.svg +1 -0
  11. package/templates/base/assets/icons/facebook.svg +1 -0
  12. package/templates/base/assets/icons/google.svg +1 -0
  13. package/templates/base/assets/images/.gitkeep +0 -0
  14. package/templates/base/flutter_native_splash.yaml.hbs +8 -0
  15. package/templates/base/lib/main.dart.hbs +43 -0
  16. package/templates/base/lib/src/app.dart.hbs +105 -0
  17. package/templates/base/lib/src/config/app_config.dart.hbs +112 -0
  18. package/templates/base/lib/src/extensions/collection_extension.dart.hbs +55 -0
  19. package/templates/base/lib/src/extensions/context_extension.dart.hbs +167 -0
  20. package/templates/base/lib/src/extensions/date_time_extension.dart.hbs +40 -0
  21. package/templates/base/lib/src/extensions/extensions.dart.hbs +6 -0
  22. package/templates/base/lib/src/extensions/num_extension.dart.hbs +14 -0
  23. package/templates/base/lib/src/extensions/string_extension.dart.hbs +91 -0
  24. package/templates/base/lib/src/extensions/widget_extension.dart.hbs +47 -0
  25. package/templates/base/lib/src/imports/core_imports.dart.hbs +50 -0
  26. package/templates/base/lib/src/imports/imports.dart.hbs +2 -0
  27. package/templates/base/lib/src/imports/packages_imports.dart.hbs +110 -0
  28. package/templates/base/lib/src/routing/(isGetX)@app_bindings.dart.hbs +23 -0
  29. package/templates/base/lib/src/routing/app_router.dart.hbs +252 -0
  30. package/templates/base/lib/src/routing/app_routes.dart.hbs +46 -0
  31. package/templates/base/lib/src/routing/global_navigator.dart.hbs +15 -0
  32. package/templates/base/lib/src/services/auth_service.dart.hbs +78 -0
  33. package/templates/base/lib/src/services/copy_service.dart.hbs +16 -0
  34. package/templates/base/lib/src/services/internet_connection_service.dart.hbs +10 -0
  35. package/templates/base/lib/src/services/services.dart.hbs +45 -0
  36. package/templates/base/lib/src/shared/app_assets.dart.hbs +15 -0
  37. package/templates/base/lib/src/shared/enums/app_status.dart.hbs +40 -0
  38. package/templates/base/lib/src/shared/enums/button_enums.dart.hbs +22 -0
  39. package/templates/base/lib/src/shared/enums/enums.dart.hbs +3 -0
  40. package/templates/base/lib/src/shared/enums/snack_bar_type.dart.hbs +22 -0
  41. package/templates/base/lib/src/shared/helpers/format_number.dart.hbs +18 -0
  42. package/templates/base/lib/src/shared/helpers/imports.dart.hbs +3 -0
  43. package/templates/base/lib/src/shared/helpers/show_app_sheet.dart.hbs +42 -0
  44. package/templates/base/lib/src/shared/helpers/show_dialog.dart.hbs +49 -0
  45. package/templates/base/lib/src/shared/helpers/show_toast.dart.hbs +92 -0
  46. package/templates/base/lib/src/shared/hooks/hooks.dart.hbs +13 -0
  47. package/templates/base/lib/src/shared/hooks/use_copy.dart.hbs +41 -0
  48. package/templates/base/lib/src/shared/hooks/use_timer.dart.hbs +158 -0
  49. package/templates/base/lib/src/shared/shared.dart.hbs +12 -0
  50. package/templates/base/lib/src/shared/widgets/app_button.dart.hbs +144 -0
  51. package/templates/base/lib/src/shared/widgets/app_card.dart.hbs +126 -0
  52. package/templates/base/lib/src/shared/widgets/app_divider.dart.hbs +88 -0
  53. package/templates/base/lib/src/shared/widgets/app_empty_state.dart.hbs +73 -0
  54. package/templates/base/lib/src/shared/widgets/app_error_widget.dart.hbs +69 -0
  55. package/templates/base/lib/src/shared/widgets/app_icon.dart.hbs +25 -0
  56. package/templates/base/lib/src/shared/widgets/app_loading.dart.hbs +54 -0
  57. package/templates/base/lib/src/shared/widgets/app_text_field.dart.hbs +89 -0
  58. package/templates/base/lib/src/shared/widgets/app_top_bar.dart.hbs +105 -0
  59. package/templates/base/lib/src/shared/widgets/common_image.dart.hbs +120 -0
  60. package/templates/base/lib/src/shared/widgets/toast/imports.dart.hbs +4 -0
  61. package/templates/base/lib/src/shared/widgets/toast/raw_toast.dart.hbs +109 -0
  62. package/templates/base/lib/src/shared/widgets/toast/toast.dart.hbs +142 -0
  63. package/templates/base/lib/src/shared/widgets/toast/toast_card.dart.hbs +57 -0
  64. package/templates/base/lib/src/shared/widgets/widgets.dart.hbs +14 -0
  65. package/templates/base/lib/src/shared/wrappers/(isRiverpod,isProvider,isBloc,isGetX,isMobX)@state_wrapper.dart.hbs +51 -0
  66. package/templates/base/lib/src/shared/wrappers/(supportsLocalization)@localization_wrapper.dart.hbs +25 -0
  67. package/templates/base/lib/src/shared/wrappers/(usesScreenutil)@screen_util_wrapper.dart.hbs +27 -0
  68. package/templates/base/lib/src/shared/wrappers/(usesSkeletonizer)@skeleton_wrapper.dart.hbs +81 -0
  69. package/templates/base/lib/src/shared/wrappers/session_listener_wrapper.dart.hbs +258 -0
  70. package/templates/base/lib/src/shared/wrappers/wrappers.dart.hbs +15 -0
  71. package/templates/base/lib/src/theme/app_borders.dart.hbs +70 -0
  72. package/templates/base/lib/src/theme/app_curves.dart.hbs +69 -0
  73. package/templates/base/lib/src/theme/app_durations.dart.hbs +48 -0
  74. package/templates/base/lib/src/theme/app_shadows.dart.hbs +73 -0
  75. package/templates/base/lib/src/theme/app_spacing.dart.hbs +80 -0
  76. package/templates/base/lib/src/theme/color_schemes.dart.hbs +126 -0
  77. package/templates/base/lib/src/theme/text_theme.dart.hbs +167 -0
  78. package/templates/base/lib/src/theme/theme.dart.hbs +431 -0
  79. package/templates/base/lib/src/theme/theme_constants.dart.hbs +20 -0
  80. package/templates/base/lib/src/utils/app_utils.dart.hbs +46 -0
  81. package/templates/base/lib/src/utils/debouncer.dart.hbs +31 -0
  82. package/templates/base/lib/src/utils/error_handler.dart.hbs +14 -0
  83. package/templates/base/lib/src/utils/failure.dart.hbs +30 -0
  84. package/templates/base/lib/src/utils/input_formatters.dart.hbs +27 -0
  85. package/templates/base/lib/src/utils/logger.dart.hbs +37 -0
  86. package/templates/base/lib/src/utils/platform_info.dart.hbs +13 -0
  87. package/templates/base/lib/src/utils/task_runner.dart.hbs +42 -0
  88. package/templates/base/lib/src/utils/typedefs.dart.hbs +6 -0
  89. package/templates/base/lib/src/utils/utils.dart.hbs +9 -0
  90. package/templates/base/pubspec.yaml.hbs +256 -0
  91. package/templates/base/test/widget_test.dart.hbs +56 -0
  92. package/templates/overlays/architecture/clean/architecture.md +6 -0
  93. package/templates/overlays/architecture/clean/lib/src/features/auth/data/models/user_model.dart.hbs +1 -0
  94. package/templates/overlays/architecture/clean/lib/src/features/auth/data/repositories/auth_repository_impl.dart.hbs +1 -0
  95. package/templates/overlays/architecture/clean/lib/src/features/auth/domain/entities/user.dart.hbs +1 -0
  96. package/templates/overlays/architecture/clean/lib/src/features/auth/domain/repositories/auth_repository.dart.hbs +1 -0
  97. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isBloc)@auth_bloc.dart.hbs +1 -0
  98. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isBloc)@session_bloc.dart.hbs +1 -0
  99. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isGetX)@auth_controller.dart.hbs +1 -0
  100. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isGetX)@session_controller.dart.hbs +1 -0
  101. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isMobX)@auth_store.dart.hbs +1 -0
  102. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isMobX)@session_store.dart.hbs +1 -0
  103. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isNoneState)@session_manager.dart.hbs +1 -0
  104. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isProvider,isRiverpod)@auth_provider.dart.hbs +1 -0
  105. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/providers/(isProvider,isRiverpod)@session_provider.dart.hbs +1 -0
  106. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/screens/forgot_password_screen.dart.hbs +1 -0
  107. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/screens/login_screen.dart.hbs +1 -0
  108. package/templates/overlays/architecture/clean/lib/src/features/auth/presentation/screens/signup_screen.dart.hbs +1 -0
  109. package/templates/overlays/architecture/clean/lib/src/features/home/presentation/screens/home_page.dart.hbs +1 -0
  110. package/templates/overlays/architecture/clean/lib/src/features/onboarding/presentation/screens/onboarding_page.dart.hbs +1 -0
  111. package/templates/overlays/architecture/feature-first/architecture.md +5 -0
  112. package/templates/overlays/architecture/feature-first/lib/src/features/auth/data/models/user_model.dart.hbs +1 -0
  113. package/templates/overlays/architecture/feature-first/lib/src/features/auth/data/repositories/auth_repository_impl.dart.hbs +1 -0
  114. package/templates/overlays/architecture/feature-first/lib/src/features/auth/domain/entities/user.dart.hbs +1 -0
  115. package/templates/overlays/architecture/feature-first/lib/src/features/auth/domain/repositories/auth_repository.dart.hbs +1 -0
  116. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isBloc)@auth_bloc.dart.hbs +1 -0
  117. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isBloc)@session_bloc.dart.hbs +1 -0
  118. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isGetX)@auth_controller.dart.hbs +1 -0
  119. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isGetX)@session_controller.dart.hbs +1 -0
  120. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isMobX)@auth_store.dart.hbs +1 -0
  121. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isMobX)@session_store.dart.hbs +1 -0
  122. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isNoneState)@session_manager.dart.hbs +1 -0
  123. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isProvider,isRiverpod)@auth_provider.dart.hbs +1 -0
  124. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/providers/(isProvider,isRiverpod)@session_provider.dart.hbs +1 -0
  125. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/screens/forgot_password_screen.dart.hbs +1 -0
  126. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/screens/login_screen.dart.hbs +1 -0
  127. package/templates/overlays/architecture/feature-first/lib/src/features/auth/presentation/screens/signup_screen.dart.hbs +1 -0
  128. package/templates/overlays/architecture/feature-first/lib/src/features/home/presentation/screens/home_page.dart.hbs +1 -0
  129. package/templates/overlays/architecture/feature-first/lib/src/features/onboarding/presentation/screens/onboarding_page.dart.hbs +1 -0
  130. package/templates/overlays/architecture/layer-first/architecture.md +6 -0
  131. package/templates/overlays/architecture/layer-first/lib/src/data/datasources/local/.gitkeep +0 -0
  132. package/templates/overlays/architecture/layer-first/lib/src/data/datasources/remote/.gitkeep +0 -0
  133. package/templates/overlays/architecture/layer-first/lib/src/data/models/user_model.dart.hbs +1 -0
  134. package/templates/overlays/architecture/layer-first/lib/src/data/repositories/auth_repository_impl.dart.hbs +1 -0
  135. package/templates/overlays/architecture/layer-first/lib/src/domain/entities/user.dart.hbs +1 -0
  136. package/templates/overlays/architecture/layer-first/lib/src/domain/repositories/auth_repository.dart.hbs +1 -0
  137. package/templates/overlays/architecture/layer-first/lib/src/domain/usecases/auth/.gitkeep +0 -0
  138. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isBloc)@auth_bloc.dart.hbs +1 -0
  139. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isBloc)@session_bloc.dart.hbs +1 -0
  140. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isGetX)@auth_controller.dart.hbs +1 -0
  141. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isGetX)@session_controller.dart.hbs +1 -0
  142. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isMobX)@auth_store.dart.hbs +1 -0
  143. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isMobX)@session_store.dart.hbs +1 -0
  144. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isNoneState)@auth_view_model.dart.hbs +1 -0
  145. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isNoneState)@session_manager.dart.hbs +1 -0
  146. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isProvider,isRiverpod)@auth_provider.dart.hbs +1 -0
  147. package/templates/overlays/architecture/layer-first/lib/src/presentation/providers/(isProvider,isRiverpod)@session_provider.dart.hbs +1 -0
  148. package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/auth/forgot_password_screen.dart.hbs +1 -0
  149. package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/auth/login_screen.dart.hbs +1 -0
  150. package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/auth/signup_screen.dart.hbs +1 -0
  151. package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/home/home_page.dart.hbs +1 -0
  152. package/templates/overlays/architecture/layer-first/lib/src/presentation/screens/onboarding/onboarding_page.dart.hbs +1 -0
  153. package/templates/overlays/architecture/layer-first/lib/src/presentation/widgets/.gitkeep +0 -0
  154. package/templates/overlays/architecture/mvc/architecture.md +5 -0
  155. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isBloc)@auth_bloc.dart.hbs +1 -0
  156. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isBloc)@session_bloc.dart.hbs +1 -0
  157. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isGetX)@auth_controller.dart.hbs +1 -0
  158. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isGetX)@session_controller.dart.hbs +1 -0
  159. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isMobX)@auth_store.dart.hbs +1 -0
  160. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isMobX)@session_store.dart.hbs +1 -0
  161. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isNoneState)@session_manager.dart.hbs +1 -0
  162. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isProvider,isRiverpod)@auth_provider.dart.hbs +1 -0
  163. package/templates/overlays/architecture/mvc/lib/src/controllers/auth/(isProvider,isRiverpod)@session_provider.dart.hbs +1 -0
  164. package/templates/overlays/architecture/mvc/lib/src/models/user_model.dart.hbs +1 -0
  165. package/templates/overlays/architecture/mvc/lib/src/services/auth_repository.dart.hbs +1 -0
  166. package/templates/overlays/architecture/mvc/lib/src/services/auth_repository_impl.dart.hbs +1 -0
  167. package/templates/overlays/architecture/mvc/lib/src/views/auth/forgot_password_screen.dart.hbs +1 -0
  168. package/templates/overlays/architecture/mvc/lib/src/views/auth/login_screen.dart.hbs +1 -0
  169. package/templates/overlays/architecture/mvc/lib/src/views/auth/signup_screen.dart.hbs +1 -0
  170. package/templates/overlays/architecture/mvc/lib/src/views/home/home_page.dart.hbs +1 -0
  171. package/templates/overlays/architecture/mvc/lib/src/views/onboarding/onboarding_page.dart.hbs +1 -0
  172. package/templates/overlays/architecture/mvvm/architecture.md +6 -0
  173. package/templates/overlays/architecture/mvvm/lib/src/data/models/user_model.dart.hbs +1 -0
  174. package/templates/overlays/architecture/mvvm/lib/src/data/repositories/auth_repository.dart.hbs +1 -0
  175. package/templates/overlays/architecture/mvvm/lib/src/data/repositories/auth_repository_impl.dart.hbs +1 -0
  176. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isBloc)@bloc/auth_bloc.dart.hbs +1 -0
  177. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isBloc)@bloc/session_bloc.dart.hbs +1 -0
  178. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isGetX)@controllers/auth_controller.dart.hbs +1 -0
  179. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isGetX)@controllers/session_controller.dart.hbs +1 -0
  180. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isMobX)@stores/auth_store.dart.hbs +1 -0
  181. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isMobX)@stores/session_store.dart.hbs +1 -0
  182. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isNoneState)@view_models/auth_view_model.dart.hbs +1 -0
  183. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isNoneState)@view_models/session_manager.dart.hbs +1 -0
  184. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isProvider,isRiverpod)@providers/auth_provider.dart.hbs +1 -0
  185. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/(isProvider,isRiverpod)@providers/session_provider.dart.hbs +1 -0
  186. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/forgot_password_screen.dart.hbs +1 -0
  187. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/login_screen.dart.hbs +1 -0
  188. package/templates/overlays/architecture/mvvm/lib/src/ui/auth/signup_screen.dart.hbs +1 -0
  189. package/templates/overlays/architecture/mvvm/lib/src/ui/home/home_page.dart.hbs +1 -0
  190. package/templates/overlays/architecture/mvvm/lib/src/ui/onboarding/onboarding_page.dart.hbs +1 -0
  191. package/templates/overlays/backend/appwrite/lib/src/services/(usesAppwriteAuth)@auth_service.dart.hbs +101 -0
  192. package/templates/overlays/backend/custom/lib/src/services/auth_service.dart.hbs +158 -0
  193. package/templates/overlays/backend/firebase/lib/src/services/(usesFirebaseAuth)@auth_service.dart.hbs +96 -0
  194. package/templates/overlays/backend/supabase/lib/src/services/(usesSupabaseAuth)@auth_service.dart.hbs +97 -0
  195. package/templates/overlays/device/app_version_update/lib/src/services/(usesAppVersionUpdate)@version_update_service.dart.hbs +118 -0
  196. package/templates/overlays/device/device_info/lib/src/services/(usesDeviceInfoPlus)@device_info_service.dart.hbs +54 -0
  197. package/templates/overlays/extras/dotenv/.env.hbs +33 -0
  198. package/templates/overlays/extras/flavors/lib/src/flavors.dart.hbs +15 -0
  199. package/templates/overlays/extras/localization/assets/translations/en.json.hbs +47 -0
  200. package/templates/overlays/media/lib/src/services/(usesImagePicker,usesFilePicker)@media_service.dart.hbs +148 -0
  201. package/templates/overlays/networking/cached_image/lib/src/shared/widgets/app_cached_image.dart.hbs +160 -0
  202. package/templates/overlays/networking/dio/lib/src/services/(usesDio)@dio_service.dart.hbs +50 -0
  203. package/templates/overlays/networking/http/lib/src/services/(usesHttp)@http_service.dart.hbs +82 -0
  204. package/templates/overlays/storage/hive/lib/src/services/(usesHive)@hive_service.dart.hbs +59 -0
  205. package/templates/overlays/storage/secure_storage/lib/src/services/(usesSecureStorage)@secure_storage_service.dart.hbs +39 -0
  206. package/templates/overlays/storage/shared_preferences/lib/src/services/(usesSharedPreferences)@storage_service.dart.hbs +53 -0
  207. package/templates/overlays/utilities/geolocator/lib/src/services/(usesGeolocator)@location_service.dart.hbs +78 -0
  208. package/templates/overlays/utilities/path_provider/lib/src/services/(usesPathProvider)@path_service.dart.hbs +30 -0
  209. package/templates/overlays/utilities/permission_handler/lib/src/services/(usesPermissionHandler)@permission_service.dart.hbs +28 -0
  210. package/templates/overlays/utilities/permission_handler/lib/src/shared/hooks/use_permission.dart.hbs +44 -0
  211. package/templates/overlays/utilities/share_plus/lib/src/services/(usesSharePlus)@share_service.dart.hbs +22 -0
  212. package/templates/overlays/utilities/share_plus/lib/src/shared/hooks/use_share.dart.hbs +26 -0
  213. package/templates/overlays/utilities/url_launcher/lib/src/services/(usesUrlLauncher)@url_launcher_service.dart.hbs +37 -0
  214. package/templates/overlays/utilities/url_launcher/lib/src/shared/hooks/use_launch_url.dart.hbs +52 -0
  215. package/templates/partials/features/auth/auth_logic.hbs +611 -0
  216. package/templates/partials/features/auth/auth_repository.hbs +32 -0
  217. package/templates/partials/features/auth/auth_repository_impl.hbs +116 -0
  218. package/templates/partials/features/auth/forgot_password_screen.hbs +368 -0
  219. package/templates/partials/features/auth/login_screen.hbs +540 -0
  220. package/templates/partials/features/auth/session_provider.hbs +437 -0
  221. package/templates/partials/features/auth/signup_screen.hbs +511 -0
  222. package/templates/partials/features/auth/user_model.hbs +23 -0
  223. package/templates/partials/features/home/home_page.hbs +156 -0
  224. package/templates/partials/features/onboarding/onboarding_page.hbs +264 -0
  225. package/templates/partials/llm/add-feature-workflow.hbs +38 -0
  226. package/templates/partials/llm/architecture-rules.hbs +92 -0
  227. package/templates/partials/llm/backend-rules.hbs +30 -0
  228. package/templates/partials/llm/build-runner-note.hbs +15 -0
  229. package/templates/partials/llm/design-quick-ref.hbs +14 -0
  230. package/templates/partials/llm/design-quick-reference.hbs +14 -0
  231. package/templates/partials/llm/navigation-rules.hbs +27 -0
  232. package/templates/partials/llm/networking-rules.hbs +16 -0
  233. package/templates/partials/llm/packages-list.hbs +26 -0
  234. package/templates/partials/llm/services-conventions.hbs +20 -0
  235. package/templates/partials/llm/stack-summary.hbs +22 -0
  236. package/templates/partials/llm/state-management-rules.hbs +40 -0
  237. package/templates/partials/state_label.hbs +1 -0
@@ -0,0 +1,126 @@
1
+ import 'package:flutter/material.dart';
2
+
3
+ /// App-specific colors that aren't part of the standard [ColorScheme].
4
+ /// Access via `context.appColors` (defined in `context_extension.dart`).
5
+ class AppColorsExtension extends ThemeExtension<AppColorsExtension> {
6
+ const AppColorsExtension({
7
+ required this.success,
8
+ required this.onSuccess,
9
+ required this.warning,
10
+ required this.onWarning,
11
+ required this.info,
12
+ required this.onInfo,
13
+ this.successContainer,
14
+ this.onSuccessContainer,
15
+ this.warningContainer,
16
+ this.onWarningContainer,
17
+ this.infoContainer,
18
+ this.onInfoContainer,
19
+ });
20
+
21
+ final Color success;
22
+ final Color onSuccess;
23
+ final Color warning;
24
+ final Color onWarning;
25
+ final Color info;
26
+ final Color onInfo;
27
+ final Color? successContainer;
28
+ final Color? onSuccessContainer;
29
+ final Color? warningContainer;
30
+ final Color? onWarningContainer;
31
+ final Color? infoContainer;
32
+ final Color? onInfoContainer;
33
+
34
+ @override
35
+ ThemeExtension<AppColorsExtension> copyWith({
36
+ Color? success,
37
+ Color? onSuccess,
38
+ Color? warning,
39
+ Color? onWarning,
40
+ Color? info,
41
+ Color? onInfo,
42
+ Color? successContainer,
43
+ Color? onSuccessContainer,
44
+ Color? warningContainer,
45
+ Color? onWarningContainer,
46
+ Color? infoContainer,
47
+ Color? onInfoContainer,
48
+ }) {
49
+ return AppColorsExtension(
50
+ success: success ?? this.success,
51
+ onSuccess: onSuccess ?? this.onSuccess,
52
+ warning: warning ?? this.warning,
53
+ onWarning: onWarning ?? this.onWarning,
54
+ info: info ?? this.info,
55
+ onInfo: onInfo ?? this.onInfo,
56
+ successContainer: successContainer ?? this.successContainer,
57
+ onSuccessContainer: onSuccessContainer ?? this.onSuccessContainer,
58
+ warningContainer: warningContainer ?? this.warningContainer,
59
+ onWarningContainer: onWarningContainer ?? this.onWarningContainer,
60
+ infoContainer: infoContainer ?? this.infoContainer,
61
+ onInfoContainer: onInfoContainer ?? this.onInfoContainer,
62
+ );
63
+ }
64
+
65
+ @override
66
+ ThemeExtension<AppColorsExtension> lerp(
67
+ covariant ThemeExtension<AppColorsExtension>? other,
68
+ double t,
69
+ ) {
70
+ if (other is! AppColorsExtension) {
71
+ return this;
72
+ }
73
+ return AppColorsExtension(
74
+ success: Color.lerp(success, other.success, t)!,
75
+ onSuccess: Color.lerp(onSuccess, other.onSuccess, t)!,
76
+ warning: Color.lerp(warning, other.warning, t)!,
77
+ onWarning: Color.lerp(onWarning, other.onWarning, t)!,
78
+ info: Color.lerp(info, other.info, t)!,
79
+ onInfo: Color.lerp(onInfo, other.onInfo, t)!,
80
+ successContainer: Color.lerp(successContainer, other.successContainer, t),
81
+ onSuccessContainer: Color.lerp(onSuccessContainer, other.onSuccessContainer, t),
82
+ warningContainer: Color.lerp(warningContainer, other.warningContainer, t),
83
+ onWarningContainer: Color.lerp(onWarningContainer, other.onWarningContainer, t),
84
+ infoContainer: Color.lerp(infoContainer, other.infoContainer, t),
85
+ onInfoContainer: Color.lerp(onInfoContainer, other.onInfoContainer, t),
86
+ );
87
+ }
88
+ }
89
+
90
+ /// Helper class to define the actual color palettes
91
+ class AppPalettes {
92
+ AppPalettes._();
93
+
94
+ static const light = AppColorsExtension(
95
+ success: Color(0xFF2E7D32),
96
+ onSuccess: Colors.white,
97
+ successContainer: Color(0xFFA5D6A7),
98
+ onSuccessContainer: Color(0xFF1B5E20),
99
+ warning: Color(0xFFED6C02),
100
+ onWarning: Colors.white,
101
+ warningContainer: Color(0xFFFFCC80),
102
+ onWarningContainer: Color(0xFFE65100),
103
+ info: Color(0xFF0288D1),
104
+ onInfo: Colors.white,
105
+ infoContainer: Color(0xFF81D4FA),
106
+ onInfoContainer: Color(0xFF01579B),
107
+ );
108
+
109
+ static const dark = AppColorsExtension(
110
+ success: Color(0xFF81C784),
111
+ onSuccess: Color(0xFF003300),
112
+ successContainer: Color(0xFF1B5E20),
113
+ onSuccessContainer: Color(0xFFA5D6A7),
114
+ warning: Color(0xFFFFB74D),
115
+ onWarning: Color(0xFF5D4037),
116
+ warningContainer: Color(0xFFE65100),
117
+ onWarningContainer: Color(0xFFFFCC80),
118
+ info: Color(0xFF4FC3F7),
119
+ onInfo: Color(0xFF01579B),
120
+ infoContainer: Color(0xFF0277BD),
121
+ onInfoContainer: Color(0xFFE1F5FE),
122
+ );
123
+ }
124
+
125
+ /// Access semantic colors via `context.appColors` from `context_extension.dart`.
126
+ /// Example: `context.appColors.success`
@@ -0,0 +1,167 @@
1
+ import 'package:flutter/material.dart';
2
+
3
+ /// Defines the full Material 3 typescale for the application.
4
+ ///
5
+ /// Prefer accessing styles through [BuildContext] extensions:
6
+ /// ```dart
7
+ /// Text('Hello', style: context.textTheme.titleLarge);
8
+ /// ```
9
+ TextTheme buildTextTheme() {
10
+ const baseTextTheme = TextTheme(
11
+ // ── Display ──────────────────────────────────────────────────────────────
12
+ // Use for the largest, most impactful text on a screen.
13
+ // Typically reserved for hero/marketing sections, splash screens,
14
+ // or short one-word statements. Never use for body copy.
15
+
16
+ /// 57 sp — Largest display text.
17
+ /// Use for: splash screen titles, giant counters, hero numbers.
18
+ displayLarge: TextStyle(
19
+ fontSize: 57,
20
+ fontWeight: FontWeight.w400,
21
+ letterSpacing: -0.25,
22
+ ),
23
+
24
+ /// 45 sp — Mid-size display text.
25
+ /// Use for: prominent feature headlines, onboarding first-screen titles.
26
+ displayMedium: TextStyle(
27
+ fontSize: 45,
28
+ fontWeight: FontWeight.w400,
29
+ letterSpacing: 0,
30
+ ),
31
+
32
+ /// 36 sp — Smallest display text.
33
+ /// Use for: section-level hero text, large marketing callouts.
34
+ displaySmall: TextStyle(
35
+ fontSize: 36,
36
+ fontWeight: FontWeight.w400,
37
+ letterSpacing: 0,
38
+ ),
39
+
40
+ // ── Headline ─────────────────────────────────────────────────────────────
41
+ // Use for page/screen-level headings. Slightly smaller than Display —
42
+ // works well as the primary title of a full page or major section.
43
+
44
+ /// 32 sp — Large page-level heading.
45
+ /// Use for: main screen titles (e.g. "My Profile"), large dialog headers.
46
+ headlineLarge: TextStyle(
47
+ fontSize: 32,
48
+ fontWeight: FontWeight.w400,
49
+ letterSpacing: 0,
50
+ ),
51
+
52
+ /// 28 sp — Standard page-level heading.
53
+ /// Use for: AppBar titles on content-heavy screens, sheet headers.
54
+ headlineMedium: TextStyle(
55
+ fontSize: 28,
56
+ fontWeight: FontWeight.w400,
57
+ letterSpacing: 0,
58
+ ),
59
+
60
+ /// 24 sp — Compact page-level heading.
61
+ /// Use for: section headings within a scrollable page, card group titles.
62
+ headlineSmall: TextStyle(
63
+ fontSize: 24,
64
+ fontWeight: FontWeight.w400,
65
+ letterSpacing: 0,
66
+ ),
67
+
68
+ // ── Title ─────────────────────────────────────────────────────────────────
69
+ // Use for component-level titles and prominent labels inside cards,
70
+ // lists, or dialogs. More emphasis than body, less than headline.
71
+
72
+ /// 22 sp — Prominent component title.
73
+ /// Use for: AppBar titles (standard), large list-section headers,
74
+ /// dialog/modal titles.
75
+ titleLarge: TextStyle(
76
+ fontSize: 22,
77
+ fontWeight: FontWeight.w500,
78
+ letterSpacing: 0,
79
+ ),
80
+
81
+ /// 16 sp — Standard component title.
82
+ /// Use for: ListTile titles, card headings, tab labels, dropdown labels.
83
+ titleMedium: TextStyle(
84
+ fontSize: 16,
85
+ fontWeight: FontWeight.w500,
86
+ letterSpacing: 0.15,
87
+ ),
88
+
89
+ /// 14 sp — Compact component title.
90
+ /// Use for: dense list item titles, chip labels, form field labels,
91
+ /// subtitle of a section.
92
+ titleSmall: TextStyle(
93
+ fontSize: 14,
94
+ fontWeight: FontWeight.w500,
95
+ letterSpacing: 0.1,
96
+ ),
97
+
98
+ // ── Body ──────────────────────────────────────────────────────────────────
99
+ // Use for reading/content text. Optimised for legibility at comfortable
100
+ // reading sizes. Default for paragraphs and descriptions.
101
+
102
+ /// 16 sp — Primary body text.
103
+ /// Use for: main paragraph text, message bubbles, article content,
104
+ /// default Text() inside cards.
105
+ bodyLarge: TextStyle(
106
+ fontSize: 16,
107
+ fontWeight: FontWeight.w400,
108
+ letterSpacing: 0.5,
109
+ ),
110
+
111
+ /// 14 sp — Standard body text (most common).
112
+ /// Use for: secondary descriptions, ListTile subtitles, form helper text,
113
+ /// dialog body copy. This is the workhorse style.
114
+ bodyMedium: TextStyle(
115
+ fontSize: 14,
116
+ fontWeight: FontWeight.w400,
117
+ letterSpacing: 0.25,
118
+ ),
119
+
120
+ /// 12 sp — Small body / caption text.
121
+ /// Use for: captions under images, timestamps, metadata, fine print,
122
+ /// secondary info below a ListTile.
123
+ bodySmall: TextStyle(
124
+ fontSize: 12,
125
+ fontWeight: FontWeight.w400,
126
+ letterSpacing: 0.4,
127
+ ),
128
+
129
+ // ── Label ─────────────────────────────────────────────────────────────────
130
+ // Use for UI control labels, buttons, and navigation items.
131
+ // NOT for body copy — these are designed to label interactive elements.
132
+
133
+ /// 14 sp — Button and prominent control label.
134
+ /// Use for: ElevatedButton / TextButton / OutlinedButton text,
135
+ /// navigation bar labels (selected), tab bar labels.
136
+ labelLarge: TextStyle(
137
+ fontSize: 14,
138
+ fontWeight: FontWeight.w500,
139
+ letterSpacing: 0.1,
140
+ ),
141
+
142
+ /// 12 sp — Standard control label.
143
+ /// Use for: chip text, badge text, tooltip text, navigation rail labels,
144
+ /// input counter text, overline headings.
145
+ labelMedium: TextStyle(
146
+ fontSize: 12,
147
+ fontWeight: FontWeight.w500,
148
+ letterSpacing: 0.5,
149
+ ),
150
+
151
+ /// 11 sp — Smallest control label.
152
+ /// Use for: dense navigation labels, very small badges, annotation text,
153
+ /// data table column headers. Avoid for reading-heavy content.
154
+ labelSmall: TextStyle(
155
+ fontSize: 11,
156
+ fontWeight: FontWeight.w500,
157
+ letterSpacing: 0.5,
158
+ ),
159
+ );
160
+
161
+ {{#if flags.hasCustomFonts}}
162
+ // Apply the primary custom font family to every text style in the scale.
163
+ return baseTextTheme.apply(fontFamily: '{{flags.primaryFontFamily}}');
164
+ {{else}}
165
+ return baseTextTheme;
166
+ {{/if}}
167
+ }