kasy-cli 1.2.1
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/README.md +56 -0
- package/bin/kasy.js +529 -0
- package/docs/cli-reference.md +251 -0
- package/lib/commands/add.js +777 -0
- package/lib/commands/check.js +240 -0
- package/lib/commands/codemagic.js +161 -0
- package/lib/commands/deploy.js +257 -0
- package/lib/commands/docs.js +47 -0
- package/lib/commands/doctor.js +227 -0
- package/lib/commands/features.js +36 -0
- package/lib/commands/ios.js +206 -0
- package/lib/commands/new.js +1870 -0
- package/lib/commands/notifications.js +207 -0
- package/lib/commands/remove.js +466 -0
- package/lib/commands/run.js +75 -0
- package/lib/commands/update.js +382 -0
- package/lib/commands/validate.js +131 -0
- package/lib/scaffold/CHANGELOG.json +6 -0
- package/lib/scaffold/backends/api/.flutter-plugins-dependencies +1 -0
- package/lib/scaffold/backends/api/analysis_options.yaml +5 -0
- package/lib/scaffold/backends/api/generator.js +76 -0
- package/lib/scaffold/backends/api/patch/README.md +85 -0
- package/lib/scaffold/backends/api/patch/android/app/src/main/AndroidManifest.xml +87 -0
- package/lib/scaffold/backends/api/patch/ios/Runner/AppDelegate.swift +61 -0
- package/lib/scaffold/backends/api/patch/lib/core/data/api/meta_ads_api.dart +80 -0
- package/lib/scaffold/backends/api/patch/lib/core/data/api/storage_api.dart +117 -0
- package/lib/scaffold/backends/api/patch/lib/core/data/api/user_api.dart +148 -0
- package/lib/scaffold/backends/api/patch/lib/core/data/entities/json_converters.dart +35 -0
- package/lib/scaffold/backends/api/patch/lib/core/data/entities/user_entity.dart +48 -0
- package/lib/scaffold/backends/api/patch/lib/core/rating/widgets/review_popup.dart +211 -0
- package/lib/scaffold/backends/api/patch/lib/environnements.dart +151 -0
- package/lib/scaffold/backends/api/patch/lib/features/authentication/api/authentication_api.dart +303 -0
- package/lib/scaffold/backends/api/patch/lib/features/authentication/api/authentication_api_interface.dart +80 -0
- package/lib/scaffold/backends/api/patch/lib/features/authentication/repositories/authentication_repository.dart +406 -0
- package/lib/scaffold/backends/api/patch/lib/features/camera/xfile_extension.dart +6 -0
- package/lib/scaffold/backends/api/patch/lib/features/feedbacks/api/entities/feature_request_entity.dart +24 -0
- package/lib/scaffold/backends/api/patch/lib/features/feedbacks/api/entities/feature_vote_entity.dart +21 -0
- package/lib/scaffold/backends/api/patch/lib/features/feedbacks/api/feature_request_api.dart +52 -0
- package/lib/scaffold/backends/api/patch/lib/features/feedbacks/api/feature_vote_api.dart +60 -0
- package/lib/scaffold/backends/api/patch/lib/features/llm_chat/api/llm_chat_api.dart +58 -0
- package/lib/scaffold/backends/api/patch/lib/features/llm_chat/api/llm_chat_message_entity.dart +29 -0
- package/lib/scaffold/backends/api/patch/lib/features/notifications/api/device_api.dart +398 -0
- package/lib/scaffold/backends/api/patch/lib/features/notifications/api/entities/device_entity.dart +39 -0
- package/lib/scaffold/backends/api/patch/lib/features/notifications/api/entities/notifications_entity.dart +23 -0
- package/lib/scaffold/backends/api/patch/lib/features/notifications/api/notifications_api.dart +333 -0
- package/lib/scaffold/backends/api/patch/lib/features/notifications/providers/models/notification.dart +185 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/api/entities/user_info_entity.dart +26 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/api/user_infos_api.dart +107 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/models/user_info.dart +94 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/repositories/user_infos_repository.dart +29 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/ui/animations/movefade_anim.dart +34 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/ui/components/onboarding_att_setup.dart +66 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/ui/components/onboarding_notifications_setup.dart +73 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +173 -0
- package/lib/scaffold/backends/api/patch/lib/features/settings/ui/widgets/avatar_utils.dart +33 -0
- package/lib/scaffold/backends/api/patch/lib/features/subscription/api/entities/subscription_entity.dart +34 -0
- package/lib/scaffold/backends/api/patch/lib/features/subscription/api/subscription_api.dart +49 -0
- package/lib/scaffold/backends/api/patch/lib/features/subscription/shared/maybeshow_premium.dart +88 -0
- package/lib/scaffold/backends/api/patch/lib/main.dart +256 -0
- package/lib/scaffold/backends/api/patch/lib/router.dart +133 -0
- package/lib/scaffold/backends/api/pubspec.yaml.tpl +108 -0
- package/lib/scaffold/backends/firebase/deploy.js +1006 -0
- package/lib/scaffold/backends/firebase/generator.js +24 -0
- package/lib/scaffold/backends/firebase/setup-from-scratch.js +1008 -0
- package/lib/scaffold/backends/firebase/tokens.js +113 -0
- package/lib/scaffold/backends/supabase/.flutter-plugins-dependencies +1 -0
- package/lib/scaffold/backends/supabase/analysis_options.yaml +5 -0
- package/lib/scaffold/backends/supabase/config.toml +34 -0
- package/lib/scaffold/backends/supabase/deploy.js +485 -0
- package/lib/scaffold/backends/supabase/edge-functions/delete-user-account/README.md +15 -0
- package/lib/scaffold/backends/supabase/edge-functions/delete-user-account/index.ts +97 -0
- package/lib/scaffold/backends/supabase/edge-functions/llm-chat/index.ts +156 -0
- package/lib/scaffold/backends/supabase/edge-functions/meta-track-event/index.ts +292 -0
- package/lib/scaffold/backends/supabase/edge-functions/revenuecat-webhook/README.md +30 -0
- package/lib/scaffold/backends/supabase/edge-functions/revenuecat-webhook/index.ts +488 -0
- package/lib/scaffold/backends/supabase/edge-functions/send-push-notification/README.md +35 -0
- package/lib/scaffold/backends/supabase/edge-functions/send-push-notification/index.ts +314 -0
- package/lib/scaffold/backends/supabase/generator.js +108 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000001_initial_schema.sql +149 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000002_storage_bucket.sql +40 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000005_vote_triggers.sql +34 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000006_notification_webhook.sql +36 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000007_welcome_notification.sql +64 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000008_user_feature_requests.sql +2 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000009_llm_messages.sql +22 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000010_notification_image.sql +2 -0
- package/lib/scaffold/backends/supabase/patch/README.md +121 -0
- package/lib/scaffold/backends/supabase/patch/android/app/src/main/AndroidManifest.xml +87 -0
- package/lib/scaffold/backends/supabase/patch/ios/Runner/AppDelegate.swift +61 -0
- package/lib/scaffold/backends/supabase/patch/lib/core/data/api/meta_ads_api.dart +75 -0
- package/lib/scaffold/backends/supabase/patch/lib/core/data/api/storage_api.dart +83 -0
- package/lib/scaffold/backends/supabase/patch/lib/core/data/api/user_api.dart +143 -0
- package/lib/scaffold/backends/supabase/patch/lib/core/data/entities/json_converters.dart +35 -0
- package/lib/scaffold/backends/supabase/patch/lib/core/data/entities/user_entity.dart +48 -0
- package/lib/scaffold/backends/supabase/patch/lib/core/rating/widgets/review_popup.dart +211 -0
- package/lib/scaffold/backends/supabase/patch/lib/environnements.dart +149 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/authentication/api/authentication_api.dart +546 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/authentication/repositories/authentication_repository.dart +410 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/camera/xfile_extension.dart +6 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/feedbacks/api/entities/feature_request_entity.dart +25 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/feedbacks/api/entities/feature_vote_entity.dart +21 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/feedbacks/api/feature_request_api.dart +59 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/feedbacks/api/feature_vote_api.dart +85 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/feedbacks/ui/component/add_feature_form.dart +199 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/llm_chat/api/llm_chat_api.dart +47 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/llm_chat/api/llm_chat_message_entity.dart +30 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/llm_chat/providers/llm_chat_notifier.dart +266 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/notifications/api/device_api.dart +410 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/notifications/api/entities/device_entity.dart +51 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/notifications/api/entities/notifications_entity.dart +26 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/notifications/api/notifications_api.dart +317 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/notifications/providers/models/notification.dart +174 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/api/entities/user_info_entity.dart +26 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/api/user_infos_api.dart +90 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/models/user_info.dart +94 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/repositories/user_infos_repository.dart +29 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/ui/animations/movefade_anim.dart +34 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/ui/components/onboarding_att_setup.dart +66 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/ui/components/onboarding_notifications_setup.dart +73 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +173 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/settings/ui/widgets/avatar_utils.dart +35 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/subscription/api/entities/subscription_entity.dart +35 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/subscription/api/subscription_api.dart +44 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/subscription/shared/maybeshow_premium.dart +85 -0
- package/lib/scaffold/backends/supabase/patch/lib/google_auth_options.dart +23 -0
- package/lib/scaffold/backends/supabase/patch/lib/main.dart +288 -0
- package/lib/scaffold/backends/supabase/patch/lib/router.dart +133 -0
- package/lib/scaffold/backends/supabase/pubspec.yaml.tpl +110 -0
- package/lib/scaffold/backends/supabase/tokens.js +9 -0
- package/lib/scaffold/catalog.js +177 -0
- package/lib/scaffold/engine.js +230 -0
- package/lib/scaffold/features/README.md +152 -0
- package/lib/scaffold/features/analytics/lib/core/data/api/analytics_api.dart +124 -0
- package/lib/scaffold/features/ci/.github/ISSUE_TEMPLATE/BUG.es.md +35 -0
- package/lib/scaffold/features/ci/.github/ISSUE_TEMPLATE/BUG.md +35 -0
- package/lib/scaffold/features/ci/.github/ISSUE_TEMPLATE/BUG.pt.md +35 -0
- package/lib/scaffold/features/ci/.github/ISSUE_TEMPLATE/feature_request.es.md +12 -0
- package/lib/scaffold/features/ci/.github/ISSUE_TEMPLATE/feature_request.md +12 -0
- package/lib/scaffold/features/ci/.github/ISSUE_TEMPLATE/feature_request.pt.md +12 -0
- package/lib/scaffold/features/ci/.github/PULL_REQUEST_TEMPLATE.es.md +17 -0
- package/lib/scaffold/features/ci/.github/PULL_REQUEST_TEMPLATE.md +17 -0
- package/lib/scaffold/features/ci/.github/PULL_REQUEST_TEMPLATE.pt.md +17 -0
- package/lib/scaffold/features/ci/.github/dependabot.yml +16 -0
- package/lib/scaffold/features/ci/.github/workflows/app.yml +20 -0
- package/lib/scaffold/features/ci/.gitlab/templates/deploy.yaml +14 -0
- package/lib/scaffold/features/ci/.gitlab/templates/dropbox.yaml +19 -0
- package/lib/scaffold/features/ci/.gitlab/templates/flutter.yaml +163 -0
- package/lib/scaffold/features/ci/.gitlab/templates/mailgun.yaml +28 -0
- package/lib/scaffold/features/ci/.gitlab-ci.yml +37 -0
- package/lib/scaffold/features/ci/codemagic.yaml +157 -0
- package/lib/scaffold/features/facebook/lib/core/data/api/tracking_api.dart +111 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/api/entities/feature_request_entity.dart +27 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/api/entities/feature_vote_entity.dart +27 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/api/feature_request_api.dart +50 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/api/feature_vote_api.dart +79 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/models/feature_requests.dart +48 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/models/feedback_state.dart +42 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/providers/feedback_page_notifier.dart +147 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/repositories/feature_request_repository.dart +95 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/ui/component/add_feature_form.dart +199 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/ui/feedback_page.dart +175 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/ui/widgets/add_feature_button.dart +76 -0
- package/lib/scaffold/features/feedback/lib/features/feedbacks/ui/widgets/feature_card.dart +279 -0
- package/lib/scaffold/features/ios-release/.kasy/apple.env.example +8 -0
- package/lib/scaffold/features/ios-release/.kasy/codemagic.env.example +7 -0
- package/lib/scaffold/features/ios-release/docs/codemagic-release.en.md +50 -0
- package/lib/scaffold/features/ios-release/docs/codemagic-release.es.md +50 -0
- package/lib/scaffold/features/ios-release/docs/codemagic-release.pt.md +50 -0
- package/lib/scaffold/features/ios-release/docs/ios-release.en.md +41 -0
- package/lib/scaffold/features/ios-release/docs/ios-release.es.md +41 -0
- package/lib/scaffold/features/ios-release/docs/ios-release.pt.md +41 -0
- package/lib/scaffold/features/ios-release/scripts/bump-ios-version.js +38 -0
- package/lib/scaffold/features/ios-release/scripts/release-ios.sh +137 -0
- package/lib/scaffold/features/llm_chat/lib/features/llm_chat/llm_chat_page.dart +301 -0
- package/lib/scaffold/features/local_notifications/lib/features/local_reminder/providers/reminder_notifier.dart +81 -0
- package/lib/scaffold/features/local_notifications/lib/features/local_reminder/repositories/reminder_preferences.dart +76 -0
- package/lib/scaffold/features/local_notifications/lib/features/local_reminder/ui/reminder_page.dart +282 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/api/entities/user_info_entity.dart +24 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/api/user_infos_api.dart +71 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/models/user_info.dart +92 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/providers/onboarding_model.dart +15 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/providers/onboarding_provider.dart +78 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/repositories/user_infos_repository.dart +29 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/animations/page_transitions.dart +30 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/components/onboarding_att_setup.dart +66 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/components/onboarding_features.dart +72 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/components/onboarding_loader.dart +92 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/components/onboarding_notifications_setup.dart +73 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/components/onboarding_questions.dart +89 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/onboarding_page.dart +94 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/widgets/onboarding_background.dart +80 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/widgets/onboarding_feature.dart +139 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/widgets/onboarding_illustration_scaffold.dart +110 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/widgets/onboarding_progress.dart +84 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +173 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/widgets/onboarding_reassurance.dart +45 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/widgets/onboarding_sticky_footer.dart +77 -0
- package/lib/scaffold/features/onboarding/lib/features/onboarding/ui/widgets/selectable_row_tile.dart +392 -0
- package/lib/scaffold/features/revenuecat/lib/core/data/api/tracking_api.dart +116 -0
- package/lib/scaffold/features/revenuecat/lib/core/data/models/subscription.dart +322 -0
- package/lib/scaffold/features/revenuecat/lib/core/home_widgets/home_widget_background_task.dart +41 -0
- package/lib/scaffold/features/revenuecat/lib/core/states/user_state_notifier.dart +305 -0
- package/lib/scaffold/features/widget/lib/core/home_widgets/home_widget_background_task.dart +41 -0
- package/lib/scaffold/features/widget/lib/core/home_widgets/home_widget_mywidget_service.dart +57 -0
- package/lib/scaffold/features/widget/lib/core/home_widgets/home_widget_service.dart +54 -0
- package/lib/scaffold/features/widget/lib/features/settings/ui/components/admin/admin_home_widgets.dart +32 -0
- package/lib/scaffold/generate.js +370 -0
- package/lib/scaffold/patch.js +395 -0
- package/lib/scaffold/shared/backend-config.js +74 -0
- package/lib/scaffold/shared/fcm-service-account.js +126 -0
- package/lib/scaffold/shared/generator-utils.js +1664 -0
- package/lib/scaffold/shared/post-build.js +809 -0
- package/lib/scaffold/shared/template-strings.js +112 -0
- package/lib/utils/apple-release.js +273 -0
- package/lib/utils/checks.js +319 -0
- package/lib/utils/codemagic-release.js +127 -0
- package/lib/utils/fs.js +122 -0
- package/lib/utils/i18n.js +2123 -0
- package/lib/utils/license-gate.js +72 -0
- package/lib/utils/license.js +64 -0
- package/lib/utils/prompts.js +213 -0
- package/lib/utils/updates.js +97 -0
- package/package.json +55 -0
- package/templates/firebase/.env.example +24 -0
- package/templates/firebase/.firebaserc +5 -0
- package/templates/firebase/.kasy/apple.env.example +8 -0
- package/templates/firebase/.kasy/codemagic.env.example +7 -0
- package/templates/firebase/.metadata +30 -0
- package/templates/firebase/.windsurfrules +95 -0
- package/templates/firebase/Makefile +30 -0
- package/templates/firebase/README.en.md +180 -0
- package/templates/firebase/README.es.md +180 -0
- package/templates/firebase/README.md +180 -0
- package/templates/firebase/analysis_options.yaml +37 -0
- package/templates/firebase/android/app/build.gradle.kts +80 -0
- package/templates/firebase/android/app/src/debug/AndroidManifest.xml +7 -0
- package/templates/firebase/android/app/src/main/AndroidManifest.xml +93 -0
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MainActivity.kt +36 -0
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MyWidget.kt +50 -0
- package/templates/firebase/android/app/src/main/kotlin/com/aicrus/firebase/kit/MyWidgetReceiver.kt +7 -0
- package/templates/firebase/android/app/src/main/res/drawable/background.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable/launch_background.xml +9 -0
- package/templates/firebase/android/app/src/main/res/drawable-hdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-mdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-v21/background.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-v21/launch_background.xml +9 -0
- package/templates/firebase/android/app/src/main/res/drawable-xhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-xxxhdpi/splash.png +0 -0
- package/templates/firebase/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/firebase/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/firebase/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/firebase/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/firebase/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/firebase/android/app/src/main/res/values/strings.xml +6 -0
- package/templates/firebase/android/app/src/main/res/values/styles.xml +22 -0
- package/templates/firebase/android/app/src/main/res/values-night/styles.xml +22 -0
- package/templates/firebase/android/app/src/main/res/values-night-v31/styles.xml +20 -0
- package/templates/firebase/android/app/src/main/res/values-v31/styles.xml +20 -0
- package/templates/firebase/android/app/src/main/res/xml/locales_config.xml +7 -0
- package/templates/firebase/android/app/src/main/res/xml/mywidget_info.xml +11 -0
- package/templates/firebase/android/app/src/profile/AndroidManifest.xml +7 -0
- package/templates/firebase/android/build.gradle.kts +28 -0
- package/templates/firebase/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/templates/firebase/android/gradle.properties +2 -0
- package/templates/firebase/android/settings.gradle.kts +29 -0
- package/templates/firebase/assets/icons/apple.png +0 -0
- package/templates/firebase/assets/icons/facebook.png +0 -0
- package/templates/firebase/assets/icons/google.png +0 -0
- package/templates/firebase/assets/icons/google_play_games.png +0 -0
- package/templates/firebase/assets/images/app_icon.png +0 -0
- package/templates/firebase/assets/images/empty_notifications.jpg +0 -0
- package/templates/firebase/assets/images/icon.png +0 -0
- package/templates/firebase/assets/images/onboarding/authentication-login-template.jpg +0 -0
- package/templates/firebase/assets/images/onboarding/img1.jpg +0 -0
- package/templates/firebase/assets/images/onboarding/img2.jpg +0 -0
- package/templates/firebase/assets/images/onboarding/img3.jpg +0 -0
- package/templates/firebase/assets/images/onboarding/notifications.png +0 -0
- package/templates/firebase/assets/images/onboarding/onboarding.png +0 -0
- package/templates/firebase/assets/images/onboarding/purchase.png +0 -0
- package/templates/firebase/assets/images/premium-bg.jpg +0 -0
- package/templates/firebase/assets/images/premium-switch-header.png +0 -0
- package/templates/firebase/assets/images/review.png +0 -0
- package/templates/firebase/assets/images/splashscreen.png +0 -0
- package/templates/firebase/assets/images/update.png +0 -0
- package/templates/firebase/build.yaml +13 -0
- package/templates/firebase/devtools_options.yaml +3 -0
- package/templates/firebase/docs/auth-setup.en.md +145 -0
- package/templates/firebase/docs/auth-setup.es.md +145 -0
- package/templates/firebase/docs/auth-setup.pt.md +145 -0
- package/templates/firebase/docs/codemagic-release.en.md +50 -0
- package/templates/firebase/docs/codemagic-release.es.md +50 -0
- package/templates/firebase/docs/codemagic-release.pt.md +50 -0
- package/templates/firebase/docs/ios-release.en.md +41 -0
- package/templates/firebase/docs/ios-release.es.md +41 -0
- package/templates/firebase/docs/ios-release.pt.md +54 -0
- package/templates/firebase/docs/navigation-transitions.md +80 -0
- package/templates/firebase/docs/revenuecat-setup.es.md +341 -0
- package/templates/firebase/docs/revenuecat-setup.pt.md +341 -0
- package/templates/firebase/firebase.json +1 -0
- package/templates/firebase/firestore.indexes.json +25 -0
- package/templates/firebase/firestore.rules +51 -0
- package/templates/firebase/functions/.eslintrc.js +45 -0
- package/templates/firebase/functions/jest.config.js +16 -0
- package/templates/firebase/functions/package-lock.json +6876 -0
- package/templates/firebase/functions/package.json +33 -0
- package/templates/firebase/functions/src/authentication/functions.ts +30 -0
- package/templates/firebase/functions/src/authentication/triggers.ts +103 -0
- package/templates/firebase/functions/src/core/api/meta_ads_api.ts +390 -0
- package/templates/firebase/functions/src/core/data/entities/entity_utils.ts +87 -0
- package/templates/firebase/functions/src/core/data/entities/notification_entity.ts +74 -0
- package/templates/firebase/functions/src/core/data/entities/page.ts +4 -0
- package/templates/firebase/functions/src/core/data/entities/subscription_entity.ts +76 -0
- package/templates/firebase/functions/src/core/data/entities/user_device_entity.ts +64 -0
- package/templates/firebase/functions/src/core/data/entities/user_entity.ts +43 -0
- package/templates/firebase/functions/src/core/data/repositories/repositories.ts +16 -0
- package/templates/firebase/functions/src/core/data/repositories/subscription_repository.ts +42 -0
- package/templates/firebase/functions/src/core/data/repositories/user_device_repository.ts +31 -0
- package/templates/firebase/functions/src/core/data/repositories/user_notifications_repository.ts +58 -0
- package/templates/firebase/functions/src/core/data/repositories/user_repository.ts +84 -0
- package/templates/firebase/functions/src/core/logger/logger.ts +13 -0
- package/templates/firebase/functions/src/core/storage/storage_manager.ts +52 -0
- package/templates/firebase/functions/src/core/utils/async_utils.ts +5 -0
- package/templates/firebase/functions/src/feature_requests/triggers.ts +3 -0
- package/templates/firebase/functions/src/index.ts +24 -0
- package/templates/firebase/functions/src/llm_chat/index.ts +181 -0
- package/templates/firebase/functions/src/notifications/admin_functions.ts +91 -0
- package/templates/firebase/functions/src/notifications/models/notification.ts +61 -0
- package/templates/firebase/functions/src/notifications/notifications_api.ts +147 -0
- package/templates/firebase/functions/src/notifications/triggers.ts +102 -0
- package/templates/firebase/functions/src/subscriptions/models/revenuecat_events.ts +162 -0
- package/templates/firebase/functions/src/subscriptions/models/subscription_status.ts +18 -0
- package/templates/firebase/functions/src/subscriptions/models/subscriptions.ts +173 -0
- package/templates/firebase/functions/src/subscriptions/subscriptions_functions.ts +135 -0
- package/templates/firebase/functions/src/subscriptions/triggers.ts +35 -0
- package/templates/firebase/functions/src/test/core/data/entities/entity_utils.spec.ts +44 -0
- package/templates/firebase/functions/tsconfig.dev.json +5 -0
- package/templates/firebase/functions/tsconfig.json +18 -0
- package/templates/firebase/home_widget_config.json +30 -0
- package/templates/firebase/ios/Flutter/AppFrameworkInfo.plist +24 -0
- package/templates/firebase/ios/Flutter/Debug.xcconfig +2 -0
- package/templates/firebase/ios/Flutter/Profile.xcconfig +2 -0
- package/templates/firebase/ios/Flutter/Release.xcconfig +2 -0
- package/templates/firebase/ios/HomeWidgetExtension/HomeWidgetBundle.swift +13 -0
- package/templates/firebase/ios/HomeWidgetExtension/Info.plist +29 -0
- package/templates/firebase/ios/HomeWidgetExtension/MyWidget.swift +86 -0
- package/templates/firebase/ios/HomeWidgetExtension.entitlements +10 -0
- package/templates/firebase/ios/NotificationService/Info.plist +31 -0
- package/templates/firebase/ios/NotificationService/NotificationService.swift +76 -0
- package/templates/firebase/ios/Podfile +111 -0
- package/templates/firebase/ios/Runner/AppDelegate.swift +75 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +1 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json +21 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
- package/templates/firebase/ios/Runner/Base.lproj/LaunchScreen.storyboard +44 -0
- package/templates/firebase/ios/Runner/Base.lproj/Main.storyboard +26 -0
- package/templates/firebase/ios/Runner/Info.plist +132 -0
- package/templates/firebase/ios/Runner/Runner-Bridging-Header.h +1 -0
- package/templates/firebase/ios/Runner/Runner.entitlements +14 -0
- package/templates/firebase/ios/Runner/es.lproj/InfoPlist.strings +10 -0
- package/templates/firebase/ios/Runner/pt-BR.lproj/InfoPlist.strings +10 -0
- package/templates/firebase/ios/Runner/pt.lproj/InfoPlist.strings +10 -0
- package/templates/firebase/ios/Runner.xcodeproj/project.pbxproj +1108 -0
- package/templates/firebase/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/templates/firebase/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/templates/firebase/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/templates/firebase/ios/Runner.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme +58 -0
- package/templates/firebase/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +101 -0
- package/templates/firebase/ios/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/templates/firebase/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/templates/firebase/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/templates/firebase/ios/RunnerTests/RunnerTests.swift +12 -0
- package/templates/firebase/lib/components/components.dart +27 -0
- package/templates/firebase/lib/components/kasy_accordion.dart +384 -0
- package/templates/firebase/lib/components/kasy_alert.dart +266 -0
- package/templates/firebase/lib/components/kasy_app_bar.dart +536 -0
- package/templates/firebase/lib/components/kasy_avatar.dart +549 -0
- package/templates/firebase/lib/components/kasy_avatar_presets.dart +104 -0
- package/templates/firebase/lib/components/kasy_badge.dart +278 -0
- package/templates/firebase/lib/components/kasy_bottom_sheet.dart +338 -0
- package/templates/firebase/lib/components/kasy_button.dart +926 -0
- package/templates/firebase/lib/components/kasy_card.dart +128 -0
- package/templates/firebase/lib/components/kasy_checkbox.dart +429 -0
- package/templates/firebase/lib/components/kasy_chip.dart +83 -0
- package/templates/firebase/lib/components/kasy_dialog.dart +789 -0
- package/templates/firebase/lib/components/kasy_otp_verification_bottom_sheet.dart +233 -0
- package/templates/firebase/lib/components/kasy_skeleton.dart +225 -0
- package/templates/firebase/lib/components/kasy_text_area.dart +392 -0
- package/templates/firebase/lib/components/kasy_text_field.dart +591 -0
- package/templates/firebase/lib/components/kasy_text_field_otp.dart +532 -0
- package/templates/firebase/lib/components/kasy_toast.dart +803 -0
- package/templates/firebase/lib/core/ads/ads_provider.dart +136 -0
- package/templates/firebase/lib/core/ads/ads_state.dart +15 -0
- package/templates/firebase/lib/core/animations/bottomfade_anim.dart +37 -0
- package/templates/firebase/lib/core/animations/movefade_anim.dart +34 -0
- package/templates/firebase/lib/core/animations/slideright_anim.dart +38 -0
- package/templates/firebase/lib/core/bottom_menu/bart_inner_paths.dart +5 -0
- package/templates/firebase/lib/core/bottom_menu/bottom_menu.dart +127 -0
- package/templates/firebase/lib/core/bottom_menu/bottom_router.dart +281 -0
- package/templates/firebase/lib/core/bottom_menu/kasy_bart_navigation.dart +22 -0
- package/templates/firebase/lib/core/bottom_menu/kasy_bottom_bar_factory.dart +127 -0
- package/templates/firebase/lib/core/bottom_menu/notification_bottom_item.dart +48 -0
- package/templates/firebase/lib/core/config/app_env.dart +100 -0
- package/templates/firebase/lib/core/config/features.dart +15 -0
- package/templates/firebase/lib/core/data/api/analytics_api.dart +124 -0
- package/templates/firebase/lib/core/data/api/base_api_exceptions.dart +28 -0
- package/templates/firebase/lib/core/data/api/firestore_retry.dart +29 -0
- package/templates/firebase/lib/core/data/api/http_client.dart +38 -0
- package/templates/firebase/lib/core/data/api/image.dart +52 -0
- package/templates/firebase/lib/core/data/api/remote_config_api.dart +170 -0
- package/templates/firebase/lib/core/data/api/storage_api.dart +115 -0
- package/templates/firebase/lib/core/data/api/tracking_api.dart +119 -0
- package/templates/firebase/lib/core/data/api/user_api.dart +115 -0
- package/templates/firebase/lib/core/data/entities/json_converters.dart +39 -0
- package/templates/firebase/lib/core/data/entities/upload_result.dart +48 -0
- package/templates/firebase/lib/core/data/entities/user_entity.dart +54 -0
- package/templates/firebase/lib/core/data/models/pageable.dart +12 -0
- package/templates/firebase/lib/core/data/models/subscription.dart +322 -0
- package/templates/firebase/lib/core/data/models/user.dart +107 -0
- package/templates/firebase/lib/core/data/repositories/user_repository.dart +130 -0
- package/templates/firebase/lib/core/dev_inspector/dev_inspector.dart +464 -0
- package/templates/firebase/lib/core/dev_inspector/dev_inspector_highlight.dart +88 -0
- package/templates/firebase/lib/core/dev_inspector/dev_inspector_info.dart +70 -0
- package/templates/firebase/lib/core/dev_inspector/dev_inspector_panel.dart +204 -0
- package/templates/firebase/lib/core/dev_inspector/dev_inspector_service.dart +321 -0
- package/templates/firebase/lib/core/extensions/date.ext.dart +32 -0
- package/templates/firebase/lib/core/guards/authenticated_guard.dart +37 -0
- package/templates/firebase/lib/core/guards/guard.dart +68 -0
- package/templates/firebase/lib/core/guards/user_info_guard.dart +55 -0
- package/templates/firebase/lib/core/haptics/haptic_feedback_notifier.dart +19 -0
- package/templates/firebase/lib/core/haptics/kasy_haptics.dart +27 -0
- package/templates/firebase/lib/core/home_widgets/home_widget_background_task.dart +41 -0
- package/templates/firebase/lib/core/home_widgets/home_widget_mywidget_service.dart +57 -0
- package/templates/firebase/lib/core/home_widgets/home_widget_service.dart +54 -0
- package/templates/firebase/lib/core/icons/kasy_icons.dart +86 -0
- package/templates/firebase/lib/core/initializer/models/run_state.dart +14 -0
- package/templates/firebase/lib/core/initializer/onstart_service.dart +38 -0
- package/templates/firebase/lib/core/initializer/onstart_widget.dart +83 -0
- package/templates/firebase/lib/core/initializer/pending_notification_handler.dart +48 -0
- package/templates/firebase/lib/core/keyboard_fix/keyboard_flicker_fix.dart +164 -0
- package/templates/firebase/lib/core/navigation/kasy_fade_page_transitions_builder.dart +34 -0
- package/templates/firebase/lib/core/navigation/kasy_material_page_route.dart +41 -0
- package/templates/firebase/lib/core/navigation/kasy_navigation_config.dart +29 -0
- package/templates/firebase/lib/core/navigation/kasy_page_transition.dart +40 -0
- package/templates/firebase/lib/core/navigation/kasy_route_transition.dart +68 -0
- package/templates/firebase/lib/core/navigation/kasy_transition_kind.dart +17 -0
- package/templates/firebase/lib/core/navigation/navigation.dart +6 -0
- package/templates/firebase/lib/core/rating/api/rating_api.dart +99 -0
- package/templates/firebase/lib/core/rating/models/rating.dart +52 -0
- package/templates/firebase/lib/core/rating/models/review.dart +70 -0
- package/templates/firebase/lib/core/rating/providers/rating_repository.dart +75 -0
- package/templates/firebase/lib/core/rating/widgets/rate_banner.dart +190 -0
- package/templates/firebase/lib/core/rating/widgets/rate_popup.dart +54 -0
- package/templates/firebase/lib/core/rating/widgets/review_popup.dart +175 -0
- package/templates/firebase/lib/core/security/biometric_copy_slot.dart +20 -0
- package/templates/firebase/lib/core/security/biometric_guard.dart +114 -0
- package/templates/firebase/lib/core/security/biometric_preference_notifier.dart +17 -0
- package/templates/firebase/lib/core/security/biometric_service.dart +79 -0
- package/templates/firebase/lib/core/security/biometric_ui_bundle.dart +136 -0
- package/templates/firebase/lib/core/security/secured_storage.dart +46 -0
- package/templates/firebase/lib/core/shared_preferences/shared_preferences.dart +70 -0
- package/templates/firebase/lib/core/sidebar/kasy_sidebar.dart +2021 -0
- package/templates/firebase/lib/core/states/components/maybe_ask_biometric_setup.dart +88 -0
- package/templates/firebase/lib/core/states/components/maybe_ask_rating.dart +49 -0
- package/templates/firebase/lib/core/states/components/maybe_show_update_bottom_sheet.dart +86 -0
- package/templates/firebase/lib/core/states/components/maybeshow_component.dart +110 -0
- package/templates/firebase/lib/core/states/events_dispatcher.dart +103 -0
- package/templates/firebase/lib/core/states/models/event_model.dart +118 -0
- package/templates/firebase/lib/core/states/models/user_state.dart +22 -0
- package/templates/firebase/lib/core/states/notifications_dispatcher.dart +81 -0
- package/templates/firebase/lib/core/states/translations.dart +11 -0
- package/templates/firebase/lib/core/states/user_state_notifier.dart +321 -0
- package/templates/firebase/lib/core/theme/colors.dart +262 -0
- package/templates/firebase/lib/core/theme/extensions/theme_extension.dart +48 -0
- package/templates/firebase/lib/core/theme/providers/kasy_theme.dart +76 -0
- package/templates/firebase/lib/core/theme/providers/theme_provider.dart +212 -0
- package/templates/firebase/lib/core/theme/radius.dart +33 -0
- package/templates/firebase/lib/core/theme/shadows.dart +64 -0
- package/templates/firebase/lib/core/theme/spacing.dart +44 -0
- package/templates/firebase/lib/core/theme/texts.dart +176 -0
- package/templates/firebase/lib/core/theme/theme.dart +24 -0
- package/templates/firebase/lib/core/theme/theme_data/theme_data.dart +32 -0
- package/templates/firebase/lib/core/theme/theme_data/theme_data_factory.dart +15 -0
- package/templates/firebase/lib/core/theme/universal_theme.dart +210 -0
- package/templates/firebase/lib/core/toast/toast_service.dart +55 -0
- package/templates/firebase/lib/core/ui/app_dialog.dart +26 -0
- package/templates/firebase/lib/core/web_device_preview/web_device_preview.dart +1126 -0
- package/templates/firebase/lib/core/widgets/debouncer.dart +31 -0
- package/templates/firebase/lib/core/widgets/kasy_hover.dart +166 -0
- package/templates/firebase/lib/core/widgets/kasy_pressable.dart +2 -0
- package/templates/firebase/lib/core/widgets/kasy_pressable_depth.dart +161 -0
- package/templates/firebase/lib/core/widgets/kasy_scroll_behavior.dart +17 -0
- package/templates/firebase/lib/core/widgets/keyboard_visibility.dart +75 -0
- package/templates/firebase/lib/core/widgets/page_background.dart +71 -0
- package/templates/firebase/lib/core/widgets/page_not_found.dart +15 -0
- package/templates/firebase/lib/core/widgets/responsive_layout.dart +215 -0
- package/templates/firebase/lib/core/widgets/update_bottom_sheet.dart +192 -0
- package/templates/firebase/lib/environnements.dart +160 -0
- package/templates/firebase/lib/features/authentication/api/authentication_api.dart +528 -0
- package/templates/firebase/lib/features/authentication/api/authentication_api_interface.dart +84 -0
- package/templates/firebase/lib/features/authentication/providers/models/email.dart +36 -0
- package/templates/firebase/lib/features/authentication/providers/models/password.dart +37 -0
- package/templates/firebase/lib/features/authentication/providers/models/phone_signin_state.dart +21 -0
- package/templates/firebase/lib/features/authentication/providers/models/recover_state.dart +21 -0
- package/templates/firebase/lib/features/authentication/providers/models/signin_state.dart +20 -0
- package/templates/firebase/lib/features/authentication/providers/models/signup_state.dart +20 -0
- package/templates/firebase/lib/features/authentication/providers/phone_auth_notifier.dart +132 -0
- package/templates/firebase/lib/features/authentication/providers/recover_provider.dart +51 -0
- package/templates/firebase/lib/features/authentication/providers/signin_state_provider.dart +166 -0
- package/templates/firebase/lib/features/authentication/providers/signup_state_provider.dart +67 -0
- package/templates/firebase/lib/features/authentication/repositories/authentication_repository.dart +399 -0
- package/templates/firebase/lib/features/authentication/repositories/exceptions/authentication_exceptions.dart +85 -0
- package/templates/firebase/lib/features/authentication/ui/components/apple_signin.dart +19 -0
- package/templates/firebase/lib/features/authentication/ui/components/facebook_signin.dart +19 -0
- package/templates/firebase/lib/features/authentication/ui/components/google_signin.dart +32 -0
- package/templates/firebase/lib/features/authentication/ui/components/otp_verification.dart +100 -0
- package/templates/firebase/lib/features/authentication/ui/components/phone_input.dart +109 -0
- package/templates/firebase/lib/features/authentication/ui/phone_auth_page.dart +60 -0
- package/templates/firebase/lib/features/authentication/ui/recover_password_page.dart +101 -0
- package/templates/firebase/lib/features/authentication/ui/signin_page.dart +321 -0
- package/templates/firebase/lib/features/authentication/ui/signup_page.dart +310 -0
- package/templates/firebase/lib/features/authentication/ui/widgets/auth_brand.dart +35 -0
- package/templates/firebase/lib/features/authentication/ui/widgets/auth_page_back_button.dart +149 -0
- package/templates/firebase/lib/features/authentication/ui/widgets/otp_input.dart +194 -0
- package/templates/firebase/lib/features/authentication/ui/widgets/recover_password_result.dart +62 -0
- package/templates/firebase/lib/features/authentication/ui/widgets/round_signin.dart +73 -0
- package/templates/firebase/lib/features/authentication/ui/widgets/social_separator.dart +26 -0
- package/templates/firebase/lib/features/dev/keyboard_test_page.dart +93 -0
- package/templates/firebase/lib/features/feedbacks/api/entities/feature_request_entity.dart +27 -0
- package/templates/firebase/lib/features/feedbacks/api/entities/feature_vote_entity.dart +27 -0
- package/templates/firebase/lib/features/feedbacks/api/feature_request_api.dart +51 -0
- package/templates/firebase/lib/features/feedbacks/api/feature_vote_api.dart +79 -0
- package/templates/firebase/lib/features/feedbacks/models/feature_requests.dart +48 -0
- package/templates/firebase/lib/features/feedbacks/models/feedback_state.dart +43 -0
- package/templates/firebase/lib/features/feedbacks/providers/feedback_page_notifier.dart +147 -0
- package/templates/firebase/lib/features/feedbacks/repositories/feature_request_repository.dart +92 -0
- package/templates/firebase/lib/features/feedbacks/ui/component/add_feature_form.dart +112 -0
- package/templates/firebase/lib/features/feedbacks/ui/feedback_page.dart +184 -0
- package/templates/firebase/lib/features/feedbacks/ui/widgets/add_feature_button.dart +66 -0
- package/templates/firebase/lib/features/feedbacks/ui/widgets/feature_card.dart +266 -0
- package/templates/firebase/lib/features/home/design_system_page.dart +552 -0
- package/templates/firebase/lib/features/home/home_components_page.dart +314 -0
- package/templates/firebase/lib/features/home/home_components_preview_page.dart +791 -0
- package/templates/firebase/lib/features/home/home_components_preview_registry.dart +7712 -0
- package/templates/firebase/lib/features/home/home_features_page.dart +207 -0
- package/templates/firebase/lib/features/home/home_page.dart +348 -0
- package/templates/firebase/lib/features/llm_chat/api/llm_chat_api.dart +50 -0
- package/templates/firebase/lib/features/llm_chat/api/llm_chat_message_entity.dart +35 -0
- package/templates/firebase/lib/features/llm_chat/llm_chat_page.dart +352 -0
- package/templates/firebase/lib/features/llm_chat/providers/llm_chat_notifier.dart +315 -0
- package/templates/firebase/lib/features/llm_chat/ui/widgets/llm_chat_avatars.dart +148 -0
- package/templates/firebase/lib/features/llm_chat/ui/widgets/llm_chat_composer.dart +124 -0
- package/templates/firebase/lib/features/local_reminder/providers/reminder_notifier.dart +81 -0
- package/templates/firebase/lib/features/local_reminder/repositories/reminder_preferences.dart +76 -0
- package/templates/firebase/lib/features/local_reminder/ui/reminder_page.dart +288 -0
- package/templates/firebase/lib/features/notifications/api/device_api.dart +433 -0
- package/templates/firebase/lib/features/notifications/api/entities/device_entity.dart +62 -0
- package/templates/firebase/lib/features/notifications/api/entities/notifications_entity.dart +35 -0
- package/templates/firebase/lib/features/notifications/api/local_notifier.dart +409 -0
- package/templates/firebase/lib/features/notifications/api/notifications_api.dart +319 -0
- package/templates/firebase/lib/features/notifications/providers/models/device.dart +27 -0
- package/templates/firebase/lib/features/notifications/providers/models/notification.dart +196 -0
- package/templates/firebase/lib/features/notifications/providers/models/notification_list.dart +38 -0
- package/templates/firebase/lib/features/notifications/providers/notifications_provider.dart +120 -0
- package/templates/firebase/lib/features/notifications/repositories/background_notification_handler.dart +13 -0
- package/templates/firebase/lib/features/notifications/repositories/device_repository.dart +137 -0
- package/templates/firebase/lib/features/notifications/repositories/notifications_repository.dart +214 -0
- package/templates/firebase/lib/features/notifications/shared/att_permission.dart +75 -0
- package/templates/firebase/lib/features/notifications/shared/notification_permission_bottom_sheet.dart +144 -0
- package/templates/firebase/lib/features/notifications/ui/components/notification_settings_sheet.dart +169 -0
- package/templates/firebase/lib/features/notifications/ui/components/notification_tile.dart +46 -0
- package/templates/firebase/lib/features/notifications/ui/components/notifications_header.dart +32 -0
- package/templates/firebase/lib/features/notifications/ui/components/push_notification_switcher.dart +106 -0
- package/templates/firebase/lib/features/notifications/ui/notifications_page.dart +202 -0
- package/templates/firebase/lib/features/notifications/ui/request_notification_permission.dart +84 -0
- package/templates/firebase/lib/features/notifications/ui/widgets/empty_notifications.dart +73 -0
- package/templates/firebase/lib/features/notifications/ui/widgets/notification_tile.dart +362 -0
- package/templates/firebase/lib/features/onboarding/api/entities/user_info_entity.dart +24 -0
- package/templates/firebase/lib/features/onboarding/api/user_infos_api.dart +71 -0
- package/templates/firebase/lib/features/onboarding/models/user_info.dart +92 -0
- package/templates/firebase/lib/features/onboarding/providers/onboarding_model.dart +15 -0
- package/templates/firebase/lib/features/onboarding/providers/onboarding_provider.dart +78 -0
- package/templates/firebase/lib/features/onboarding/repositories/user_infos_repository.dart +29 -0
- package/templates/firebase/lib/features/onboarding/ui/animations/page_transitions.dart +33 -0
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_att_setup.dart +66 -0
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_features.dart +76 -0
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_loader.dart +92 -0
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_notifications_setup.dart +76 -0
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_questions.dart +89 -0
- package/templates/firebase/lib/features/onboarding/ui/onboarding_page.dart +108 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_background.dart +80 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_feature.dart +145 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_illustration_scaffold.dart +125 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_progress.dart +84 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +173 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_reassurance.dart +44 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_sticky_footer.dart +77 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/selectable_row_tile.dart +392 -0
- package/templates/firebase/lib/features/settings/settings_page.dart +460 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_bottom_sheet.dart +301 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_home_widgets.dart +38 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_paywalls.dart +53 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_routes.dart +22 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/send_push_notification_page.dart +366 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/send_push_notifier.dart +40 -0
- package/templates/firebase/lib/features/settings/ui/components/avatar_component.dart +430 -0
- package/templates/firebase/lib/features/settings/ui/components/delete_user_component.dart +28 -0
- package/templates/firebase/lib/features/settings/ui/components/language_switcher.dart +163 -0
- package/templates/firebase/lib/features/settings/ui/widgets/admin_card.dart +59 -0
- package/templates/firebase/lib/features/settings/ui/widgets/avatar_utils.dart +51 -0
- package/templates/firebase/lib/features/settings/ui/widgets/round_progress.dart +151 -0
- package/templates/firebase/lib/features/settings/ui/widgets/settings_bottom_sheet_option_tile.dart +52 -0
- package/templates/firebase/lib/features/settings/ui/widgets/settings_tile.dart +163 -0
- package/templates/firebase/lib/features/subscription/api/entities/subscription_entity.dart +40 -0
- package/templates/firebase/lib/features/subscription/api/inapp_subscription_api.dart +389 -0
- package/templates/firebase/lib/features/subscription/api/subscription_api.dart +39 -0
- package/templates/firebase/lib/features/subscription/providers/models/premium_state.dart +35 -0
- package/templates/firebase/lib/features/subscription/providers/premium_page_provider.dart +259 -0
- package/templates/firebase/lib/features/subscription/repositories/subscription_repository.dart +177 -0
- package/templates/firebase/lib/features/subscription/shared/maybeshow_premium.dart +85 -0
- package/templates/firebase/lib/features/subscription/ui/component/active_premium_content.dart +171 -0
- package/templates/firebase/lib/features/subscription/ui/component/paywall_minimal.dart +146 -0
- package/templates/firebase/lib/features/subscription/ui/component/paywall_row.dart +332 -0
- package/templates/firebase/lib/features/subscription/ui/component/paywall_with_switch.dart +207 -0
- package/templates/firebase/lib/features/subscription/ui/component/premium_content.dart +157 -0
- package/templates/firebase/lib/features/subscription/ui/component/premium_page_factory.dart +161 -0
- package/templates/firebase/lib/features/subscription/ui/premium_page.dart +139 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/comparison_table.dart +346 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/feature_line.dart +131 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/paywall_empty_state.dart +68 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/premium_background.dart +63 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/premium_background_gradient.dart +53 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/premium_banner.dart +80 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/premium_bottom_menu.dart +102 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/premium_card.dart +26 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/premium_close_button.dart +61 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/premium_feature.dart +39 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/selectable_col.dart +377 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/selectable_row.dart +436 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/trial_switcher.dart +85 -0
- package/templates/firebase/lib/features/subscription/ui/widgets/unsubscribe_feedback_popup.dart +123 -0
- package/templates/firebase/lib/firebase_options.dart +75 -0
- package/templates/firebase/lib/google_auth_options.dart +10 -0
- package/templates/firebase/lib/i18n/app_locale_display.dart +17 -0
- package/templates/firebase/lib/i18n/en.i18n.json +514 -0
- package/templates/firebase/lib/i18n/es.i18n.json +514 -0
- package/templates/firebase/lib/i18n/pt.i18n.json +514 -0
- package/templates/firebase/lib/i18n/widgets/locale_code_badge.dart +47 -0
- package/templates/firebase/lib/main.dart +263 -0
- package/templates/firebase/lib/router.dart +226 -0
- package/templates/firebase/login-redesign-preview.png +0 -0
- package/templates/firebase/pubspec.yaml +177 -0
- package/templates/firebase/scripts/bump-ios-version.js +38 -0
- package/templates/firebase/scripts/release-ios.sh +137 -0
- package/templates/firebase/slang.yaml +7 -0
- package/templates/firebase/storage.rules +12 -0
- package/templates/firebase/test/core/data/api/analytics_api_fake.dart +25 -0
- package/templates/firebase/test/core/data/api/fake_remote_config_api.dart +45 -0
- package/templates/firebase/test/core/data/api/storage_api_fake.dart +28 -0
- package/templates/firebase/test/core/data/models/subscription_test.dart +42 -0
- package/templates/firebase/test/core/data/repositories/user_repository_test.dart +56 -0
- package/templates/firebase/test/core/guards/guard_test.dart +78 -0
- package/templates/firebase/test/core/navigation/kasy_page_transition_test.dart +30 -0
- package/templates/firebase/test/core/onstart_service_test.dart +18 -0
- package/templates/firebase/test/core/rating/rating_api_fake.dart +58 -0
- package/templates/firebase/test/core/rating/rating_banner_test.dart +117 -0
- package/templates/firebase/test/core/rating/rating_test.dart +60 -0
- package/templates/firebase/test/core/security/secured_storage_fake.dart +33 -0
- package/templates/firebase/test/core/states/event_dispatcher_test.dart +269 -0
- package/templates/firebase/test/core/states/user_state_notifier_test.dart +244 -0
- package/templates/firebase/test/core/widgets/responsive_layout_test.dart +50 -0
- package/templates/firebase/test/device_test_utils.dart +98 -0
- package/templates/firebase/test/features/authentication/data/api/auth_api_fake.dart +169 -0
- package/templates/firebase/test/features/authentication/data/api/user_api_fake.dart +86 -0
- package/templates/firebase/test/features/authentication/lost_password_page_test.dart +59 -0
- package/templates/firebase/test/features/authentication/repositories/authentication_repository_test.dart +88 -0
- package/templates/firebase/test/features/authentication/signin_page_test.dart +133 -0
- package/templates/firebase/test/features/authentication/signup_page_test.dart +136 -0
- package/templates/firebase/test/features/notifications/data/device_api_fake.dart +66 -0
- package/templates/firebase/test/features/notifications/data/fake_facebook_api.dart +40 -0
- package/templates/firebase/test/features/notifications/data/local_notifier_fake.dart +59 -0
- package/templates/firebase/test/features/notifications/data/notifications_api_fake.dart +120 -0
- package/templates/firebase/test/features/notifications/data/notifications_settings_fake.dart +34 -0
- package/templates/firebase/test/features/notifications/providers/device_repository_test.dart +68 -0
- package/templates/firebase/test/features/notifications/providers/notifications_repository_test.dart +74 -0
- package/templates/firebase/test/features/notifications/ui/notifications_page_test.dart +69 -0
- package/templates/firebase/test/features/subscription/api/fake_inapp_subscription_api.dart +85 -0
- package/templates/firebase/test/features/subscription/api/fake_revenuecat_product.dart +186 -0
- package/templates/firebase/test/features/subscription/api/fake_subscription_api.dart +11 -0
- package/templates/firebase/test/features/subscription/subscription_page_test.dart +119 -0
- package/templates/firebase/test/firebase_test_utils.dart +25 -0
- package/templates/firebase/test/test_utils.dart +272 -0
- package/templates/firebase/web/favicon.png +0 -0
- package/templates/firebase/web/firebase-messaging-sw.js +27 -0
- package/templates/firebase/web/icons/Icon-192.png +0 -0
- package/templates/firebase/web/icons/Icon-512.png +0 -0
- package/templates/firebase/web/icons/Icon-maskable-192.png +0 -0
- package/templates/firebase/web/icons/Icon-maskable-512.png +0 -0
- package/templates/firebase/web/index.html +110 -0
- package/templates/firebase/web/local_notifications.js +31 -0
- package/templates/firebase/web/manifest.json +35 -0
- package/templates/firebase/web/splash/img/dark-1x.png +0 -0
- package/templates/firebase/web/splash/img/dark-2x.png +0 -0
- package/templates/firebase/web/splash/img/dark-3x.png +0 -0
- package/templates/firebase/web/splash/img/dark-4x.png +0 -0
- package/templates/firebase/web/splash/img/light-1x.png +0 -0
- package/templates/firebase/web/splash/img/light-2x.png +0 -0
- package/templates/firebase/web/splash/img/light-3x.png +0 -0
- package/templates/firebase/web/splash/img/light-4x.png +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/device_info_plus-12.3.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"facebook_app_events","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/facebook_app_events-0.24.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_installations","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_app_installations-0.4.0+7/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_core-4.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_messaging-16.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_remote_config","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_remote_config-6.2.0/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_facebook_auth","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_facebook_auth-6.0.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_local_notifications","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_local_notifications-20.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_native_splash","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_native_splash-2.4.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_darwin","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_secure_storage_darwin-0.2.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_timezone-5.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.3.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_ios","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.13+6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"in_app_review","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"mixpanel_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/mixpanel_flutter-2.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/package_info_plus-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/path_provider_foundation-2.6.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"permission_handler_apple","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"purchases_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/purchases_flutter-9.12.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sentry_flutter-9.14.0/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sign_in_with_apple","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sign_in_with_apple-7.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/url_launcher_ios-6.4.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"device_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/device_info_plus-12.3.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"facebook_app_events","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/facebook_app_events-0.24.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_installations","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_app_installations-0.4.0+7/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_core-4.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_messaging-16.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_remote_config","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_remote_config-6.2.0/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_facebook_auth","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_facebook_auth-6.0.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_local_notifications","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_local_notifications-20.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_native_splash","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_native_splash-2.4.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_plugin_android_lifecycle","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.33/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_secure_storage-10.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_timezone-5.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/google_sign_in_android-7.2.9/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_android","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/image_picker_android-0.8.13+14/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"in_app_review","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"jni","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/jni-0.14.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"mixpanel_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/mixpanel_flutter-2.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/package_info_plus-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/path_provider_android-2.2.22/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"permission_handler_android","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/permission_handler_android-13.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"purchases_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/purchases_flutter-9.12.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sentry_flutter-9.14.0/","native_build":true,"dependencies":["package_info_plus","jni"],"dev_dependency":false},{"name":"shared_preferences_android","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.21/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sign_in_with_apple","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sign_in_with_apple-7.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.28/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"device_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/device_info_plus-12.3.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_selector_macos","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_installations","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_app_installations-0.4.0+7/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_core-4.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_messaging-16.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_remote_config","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_remote_config-6.2.0/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_local_notifications","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_local_notifications-20.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_darwin","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_secure_storage_darwin-0.2.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_timezone-5.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.3.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_macos","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.2+1/","native_build":false,"dependencies":["file_selector_macos"],"dev_dependency":false},{"name":"in_app_review","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/package_info_plus-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/path_provider_foundation-2.6.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"purchases_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/purchases_flutter-9.12.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sentry_flutter-9.14.0/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sign_in_with_apple","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sign_in_with_apple-7.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"device_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/device_info_plus-12.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_selector_linux","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_local_notifications_linux","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-7.0.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-3.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_timezone-5.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_linux","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.2/","native_build":false,"dependencies":["file_selector_linux"],"dev_dependency":false},{"name":"jni","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/jni-0.14.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/package_info_plus-9.0.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sentry_flutter-9.14.0/","native_build":true,"dependencies":["package_info_plus","jni"],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"device_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/device_info_plus-12.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_selector_windows","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_core-4.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_remote_config","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_remote_config-6.2.0/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_local_notifications_windows","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_local_notifications_windows-2.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_timezone-5.0.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"image_picker_windows","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.2/","native_build":false,"dependencies":["file_selector_windows"],"dev_dependency":false},{"name":"jni","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/jni-0.14.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/package_info_plus-9.0.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"permission_handler_windows","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/permission_handler_windows-0.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sentry_flutter-9.14.0/","native_build":true,"dependencies":["package_info_plus","jni"],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"device_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/device_info_plus-12.3.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_installations_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_app_installations_web-0.1.7+3/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_core_web-3.5.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.1.3/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_remote_config_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/firebase_remote_config_web-1.10.4/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_facebook_auth_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_facebook_auth_web-5.0.1/","dependencies":[],"dev_dependency":false},{"name":"flutter_native_splash","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_native_splash-2.4.7/","dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-2.1.0/","dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/flutter_timezone-5.0.1/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/google_sign_in_web-1.1.2/","dependencies":[],"dev_dependency":false},{"name":"image_picker_for_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/image_picker_for_web-3.1.1/","dependencies":[],"dev_dependency":false},{"name":"mixpanel_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/mixpanel_flutter-2.5.0/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/package_info_plus-9.0.0/","dependencies":[],"dev_dependency":false},{"name":"permission_handler_html","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/permission_handler_html-0.1.3+5/","dependencies":[],"dev_dependency":false},{"name":"purchases_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/purchases_flutter-9.12.3/","dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sentry_flutter-9.14.0/","dependencies":["package_info_plus"],"dev_dependency":false},{"name":"shared_preferences_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"sign_in_with_apple_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-3.0.0/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/Users/paulomorales/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.2/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"facebook_app_events","dependencies":[]},{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"firebase_app_installations","dependencies":["firebase_app_installations_web","firebase_core"]},{"name":"firebase_app_installations_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_remote_config","dependencies":["firebase_core","firebase_remote_config_web"]},{"name":"firebase_remote_config_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_facebook_auth","dependencies":["flutter_facebook_auth_web"]},{"name":"flutter_facebook_auth_web","dependencies":[]},{"name":"flutter_local_notifications","dependencies":["flutter_local_notifications_linux","flutter_local_notifications_windows"]},{"name":"flutter_local_notifications_linux","dependencies":[]},{"name":"flutter_local_notifications_windows","dependencies":[]},{"name":"flutter_native_splash","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_darwin","flutter_secure_storage_linux","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_darwin","dependencies":[]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"flutter_timezone","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"in_app_review","dependencies":[]},{"name":"jni","dependencies":[]},{"name":"mixpanel_flutter","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":["permission_handler_android","permission_handler_apple","permission_handler_html","permission_handler_windows"]},{"name":"permission_handler_android","dependencies":[]},{"name":"permission_handler_apple","dependencies":[]},{"name":"permission_handler_html","dependencies":[]},{"name":"permission_handler_windows","dependencies":[]},{"name":"purchases_flutter","dependencies":[]},{"name":"sentry_flutter","dependencies":["package_info_plus","jni"]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sign_in_with_apple","dependencies":["sign_in_with_apple_web"]},{"name":"sign_in_with_apple_web","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2026-03-02 17:22:59.078297","version":"3.38.7","swift_package_manager_enabled":{"ios":false,"macos":false}}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API (REST) project generator.
|
|
3
|
+
*
|
|
4
|
+
* Wrapper fino sobre generateProject().
|
|
5
|
+
* A lógica de geração comum (cópia, pub get, slang, build_runner, flutterfire)
|
|
6
|
+
* vive em cli/lib/scaffold/generate.js.
|
|
7
|
+
*
|
|
8
|
+
* Hook específico (applyBackendSetup):
|
|
9
|
+
* 1. Aplica api/patch/ sobre o template Firebase copiado
|
|
10
|
+
* 2. Substitui pubspec.yaml pelo template API (pubspec.yaml.tpl)
|
|
11
|
+
* 3. Remove artefatos Firebase exclusivos (feedbacks mantido — patch substitui as APIs)
|
|
12
|
+
* 4. Escreve overrides de environment (apiBaseUrl)
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const path = require('node:path');
|
|
16
|
+
const fs = require('fs-extra');
|
|
17
|
+
const { applyPatch } = require('../../engine');
|
|
18
|
+
const { generateProject } = require('../../generate');
|
|
19
|
+
const { writeEnvironnementsOverrides } = require('../../shared/generator-utils');
|
|
20
|
+
const { removeBackendSpecificArtifacts } = require('../../shared/backend-config');
|
|
21
|
+
|
|
22
|
+
const API_PATCH_DIR = path.join(__dirname, 'patch');
|
|
23
|
+
const API_PUBSPEC = path.join(__dirname, 'pubspec.yaml.tpl');
|
|
24
|
+
|
|
25
|
+
async function generateApiProject(targetDir, options) {
|
|
26
|
+
const { appName, bundleId, firebaseProjectId } = options;
|
|
27
|
+
|
|
28
|
+
if (!appName || !bundleId || !firebaseProjectId) {
|
|
29
|
+
throw new Error('generateApiProject requires appName, bundleId, firebaseProjectId');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return generateProject(targetDir, 'api', options, {
|
|
33
|
+
applyBackendSetup: async (dir, tokens, pathReplacements, opts) => {
|
|
34
|
+
// 1. Patch API (auth via HTTP, storage null, notifications via REST)
|
|
35
|
+
const { filesApplied } = await applyPatch(API_PATCH_DIR, dir, tokens, pathReplacements);
|
|
36
|
+
|
|
37
|
+
// 1b. README do backend (excluído do applyPatch) — copiar manualmente
|
|
38
|
+
const language = opts.language ?? 'pt';
|
|
39
|
+
const readmeLang = ['en', 'pt', 'es'].includes(language) ? language : 'en';
|
|
40
|
+
const candidates = [
|
|
41
|
+
path.join(API_PATCH_DIR, `README.${readmeLang}.md`),
|
|
42
|
+
path.join(API_PATCH_DIR, 'README.md'),
|
|
43
|
+
];
|
|
44
|
+
for (const src of candidates) {
|
|
45
|
+
if (await fs.pathExists(src)) {
|
|
46
|
+
await fs.copy(src, path.join(dir, 'README.md'));
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// 2. Substituir pubspec.yaml pelos deps do API backend
|
|
52
|
+
const pubspecContent = await fs.readFile(API_PUBSPEC, 'utf8');
|
|
53
|
+
let pubspecReplaced = pubspecContent;
|
|
54
|
+
for (const [from, to] of Object.entries(tokens)) {
|
|
55
|
+
pubspecReplaced = pubspecReplaced.replaceAll(from, to);
|
|
56
|
+
}
|
|
57
|
+
await fs.outputFile(path.join(dir, 'pubspec.yaml'), pubspecReplaced, 'utf8');
|
|
58
|
+
|
|
59
|
+
// 3. Remover artefatos exclusivos do Firebase (feedbacks é mantido — patch API substitui as APIs)
|
|
60
|
+
await removeBackendSpecificArtifacts(dir, 'api', opts.modules ?? []);
|
|
61
|
+
|
|
62
|
+
// 4. Escrever overrides de environment com a URL da API
|
|
63
|
+
await writeEnvironnementsOverrides(dir, 'api', tokens, { apiBaseUrl: opts.apiBaseUrl });
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
detail: `${filesApplied} patch files`,
|
|
67
|
+
extraAnswers: { apiBaseUrl: opts.apiBaseUrl },
|
|
68
|
+
returnExtra: { apiBaseUrl: opts.apiBaseUrl },
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
postBuild: null,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
module.exports = { generateApiProject, API_PATCH_DIR };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# AppFirebase
|
|
2
|
+
|
|
3
|
+
Flutter app com backend API REST — gerado pelo kasy.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Como começar
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
flutter run # detecta o dispositivo automaticamente
|
|
11
|
+
make run-ios # iOS
|
|
12
|
+
make run-android # Android
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Dispositivo físico via cabo**
|
|
16
|
+
- iOS: conecte o iPhone → confie neste computador → Xcode → Window → Devices → parear
|
|
17
|
+
- Android: Configurações → Opções do desenvolvedor → ativar depuração USB
|
|
18
|
+
|
|
19
|
+
**URL do backend** está configurada em `.vscode/launch.json` via `--dart-define=BACKEND_URL=...`.
|
|
20
|
+
Para atualizar a URL, edite diretamente esse arquivo.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Chaves e credenciais
|
|
25
|
+
|
|
26
|
+
Este projeto usa dois tipos de credenciais. Entender a diferença evita confusão na hora de configurar.
|
|
27
|
+
|
|
28
|
+
### Chaves do app (ficam no projeto)
|
|
29
|
+
|
|
30
|
+
Ficam no `.vscode/launch.json` como variáveis de ambiente de build (`--dart-define`). O Flutter lê via `String.fromEnvironment()`. **Nunca vão para o servidor.**
|
|
31
|
+
|
|
32
|
+
| Variável | Módulo | Como obter |
|
|
33
|
+
|----------|--------|------------|
|
|
34
|
+
| `BACKEND_URL` | API REST | URL da sua API |
|
|
35
|
+
| `RC_ANDROID_API_KEY` | RevenueCat | Dashboard RevenueCat → Apps → Android |
|
|
36
|
+
| `RC_IOS_API_KEY` | RevenueCat | Dashboard RevenueCat → Apps → iOS |
|
|
37
|
+
| `SENTRY_DSN` | Sentry | Dashboard Sentry → Projeto → DSN |
|
|
38
|
+
| `MIXPANEL_TOKEN` | Mixpanel | Dashboard Mixpanel → Configurações → Token |
|
|
39
|
+
|
|
40
|
+
Para atualizar, edite o `.vscode/launch.json`.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Internacionalização (i18n)
|
|
45
|
+
|
|
46
|
+
O app suporta **3 idiomas**: inglês (`en`), português (`pt`) e espanhol (`es`).
|
|
47
|
+
|
|
48
|
+
### Como o idioma é escolhido
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
App abre
|
|
52
|
+
├─ Tem idioma salvo pelo usuário? → usa o salvo
|
|
53
|
+
└─ Não tem → lê o idioma do celular/browser
|
|
54
|
+
├─ É en, pt ou es? → usa esse idioma
|
|
55
|
+
└─ Não é nenhum desses → usa o idioma padrão (base_locale)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Mudar o idioma padrão (fallback)
|
|
59
|
+
|
|
60
|
+
**`slang.yaml`**
|
|
61
|
+
```yaml
|
|
62
|
+
base_locale: pt # trocar aqui: en | pt | es
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Depois rodar:
|
|
66
|
+
```sh
|
|
67
|
+
dart run slang
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Adicionar ou editar traduções
|
|
71
|
+
|
|
72
|
+
Os arquivos ficam em `lib/i18n/`:
|
|
73
|
+
- `en.i18n.json` — inglês
|
|
74
|
+
- `pt.i18n.json` — português
|
|
75
|
+
- `es.i18n.json` — espanhol
|
|
76
|
+
|
|
77
|
+
Após editar qualquer `.i18n.json`, sempre rodar `dart run slang`.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Segurança
|
|
82
|
+
|
|
83
|
+
O `.gitignore` já exclui: `.env`, `.env.*`, `*.pem`, `*.keystore`.
|
|
84
|
+
|
|
85
|
+
Nunca comite credenciais no repositório.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
3
|
+
|
|
4
|
+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
|
5
|
+
<uses-permission android:name="android.permission.VIBRATE" />
|
|
6
|
+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
|
7
|
+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
8
|
+
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
|
|
9
|
+
<uses-permission android:name="android.permission.CAMERA" />
|
|
10
|
+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
|
11
|
+
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
|
12
|
+
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
|
13
|
+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
|
|
14
|
+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
15
|
+
|
|
16
|
+
<application
|
|
17
|
+
android:label="AppFirebase"
|
|
18
|
+
android:name="${applicationName}"
|
|
19
|
+
android:icon="@mipmap/ic_launcher">
|
|
20
|
+
<activity
|
|
21
|
+
android:name=".MainActivity"
|
|
22
|
+
android:exported="true"
|
|
23
|
+
android:launchMode="singleTop"
|
|
24
|
+
android:theme="@style/LaunchTheme"
|
|
25
|
+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
|
26
|
+
android:hardwareAccelerated="true"
|
|
27
|
+
android:windowSoftInputMode="adjustResize">
|
|
28
|
+
<meta-data
|
|
29
|
+
android:name="io.flutter.embedding.android.NormalTheme"
|
|
30
|
+
android:resource="@style/NormalTheme"
|
|
31
|
+
/>
|
|
32
|
+
<intent-filter>
|
|
33
|
+
<action android:name="android.intent.action.MAIN"/>
|
|
34
|
+
<category android:name="android.intent.category.LAUNCHER"/>
|
|
35
|
+
</intent-filter>
|
|
36
|
+
</activity>
|
|
37
|
+
<!-- Don't delete the meta-data below.
|
|
38
|
+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
|
39
|
+
<meta-data
|
|
40
|
+
android:name="flutterEmbedding"
|
|
41
|
+
android:value="2" />
|
|
42
|
+
|
|
43
|
+
<!-- Tell FCM which channel to use for auto-displayed notifications
|
|
44
|
+
(background/killed state). Must match the channel id created in
|
|
45
|
+
NotificationSettings.init() via flutter_local_notifications. -->
|
|
46
|
+
<meta-data
|
|
47
|
+
android:name="com.google.firebase.messaging.default_notification_channel_id"
|
|
48
|
+
android:value="appfirebase" />
|
|
49
|
+
|
|
50
|
+
<!-- Required by google_sign_in v7+ on Android -->
|
|
51
|
+
<meta-data
|
|
52
|
+
android:name="com.google.android.gms.signin.serverClientId"
|
|
53
|
+
android:value="@string/default_web_client_id" />
|
|
54
|
+
|
|
55
|
+
<service
|
|
56
|
+
android:name="com.dexterous.flutterlocalnotifications.ForegroundService"
|
|
57
|
+
android:exported="false"
|
|
58
|
+
android:stopWithTask="false"
|
|
59
|
+
android:foregroundServiceType="specialUse">
|
|
60
|
+
<property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE" android:value="To demonstrate how to use foreground services to show notifications"/>
|
|
61
|
+
</service>
|
|
62
|
+
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" />
|
|
63
|
+
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
|
|
64
|
+
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
|
|
65
|
+
<intent-filter>
|
|
66
|
+
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
|
67
|
+
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
|
|
68
|
+
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
|
|
69
|
+
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
|
|
70
|
+
</intent-filter>
|
|
71
|
+
</receiver>
|
|
72
|
+
|
|
73
|
+
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
|
|
74
|
+
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
|
|
75
|
+
|
|
76
|
+
<receiver
|
|
77
|
+
android:name="MyWidgetReceiver"
|
|
78
|
+
android:exported="true">
|
|
79
|
+
<intent-filter>
|
|
80
|
+
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
|
81
|
+
</intent-filter>
|
|
82
|
+
<meta-data
|
|
83
|
+
android:name="android.appwidget.provider"
|
|
84
|
+
android:resource="@xml/mywidget_info" />
|
|
85
|
+
</receiver>
|
|
86
|
+
</application>
|
|
87
|
+
</manifest>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import UIKit
|
|
2
|
+
import Flutter
|
|
3
|
+
import flutter_local_notifications
|
|
4
|
+
import AdSupport
|
|
5
|
+
import AppTrackingTransparency
|
|
6
|
+
|
|
7
|
+
@main
|
|
8
|
+
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
|
9
|
+
|
|
10
|
+
override func application(
|
|
11
|
+
_ application: UIApplication,
|
|
12
|
+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
13
|
+
) -> Bool {
|
|
14
|
+
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
|
18
|
+
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
|
19
|
+
|
|
20
|
+
let advertisingChannel = FlutterMethodChannel(
|
|
21
|
+
name: "kasy_kit/advertising_id",
|
|
22
|
+
binaryMessenger: engineBridge.applicationRegistrar.messenger()
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
advertisingChannel.setMethodCallHandler({
|
|
26
|
+
(call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
|
27
|
+
if call.method == "getAdvertisingId" {
|
|
28
|
+
if #available(iOS 14.5, *) {
|
|
29
|
+
let status = ATTrackingManager.trackingAuthorizationStatus
|
|
30
|
+
if status == .authorized {
|
|
31
|
+
let idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString
|
|
32
|
+
if ASIdentifierManager.shared().isAdvertisingTrackingEnabled {
|
|
33
|
+
result(idfa)
|
|
34
|
+
} else {
|
|
35
|
+
result("")
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
result("")
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
if ASIdentifierManager.shared().isAdvertisingTrackingEnabled {
|
|
42
|
+
let idfa = ASIdentifierManager.shared().advertisingIdentifier.uuidString
|
|
43
|
+
result(idfa)
|
|
44
|
+
} else {
|
|
45
|
+
result("")
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
} else {
|
|
49
|
+
result(FlutterMethodNotImplemented)
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in
|
|
54
|
+
GeneratedPluginRegistrant.register(with: registry)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if #available(iOS 10.0, *) {
|
|
58
|
+
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
2
|
+
import 'package:logger/logger.dart';
|
|
3
|
+
import 'package:kasy_kit/core/data/api/http_client.dart';
|
|
4
|
+
|
|
5
|
+
final metaAdsApiProvider = Provider<MetaAdsApi>(
|
|
6
|
+
(ref) => MetaAdsApi(client: ref.read(httpClientProvider)),
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
/// Sends server-side events to Meta Conversions API via your backend.
|
|
10
|
+
///
|
|
11
|
+
/// Your backend must expose:
|
|
12
|
+
/// POST /meta-track-event
|
|
13
|
+
/// Authorization: Bearer <user-token>
|
|
14
|
+
/// Body: { "event_name": "CompleteRegistration", "custom_data": {} }
|
|
15
|
+
///
|
|
16
|
+
/// The backend is responsible for calling the Meta Graph API server-to-server.
|
|
17
|
+
/// See the Supabase `meta-track-event` edge function as a reference implementation.
|
|
18
|
+
///
|
|
19
|
+
/// Subscription events (Subscribe, StartTrial, Purchase) should be sent
|
|
20
|
+
/// automatically by your RevenueCat webhook handler — do not duplicate them here.
|
|
21
|
+
///
|
|
22
|
+
/// Typical usage:
|
|
23
|
+
/// ```dart
|
|
24
|
+
/// // On first launch / install
|
|
25
|
+
/// ref.read(metaAdsApiProvider).trackInstall();
|
|
26
|
+
///
|
|
27
|
+
/// // On email/social registration
|
|
28
|
+
/// ref.read(metaAdsApiProvider).trackRegistration();
|
|
29
|
+
///
|
|
30
|
+
/// // Custom events
|
|
31
|
+
/// ref.read(metaAdsApiProvider).trackEvent(
|
|
32
|
+
/// 'AchieveLevel',
|
|
33
|
+
/// customData: {'level': '5'},
|
|
34
|
+
/// );
|
|
35
|
+
/// ```
|
|
36
|
+
///
|
|
37
|
+
/// Events are fire-and-forget: failures are logged but never rethrown,
|
|
38
|
+
/// so they never affect the user-facing flow.
|
|
39
|
+
class MetaAdsApi {
|
|
40
|
+
final HttpClient _client;
|
|
41
|
+
final _logger = Logger();
|
|
42
|
+
|
|
43
|
+
MetaAdsApi({required HttpClient client}) : _client = client;
|
|
44
|
+
|
|
45
|
+
/// Track a `CompleteRegistration` event.
|
|
46
|
+
/// Call this immediately after a user creates a new permanent account.
|
|
47
|
+
Future<void> trackRegistration() => trackEvent('CompleteRegistration');
|
|
48
|
+
|
|
49
|
+
/// Track a `MobileAppInstall` event.
|
|
50
|
+
/// Call this on the very first app launch (use a persisted flag so it
|
|
51
|
+
/// runs only once per device).
|
|
52
|
+
Future<void> trackInstall() => trackEvent('MobileAppInstall');
|
|
53
|
+
|
|
54
|
+
/// Track any supported Meta event by name.
|
|
55
|
+
///
|
|
56
|
+
/// [eventName] must be a valid Meta app event name, e.g.:
|
|
57
|
+
/// 'CompleteRegistration', 'MobileAppInstall', 'AchieveLevel',
|
|
58
|
+
/// 'UnlockAchievement', 'SpendCredits', 'ViewContent', 'Search'.
|
|
59
|
+
///
|
|
60
|
+
/// [customData] is an optional map of string key-value pairs sent as
|
|
61
|
+
/// Meta `custom_data` (e.g. `{'level': '5', 'currency': 'USD'}`).
|
|
62
|
+
Future<void> trackEvent(
|
|
63
|
+
String eventName, {
|
|
64
|
+
Map<String, String>? customData,
|
|
65
|
+
}) async {
|
|
66
|
+
try {
|
|
67
|
+
await _client.post(
|
|
68
|
+
'/meta-track-event',
|
|
69
|
+
data: {
|
|
70
|
+
'event_name': eventName,
|
|
71
|
+
if (customData != null) 'custom_data': customData,
|
|
72
|
+
},
|
|
73
|
+
);
|
|
74
|
+
_logger.d('[MetaAdsApi] $eventName sent');
|
|
75
|
+
} catch (e, s) {
|
|
76
|
+
// Never let tracking errors surface to the user.
|
|
77
|
+
_logger.w('[MetaAdsApi] $eventName failed (non-fatal): $e', stackTrace: s);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import 'dart:async';
|
|
2
|
+
import 'dart:typed_data';
|
|
3
|
+
|
|
4
|
+
import 'package:kasy_kit/core/data/api/base_api_exceptions.dart';
|
|
5
|
+
import 'package:kasy_kit/core/data/api/http_client.dart';
|
|
6
|
+
import 'package:kasy_kit/core/data/entities/upload_result.dart';
|
|
7
|
+
import 'package:kasy_kit/environnements.dart';
|
|
8
|
+
import 'package:dio/dio.dart';
|
|
9
|
+
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
10
|
+
import 'package:logger/logger.dart';
|
|
11
|
+
|
|
12
|
+
final storageApiProvider = Provider<StorageApi>(
|
|
13
|
+
(ref) => HttpStorageApi(
|
|
14
|
+
client: ref.read(httpClientProvider),
|
|
15
|
+
environment: ref.watch(environmentProvider),
|
|
16
|
+
),
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
abstract class StorageApi {
|
|
20
|
+
/// Upload bytes to remote storage and stream upload progress.
|
|
21
|
+
Stream<UploadResult> uploadData(
|
|
22
|
+
Uint8List data,
|
|
23
|
+
String folder,
|
|
24
|
+
String filename, {
|
|
25
|
+
String? mimeType,
|
|
26
|
+
bool isPublic = true,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/// Delete a file at [imagePath] from remote storage.
|
|
30
|
+
Future<void> deleteFile(String? imagePath);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/// HTTP-based storage implementation for a custom REST backend.
|
|
34
|
+
///
|
|
35
|
+
/// Expected endpoints:
|
|
36
|
+
/// POST /storage/upload — multipart/form-data with fields: file, folder, public
|
|
37
|
+
/// DELETE /storage/file — JSON body: { "path": "<imagePath>" }
|
|
38
|
+
///
|
|
39
|
+
/// Expected upload response JSON:
|
|
40
|
+
/// { "path": "folder/filename.jpg", "url": "https://..." }
|
|
41
|
+
class HttpStorageApi extends StorageApi {
|
|
42
|
+
final HttpClient _client;
|
|
43
|
+
final Environment _environment;
|
|
44
|
+
final Logger _logger = Logger();
|
|
45
|
+
|
|
46
|
+
HttpStorageApi({
|
|
47
|
+
required HttpClient client,
|
|
48
|
+
required Environment environment,
|
|
49
|
+
}) : _client = client,
|
|
50
|
+
_environment = environment;
|
|
51
|
+
|
|
52
|
+
@override
|
|
53
|
+
Stream<UploadResult> uploadData(
|
|
54
|
+
Uint8List data,
|
|
55
|
+
String folder,
|
|
56
|
+
String filename, {
|
|
57
|
+
String? mimeType,
|
|
58
|
+
bool isPublic = true,
|
|
59
|
+
}) async* {
|
|
60
|
+
try {
|
|
61
|
+
yield UploadResultProgress(0.0);
|
|
62
|
+
|
|
63
|
+
final formData = FormData.fromMap({
|
|
64
|
+
'file': MultipartFile.fromBytes(
|
|
65
|
+
data,
|
|
66
|
+
filename: filename,
|
|
67
|
+
contentType: mimeType != null && mimeType.contains('/')
|
|
68
|
+
? DioMediaType(
|
|
69
|
+
mimeType.split('/')[0],
|
|
70
|
+
mimeType.split('/')[1],
|
|
71
|
+
)
|
|
72
|
+
: null,
|
|
73
|
+
),
|
|
74
|
+
'folder': folder,
|
|
75
|
+
'public': isPublic.toString(),
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
final response = await _client.post<Map<String, dynamic>>(
|
|
79
|
+
'/storage/upload',
|
|
80
|
+
data: formData,
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
final imagePath =
|
|
84
|
+
response.data?['path'] as String? ?? '$folder/$filename';
|
|
85
|
+
final imagePublicUrl = response.data?['url'] as String? ??
|
|
86
|
+
'${_environment.backendUrl}/storage/$folder/$filename';
|
|
87
|
+
|
|
88
|
+
yield UploadResultCompleted(
|
|
89
|
+
imagePath: imagePath,
|
|
90
|
+
imagePublicUrl: isPublic ? imagePublicUrl : '',
|
|
91
|
+
);
|
|
92
|
+
} on DioException catch (e, stackTrace) {
|
|
93
|
+
_logger.e('Storage upload error', error: e, stackTrace: stackTrace);
|
|
94
|
+
throw ApiError.fromDioException(e);
|
|
95
|
+
} catch (e, stackTrace) {
|
|
96
|
+
_logger.e('Storage upload error', error: e, stackTrace: stackTrace);
|
|
97
|
+
throw ApiError(code: 0, message: '$e');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@override
|
|
102
|
+
Future<void> deleteFile(String? imagePath) async {
|
|
103
|
+
if (imagePath == null || imagePath.isEmpty) return;
|
|
104
|
+
try {
|
|
105
|
+
await _client.delete<void>(
|
|
106
|
+
'/storage/file',
|
|
107
|
+
data: {'path': imagePath},
|
|
108
|
+
);
|
|
109
|
+
} on DioException catch (e, stackTrace) {
|
|
110
|
+
_logger.e('Storage delete error', error: e, stackTrace: stackTrace);
|
|
111
|
+
throw ApiError.fromDioException(e);
|
|
112
|
+
} catch (e, stackTrace) {
|
|
113
|
+
_logger.e('Storage delete error', error: e, stackTrace: stackTrace);
|
|
114
|
+
throw ApiError(code: 0, message: '$e');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|