kasy-cli 1.21.8 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/add.js +93 -80
- package/lib/commands/configure.js +100 -32
- package/lib/commands/doctor.js +28 -2
- package/lib/commands/new.js +86 -38
- package/lib/commands/notifications.js +1 -1
- package/lib/commands/remove.js +43 -15
- package/lib/commands/run.js +2 -2
- package/lib/commands/update.js +2 -2
- package/lib/scaffold/CHANGELOG.json +14 -0
- package/lib/scaffold/backends/api/generator.js +14 -14
- package/lib/scaffold/backends/api/patch/README.md +83 -0
- package/lib/scaffold/backends/api/patch/lib/core/data/api/storage_api.dart +1 -1
- package/lib/scaffold/backends/api/patch/lib/core/data/entities/user_entity.dart +5 -0
- package/lib/scaffold/backends/api/patch/lib/{environnements.dart → environments.dart} +3 -11
- package/lib/scaffold/backends/api/patch/lib/features/ai_chat/api/ai_chat_api.dart +108 -0
- package/lib/scaffold/backends/api/patch/lib/features/ai_chat/api/ai_chat_conversation_entity.dart +51 -0
- package/lib/scaffold/backends/api/patch/lib/features/{llm_chat/api/llm_chat_message_entity.dart → ai_chat/api/ai_chat_message_entity.dart} +5 -5
- package/lib/scaffold/backends/api/patch/lib/features/{llm_chat/providers/llm_chat_notifier.dart → ai_chat/providers/ai_chat_notifier.dart} +71 -38
- package/lib/scaffold/backends/api/patch/lib/features/authentication/api/authentication_api.dart +2 -2
- package/lib/scaffold/backends/api/patch/lib/features/feedbacks/api/feature_request_api.dart +54 -0
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/models/user_info.dart +16 -16
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/ui/components/onboarding_att_setup.dart +4 -3
- package/lib/scaffold/backends/api/patch/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +38 -28
- package/lib/scaffold/backends/api/patch/lib/features/settings/ui/components/admin/admin_users_api.dart +100 -0
- package/lib/scaffold/backends/api/patch/lib/features/{subscription → subscriptions}/api/entities/subscription_entity.dart +13 -0
- package/lib/scaffold/backends/api/patch/lib/features/subscriptions/api/stripe_backend_api.dart +60 -0
- package/lib/scaffold/backends/api/patch/lib/features/{subscription → subscriptions}/api/subscription_api.dart +1 -1
- package/lib/scaffold/backends/api/pubspec.yaml.tpl +4 -5
- package/lib/scaffold/backends/firebase/deploy.js +87 -13
- package/lib/scaffold/backends/firebase/enable-auth-via-cli.js +14 -6
- package/lib/scaffold/backends/firebase/generator.js +5 -5
- package/lib/scaffold/backends/firebase/setup-from-scratch.js +69 -45
- package/lib/scaffold/backends/firebase/tokens.js +4 -4
- package/lib/scaffold/backends/supabase/deploy.js +63 -11
- package/lib/scaffold/backends/supabase/edge-functions/admin-list-users/index.ts +149 -0
- package/lib/scaffold/backends/supabase/edge-functions/{llm-chat → ai-chat}/index.ts +19 -19
- package/lib/scaffold/backends/supabase/edge-functions/revenuecat-webhook/index.ts +2 -0
- package/lib/scaffold/backends/supabase/edge-functions/stripe-create-checkout-session/index.ts +123 -0
- package/lib/scaffold/backends/supabase/edge-functions/stripe-create-portal-session/index.ts +97 -0
- package/lib/scaffold/backends/supabase/edge-functions/stripe-list-prices/index.ts +83 -0
- package/lib/scaffold/backends/supabase/edge-functions/stripe-webhook/index.ts +138 -0
- package/lib/scaffold/backends/supabase/generator.js +17 -17
- package/lib/scaffold/backends/supabase/migrations/20240101000009_ai_messages.sql +50 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000012_stripe_customers.sql +36 -0
- package/lib/scaffold/backends/supabase/migrations/20240101000013_admin_role.sql +62 -0
- package/lib/scaffold/backends/supabase/patch/lib/core/data/entities/user_entity.dart +4 -0
- package/lib/scaffold/backends/supabase/patch/lib/{environnements.dart → environments.dart} +3 -13
- package/lib/scaffold/backends/supabase/patch/lib/features/ai_chat/api/ai_chat_api.dart +95 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/ai_chat/api/ai_chat_conversation_entity.dart +52 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/{llm_chat/api/llm_chat_message_entity.dart → ai_chat/api/ai_chat_message_entity.dart} +6 -6
- package/lib/scaffold/backends/supabase/patch/lib/features/{llm_chat/providers/llm_chat_notifier.dart → ai_chat/providers/ai_chat_notifier.dart} +63 -35
- package/lib/scaffold/backends/supabase/patch/lib/features/authentication/api/authentication_api.dart +1 -1
- package/lib/scaffold/backends/supabase/patch/lib/features/feedbacks/api/feature_request_api.dart +46 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/models/user_info.dart +16 -16
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/ui/components/onboarding_att_setup.dart +4 -3
- package/lib/scaffold/backends/supabase/patch/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +38 -28
- package/lib/scaffold/backends/supabase/patch/lib/features/settings/ui/components/admin/admin_users_api.dart +93 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/{subscription → subscriptions}/api/entities/subscription_entity.dart +13 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/subscriptions/api/stripe_backend_api.dart +52 -0
- package/lib/scaffold/backends/supabase/patch/lib/features/{subscription → subscriptions}/api/subscription_api.dart +1 -1
- package/lib/scaffold/backends/supabase/pubspec.yaml.tpl +4 -5
- package/lib/scaffold/backends/supabase/tokens.js +3 -3
- package/lib/scaffold/catalog.js +9 -11
- package/lib/scaffold/generate.js +45 -31
- package/lib/scaffold/shared/generator-utils.js +188 -81
- package/lib/scaffold/shared/sort-imports.js +191 -0
- package/lib/scaffold/shared/template-strings.js +3 -3
- package/lib/utils/checks.js +2 -2
- package/lib/utils/i18n/messages-en.js +50 -35
- package/lib/utils/i18n/messages-es.js +50 -35
- package/lib/utils/i18n/messages-pt.js +52 -37
- package/lib/utils/updates.js +15 -15
- package/package.json +1 -1
- package/templates/firebase/.env.example +2 -2
- package/templates/firebase/android/app/src/main/res/drawable/background.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night/background.png +0 -0
- package/templates/firebase/android/app/src/main/res/drawable-night-v21/background.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/values-night-v31/styles.xml +1 -1
- package/templates/firebase/android/app/src/main/res/values-v31/styles.xml +1 -1
- package/templates/firebase/assets/images/logo_wordmark_dark.png +0 -0
- package/templates/firebase/assets/images/logo_wordmark_light.png +0 -0
- package/templates/firebase/docs/revenuecat-setup.es.md +1 -1
- package/templates/firebase/docs/revenuecat-setup.pt.md +1 -1
- package/templates/firebase/firestore.rules +24 -5
- package/templates/firebase/functions/package-lock.json +22 -1
- package/templates/firebase/functions/package.json +2 -1
- package/templates/firebase/functions/src/admin/functions.ts +113 -0
- package/templates/firebase/functions/src/{llm_chat → ai_chat}/index.ts +16 -16
- package/templates/firebase/functions/src/index.ts +8 -2
- package/templates/firebase/functions/src/notifications/device_triggers.ts +2 -2
- package/templates/firebase/functions/src/notifications/triggers.ts +3 -3
- package/templates/firebase/functions/src/subscriptions/models/subscription_status.ts +2 -0
- package/templates/firebase/functions/src/subscriptions/stripe_functions.ts +222 -0
- package/templates/firebase/functions/src/subscriptions/subscriptions_functions.ts +2 -2
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png +0 -0
- package/templates/firebase/ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png +0 -0
- package/templates/firebase/lib/components/components.dart +4 -1
- package/templates/firebase/lib/components/kasy_app_bar.dart +22 -7
- package/templates/firebase/lib/components/kasy_avatar.dart +7 -6
- package/templates/firebase/lib/components/kasy_button.dart +23 -99
- package/templates/firebase/lib/components/kasy_dialog.dart +11 -11
- package/templates/firebase/lib/components/kasy_image_viewer.dart +84 -0
- package/templates/firebase/lib/components/{kasy_sidebar_pro.dart → kasy_sidebar.dart} +692 -425
- package/templates/firebase/lib/components/kasy_status_tag.dart +91 -0
- package/templates/firebase/lib/components/kasy_text_area.dart +1 -3
- package/templates/firebase/lib/components/kasy_text_field.dart +5 -6
- package/templates/firebase/lib/components/kasy_text_field_otp.dart +1 -3
- package/templates/firebase/lib/components/kasy_toast.dart +2 -2
- package/templates/firebase/lib/components/kasy_web_header.dart +209 -0
- package/templates/firebase/lib/core/ads/ads_provider.dart +1 -1
- package/templates/firebase/lib/core/bottom_menu/bottom_menu.dart +57 -4
- package/templates/firebase/lib/core/bottom_menu/bottom_router.dart +19 -91
- package/templates/firebase/lib/core/bottom_menu/kasy_bottom_bar_factory.dart +196 -96
- package/templates/firebase/lib/core/bottom_menu/web_content_wrapper.dart +41 -0
- package/templates/firebase/lib/core/config/app_env.dart +5 -11
- package/templates/firebase/lib/core/config/features.dart +5 -4
- package/templates/firebase/lib/core/data/api/analytics_api.dart +1 -1
- package/templates/firebase/lib/core/data/api/http_client.dart +1 -1
- package/templates/firebase/lib/core/data/entities/user_entity.dart +3 -0
- package/templates/firebase/lib/core/data/models/entitlement.dart +35 -0
- package/templates/firebase/lib/core/data/models/subscription.dart +13 -186
- package/templates/firebase/lib/core/data/models/user.dart +11 -0
- package/templates/firebase/lib/core/data/repositories/user_repository.dart +1 -1
- package/templates/firebase/lib/core/home_widgets/home_widget_background_task.dart +1 -1
- package/templates/firebase/lib/core/home_widgets/home_widget_mywidget_service.dart +1 -1
- package/templates/firebase/lib/core/icons/kasy_icons.dart +31 -1
- package/templates/firebase/lib/core/rating/api/rating_api.dart +2 -2
- package/templates/firebase/lib/core/states/logout_action.dart +25 -0
- package/templates/firebase/lib/core/states/user_state_notifier.dart +3 -3
- package/templates/firebase/lib/core/theme/colors.dart +488 -188
- package/templates/firebase/lib/core/theme/radius.dart +22 -11
- package/templates/firebase/lib/core/theme/shadows.dart +66 -0
- package/templates/firebase/lib/core/theme/texts.dart +75 -41
- package/templates/firebase/lib/core/theme/universal_theme.dart +9 -4
- package/templates/firebase/lib/core/web_device_preview/web_device_preview.dart +5 -4
- package/templates/firebase/lib/core/web_viewport_scale.dart +52 -0
- package/templates/firebase/lib/core/widgets/kasy_brand_badge.dart +118 -0
- package/templates/firebase/lib/core/widgets/kasy_brand_logo.dart +40 -0
- package/templates/firebase/lib/core/widgets/kasy_focus_ring.dart +125 -0
- package/templates/firebase/lib/core/widgets/kasy_hover.dart +33 -13
- package/templates/firebase/lib/core/widgets/kasy_pressable_depth.dart +18 -13
- package/templates/firebase/lib/{environnements.dart → environments.dart} +3 -14
- package/templates/firebase/lib/features/ai_chat/ai_chat_page.dart +159 -0
- package/templates/firebase/lib/features/ai_chat/api/ai_chat_api.dart +107 -0
- package/templates/firebase/lib/features/ai_chat/api/ai_chat_conversation_entity.dart +64 -0
- package/templates/firebase/lib/features/{llm_chat/api/llm_chat_message_entity.dart → ai_chat/api/ai_chat_message_entity.dart} +6 -6
- package/templates/firebase/lib/features/{llm_chat/providers/llm_chat_notifier.dart → ai_chat/providers/ai_chat_notifier.dart} +73 -38
- package/templates/firebase/lib/features/ai_chat/providers/ai_conversations_notifier.dart +103 -0
- package/templates/firebase/lib/features/{llm_chat/ui/widgets/llm_chat_avatars.dart → ai_chat/ui/widgets/ai_chat_avatars.dart} +13 -13
- package/templates/firebase/lib/features/{llm_chat/ui/widgets/llm_chat_composer.dart → ai_chat/ui/widgets/ai_chat_composer.dart} +10 -10
- package/templates/firebase/lib/features/{llm_chat/llm_chat_page.dart → ai_chat/ui/widgets/ai_chat_conversation_view.dart} +80 -67
- package/templates/firebase/lib/features/ai_chat/ui/widgets/ai_conversation_list.dart +285 -0
- package/templates/firebase/lib/features/ai_chat/ui/widgets/ai_conversation_tile.dart +163 -0
- package/templates/firebase/lib/features/authentication/api/authentication_api.dart +52 -13
- package/templates/firebase/lib/features/authentication/api/popup_dismiss_watcher.dart +12 -0
- package/templates/firebase/lib/features/authentication/api/popup_dismiss_watcher_web.dart +35 -0
- package/templates/firebase/lib/features/authentication/ui/recover_password_page.dart +108 -68
- package/templates/firebase/lib/features/authentication/ui/signin_page.dart +38 -51
- package/templates/firebase/lib/features/authentication/ui/signup_page.dart +38 -51
- package/templates/firebase/lib/features/authentication/ui/widgets/auth_card_scaffold.dart +118 -0
- package/templates/firebase/lib/features/authentication/ui/widgets/recover_password_result.dart +61 -44
- package/templates/firebase/lib/features/feedbacks/api/feature_request_api.dart +32 -0
- package/templates/firebase/lib/features/feedbacks/models/feedback_state.dart +5 -5
- package/templates/firebase/lib/features/feedbacks/providers/feedback_page_notifier.dart +2 -2
- package/templates/firebase/lib/features/home/design_system_page.dart +808 -170
- package/templates/firebase/lib/features/home/home_components_page.dart +6 -3
- package/templates/firebase/lib/features/home/home_components_preview_page.dart +6 -6
- package/templates/firebase/lib/features/home/home_components_preview_registry.dart +325 -186
- package/templates/firebase/lib/features/home/home_feed.dart +289 -0
- package/templates/firebase/lib/features/home/home_image_grid.dart +355 -0
- package/templates/firebase/lib/features/home/home_page.dart +11 -250
- package/templates/firebase/lib/features/{local_reminder → local_reminders}/providers/reminder_notifier.dart +1 -1
- package/templates/firebase/lib/features/{local_reminder → local_reminders}/ui/reminder_page.dart +2 -2
- package/templates/firebase/lib/features/notifications/shared/att_permission.dart +1 -1
- package/templates/firebase/lib/features/notifications/ui/request_notification_permission.dart +25 -61
- package/templates/firebase/lib/features/notifications/ui/widgets/permission_request_view.dart +117 -0
- package/templates/firebase/lib/features/onboarding/models/user_info.dart +16 -16
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_att_setup.dart +4 -3
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_features.dart +7 -9
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_loader.dart +71 -48
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_notifications_setup.dart +3 -2
- package/templates/firebase/lib/features/onboarding/ui/components/onboarding_questions.dart +5 -5
- package/templates/firebase/lib/features/onboarding/ui/onboarding_page.dart +4 -4
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_background.dart +4 -2
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_feature.dart +39 -121
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_illustration_scaffold.dart +105 -70
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_module_mockups.dart +639 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_progress.dart +62 -50
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_radio_question.dart +38 -28
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_step_header.dart +75 -0
- package/templates/firebase/lib/features/onboarding/ui/widgets/onboarding_sticky_footer.dart +16 -5
- package/templates/firebase/lib/features/onboarding/ui/widgets/selectable_row_tile.dart +26 -22
- package/templates/firebase/lib/features/settings/settings_page.dart +601 -90
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_page.dart +1193 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_paywalls.dart +1 -1
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_routes.dart +2 -3
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_users_api.dart +86 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_users_tab.dart +1215 -0
- package/templates/firebase/lib/features/settings/ui/components/admin/send_push_notification_page.dart +236 -0
- package/templates/firebase/lib/features/settings/ui/components/avatar_component.dart +3 -3
- package/templates/firebase/lib/features/settings/ui/widgets/kasy_user_avatar.dart +77 -0
- package/templates/firebase/lib/features/settings/ui/widgets/settings_tile.dart +1 -0
- package/templates/firebase/lib/features/{subscription → subscriptions}/api/entities/subscription_entity.dart +17 -0
- package/templates/firebase/lib/features/{subscription → subscriptions}/api/inapp_subscription_api.dart +67 -46
- package/templates/firebase/lib/features/subscriptions/api/revenuecat_product.dart +189 -0
- package/templates/firebase/lib/features/subscriptions/api/stripe_backend_api.dart +55 -0
- package/templates/firebase/lib/features/subscriptions/api/stripe_payment_api.dart +82 -0
- package/templates/firebase/lib/features/subscriptions/api/stripe_product.dart +178 -0
- package/templates/firebase/lib/features/{subscription → subscriptions}/api/subscription_api.dart +1 -1
- package/templates/firebase/lib/features/subscriptions/api/subscription_payment_api.dart +53 -0
- package/templates/firebase/lib/features/subscriptions/api/subscription_payment_api_provider.dart +21 -0
- package/templates/firebase/lib/features/{subscription → subscriptions}/providers/premium_page_provider.dart +9 -6
- package/templates/firebase/lib/features/{subscription → subscriptions}/repositories/subscription_repository.dart +26 -30
- package/{lib/scaffold/backends/supabase/patch/lib/features/subscription → templates/firebase/lib/features/subscriptions}/shared/maybeshow_premium.dart +0 -2
- package/templates/firebase/lib/features/subscriptions/shared/subscription_management.dart +45 -0
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/active_premium_content.dart +28 -4
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/paywall_minimal.dart +7 -7
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/paywall_row.dart +8 -8
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/paywall_with_switch.dart +7 -7
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/premium_content.dart +7 -7
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/premium_page_factory.dart +5 -5
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/premium_page.dart +5 -5
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/comparison_table.dart +1 -1
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/paywall_empty_state.dart +4 -4
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_bottom_menu.dart +3 -4
- package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/selectable_col.dart +1 -1
- package/templates/firebase/lib/i18n/en.i18n.json +171 -46
- package/templates/firebase/lib/i18n/es.i18n.json +175 -50
- package/templates/firebase/lib/i18n/pt.i18n.json +166 -41
- package/templates/firebase/lib/main.dart +6 -3
- package/templates/firebase/lib/router.dart +15 -23
- package/templates/firebase/pubspec.yaml +4 -5
- package/templates/firebase/test/core/data/repositories/user_repository_test.dart +3 -3
- package/templates/firebase/test/core/states/user_state_notifier_test.dart +4 -4
- package/templates/firebase/test/core/widgets/focus_ring_shape_test.dart +55 -0
- package/templates/firebase/test/features/{subscription → subscriptions}/api/fake_inapp_subscription_api.dart +11 -4
- package/templates/firebase/test/features/{subscription → subscriptions}/api/fake_revenuecat_product.dart +1 -0
- package/templates/firebase/test/features/{subscription → subscriptions}/api/fake_subscription_api.dart +2 -2
- package/templates/firebase/test/features/{subscription → subscriptions}/subscription_page_test.dart +4 -4
- package/templates/firebase/test/test_utils.dart +6 -6
- package/templates/firebase/web/index.html +5 -2
- package/lib/scaffold/backends/api/patch/lib/features/llm_chat/api/llm_chat_api.dart +0 -58
- package/lib/scaffold/backends/api/patch/lib/features/subscription/shared/maybeshow_premium.dart +0 -86
- package/lib/scaffold/backends/supabase/migrations/20240101000009_llm_messages.sql +0 -22
- package/lib/scaffold/backends/supabase/patch/lib/features/llm_chat/api/llm_chat_api.dart +0 -47
- package/templates/firebase/assets/images/onboarding/authentication-login-template.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/purchase.png +0 -0
- package/templates/firebase/lib/core/sidebar/kasy_sidebar.dart +0 -2021
- package/templates/firebase/lib/features/authentication/ui/widgets/auth_brand.dart +0 -35
- package/templates/firebase/lib/features/home/home_features_page.dart +0 -207
- package/templates/firebase/lib/features/llm_chat/api/llm_chat_api.dart +0 -50
- package/templates/firebase/lib/features/settings/ui/components/admin/admin_bottom_sheet.dart +0 -316
- package/templates/firebase/lib/features/subscription/shared/maybeshow_premium.dart +0 -85
- /package/templates/firebase/lib/features/{local_reminder → local_reminders}/repositories/reminder_preferences.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/providers/models/premium_state.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/feature_line.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_background.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_background_gradient.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_banner.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_card.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_close_button.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/premium_feature.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/selectable_row.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/trial_switcher.dart +0 -0
- /package/templates/firebase/lib/features/{subscription → subscriptions}/ui/widgets/unsubscribe_feedback_popup.dart +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import 'package:flutter/services.dart';
|
|
2
1
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
2
|
+
import 'package:kasy_kit/core/data/models/entitlement.dart';
|
|
3
3
|
import 'package:kasy_kit/core/data/models/subscription.dart';
|
|
4
4
|
import 'package:kasy_kit/core/initializer/onstart_service.dart';
|
|
5
5
|
import 'package:kasy_kit/core/shared_preferences/shared_preferences.dart';
|
|
6
|
-
import 'package:kasy_kit/features/
|
|
7
|
-
import 'package:kasy_kit/features/
|
|
6
|
+
import 'package:kasy_kit/features/subscriptions/api/entities/subscription_entity.dart';
|
|
7
|
+
import 'package:kasy_kit/features/subscriptions/api/subscription_api.dart';
|
|
8
|
+
import 'package:kasy_kit/features/subscriptions/api/subscription_payment_api.dart';
|
|
9
|
+
import 'package:kasy_kit/features/subscriptions/api/subscription_payment_api_provider.dart';
|
|
8
10
|
import 'package:logger/logger.dart';
|
|
9
|
-
import 'package:purchases_flutter/errors.dart';
|
|
10
|
-
import 'package:purchases_flutter/models/entitlement_info_wrapper.dart';
|
|
11
11
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
12
12
|
|
|
13
13
|
final subscriptionRepositoryProvider = Provider(
|
|
@@ -27,7 +27,7 @@ const _lastAskKey = 'subscription_last_asking_date';
|
|
|
27
27
|
class SubscriptionRepository implements OnStartService {
|
|
28
28
|
final SubscriptionApi _subscriptionApi;
|
|
29
29
|
|
|
30
|
-
final
|
|
30
|
+
final SubscriptionPaymentApi _inAppSubscriptionApi;
|
|
31
31
|
|
|
32
32
|
final SharedPreferences? _prefs;
|
|
33
33
|
|
|
@@ -39,7 +39,7 @@ class SubscriptionRepository implements OnStartService {
|
|
|
39
39
|
|
|
40
40
|
SubscriptionRepository({
|
|
41
41
|
required SubscriptionApi subscriptionApi,
|
|
42
|
-
required
|
|
42
|
+
required SubscriptionPaymentApi inAppSubscriptionApi,
|
|
43
43
|
required SharedPreferences? prefs,
|
|
44
44
|
// RemoteConfigApi? remoteConfig,
|
|
45
45
|
Logger? logger,
|
|
@@ -58,7 +58,7 @@ class SubscriptionRepository implements OnStartService {
|
|
|
58
58
|
_logger.w('''
|
|
59
59
|
Revenuecat seems not to be initialized.
|
|
60
60
|
👉 Please check that you have setup your account on https://revenuecat.com
|
|
61
|
-
And that you have added your token in the environment file or variable (see lib/
|
|
61
|
+
And that you have added your token in the environment file or variable (see lib/environments.dart)
|
|
62
62
|
or
|
|
63
63
|
👉 Remove completely the subscription module if you don't need it
|
|
64
64
|
''');
|
|
@@ -126,30 +126,21 @@ class SubscriptionRepository implements OnStartService {
|
|
|
126
126
|
return true;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
/// The purchase method is used to buy a subscription or a product
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
final error = PurchasesErrorHelper.getErrorCode(e);
|
|
137
|
-
if (error == PurchasesErrorCode.purchaseCancelledError) {
|
|
138
|
-
_logger.i('User has cancelled the purchase');
|
|
139
|
-
throw UserCancelledPurchaseException();
|
|
140
|
-
}
|
|
141
|
-
_logger.e('Error while purchasing the product: $e');
|
|
142
|
-
rethrow;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
throw Exception('Invalid product');
|
|
129
|
+
/// The purchase method is used to buy a subscription or a product.
|
|
130
|
+
/// The concrete provider ([RevenueCatPaymentApi] on mobile, StripePaymentApi
|
|
131
|
+
/// on web) handles the platform specifics and throws
|
|
132
|
+
/// [UserCancelledPurchaseException] when the user cancels.
|
|
133
|
+
Future<List<Entitlement>?> purchase(SubscriptionProduct product) async {
|
|
134
|
+
await _inAppSubscriptionApi.purchaseProduct(product);
|
|
135
|
+
return _inAppSubscriptionApi.getEntitlements();
|
|
146
136
|
}
|
|
147
137
|
|
|
148
|
-
/// Unsubscribe the
|
|
149
|
-
///
|
|
150
|
-
///
|
|
151
|
-
|
|
152
|
-
|
|
138
|
+
/// Unsubscribe / manage the subscription.
|
|
139
|
+
/// [origin] is where the subscription was purchased; the provider opens the
|
|
140
|
+
/// correct management flow (store page or Stripe portal) only when allowed on
|
|
141
|
+
/// the current platform.
|
|
142
|
+
Future<void> unsubscribe(SubscriptionStore? origin) async {
|
|
143
|
+
await _inAppSubscriptionApi.unsubscribe(origin);
|
|
153
144
|
}
|
|
154
145
|
|
|
155
146
|
/// Restore a previous purchase
|
|
@@ -159,6 +150,11 @@ class SubscriptionRepository implements OnStartService {
|
|
|
159
150
|
await _inAppSubscriptionApi.restorePurchase();
|
|
160
151
|
}
|
|
161
152
|
|
|
153
|
+
/// iOS-only: present the offer-code redemption sheet.
|
|
154
|
+
Future<void> presentCodeRedemptionSheet() async {
|
|
155
|
+
await _inAppSubscriptionApi.presentCodeRedemptionSheet();
|
|
156
|
+
}
|
|
157
|
+
|
|
162
158
|
/// Save the last time we showed the subscription paywall
|
|
163
159
|
Future<void> saveLastAskingDate() async {
|
|
164
160
|
if (_prefs == null) return;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import 'package:flutter/foundation.dart';
|
|
4
4
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
5
|
-
import 'package:kasy_kit/core/config/features.dart';
|
|
6
5
|
import 'package:kasy_kit/core/data/models/user.dart';
|
|
7
6
|
import 'package:kasy_kit/core/shared_preferences/shared_preferences.dart';
|
|
8
7
|
import 'package:kasy_kit/core/states/components/maybeshow_component.dart';
|
|
@@ -20,7 +19,6 @@ class MaybeShowPremiumPage implements MaybeShowWithRef {
|
|
|
20
19
|
if (event is! OnAppStartEvent) {
|
|
21
20
|
return false;
|
|
22
21
|
}
|
|
23
|
-
if (kIsWeb && !revenuecatWeb) return false;
|
|
24
22
|
debugPrint("🧐 MaybeShowPremiumPage");
|
|
25
23
|
final userState = ref.watch(userStateNotifierProvider);
|
|
26
24
|
if (userState.subscription?.isActive == true) {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import 'package:flutter/foundation.dart';
|
|
2
|
+
import 'package:kasy_kit/features/subscriptions/api/entities/subscription_entity.dart';
|
|
3
|
+
|
|
4
|
+
/// Where a subscription can be managed / cancelled from the *current* device.
|
|
5
|
+
enum ManageLocation {
|
|
6
|
+
/// Manageable right here — open the store page (mobile) or Stripe Customer
|
|
7
|
+
/// Portal (web).
|
|
8
|
+
here,
|
|
9
|
+
|
|
10
|
+
/// Bought on another platform. Show an informational dialog and let the user
|
|
11
|
+
/// manage it where they purchased. We must NOT open an external payment link
|
|
12
|
+
/// from inside a native app (App Store / Play Store policy).
|
|
13
|
+
elsewhere,
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/// Decide where to manage a subscription based on its origin ([store]) and the
|
|
17
|
+
/// platform the user is currently on.
|
|
18
|
+
///
|
|
19
|
+
/// Example: a user who subscribed on the web (Stripe) and opens the iOS app
|
|
20
|
+
/// gets [ManageLocation.elsewhere] — the app explains the subscription was made
|
|
21
|
+
/// in the browser instead of (illegally) linking out to Stripe.
|
|
22
|
+
ManageLocation resolveManageLocation(SubscriptionStore? store) {
|
|
23
|
+
// Unknown / legacy records (no origin saved): manage here, routing by the
|
|
24
|
+
// current platform — preserves the previous behavior.
|
|
25
|
+
if (store == null || store == SubscriptionStore.unknown) {
|
|
26
|
+
return ManageLocation.here;
|
|
27
|
+
}
|
|
28
|
+
if (kIsWeb) {
|
|
29
|
+
return store == SubscriptionStore.STRIPE
|
|
30
|
+
? ManageLocation.here
|
|
31
|
+
: ManageLocation.elsewhere;
|
|
32
|
+
}
|
|
33
|
+
switch (defaultTargetPlatform) {
|
|
34
|
+
case TargetPlatform.iOS:
|
|
35
|
+
return store == SubscriptionStore.APPLE_STORE
|
|
36
|
+
? ManageLocation.here
|
|
37
|
+
: ManageLocation.elsewhere;
|
|
38
|
+
case TargetPlatform.android:
|
|
39
|
+
return store == SubscriptionStore.PLAY_STORE
|
|
40
|
+
? ManageLocation.here
|
|
41
|
+
: ManageLocation.elsewhere;
|
|
42
|
+
default:
|
|
43
|
+
return ManageLocation.elsewhere;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -4,9 +4,10 @@ import 'package:google_fonts/google_fonts.dart';
|
|
|
4
4
|
import 'package:kasy_kit/components/components.dart';
|
|
5
5
|
import 'package:kasy_kit/core/states/user_state_notifier.dart';
|
|
6
6
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
7
|
-
import 'package:kasy_kit/features/
|
|
8
|
-
import 'package:kasy_kit/features/
|
|
9
|
-
import 'package:kasy_kit/features/
|
|
7
|
+
import 'package:kasy_kit/features/subscriptions/shared/subscription_management.dart';
|
|
8
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_background.dart';
|
|
9
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_card.dart';
|
|
10
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/unsubscribe_feedback_popup.dart';
|
|
10
11
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
11
12
|
|
|
12
13
|
typedef OnTapUnSubscribe = void Function(String reason);
|
|
@@ -26,6 +27,29 @@ class ActivePremiumContent extends ConsumerStatefulWidget {
|
|
|
26
27
|
class _ActivePremiumContentState extends ConsumerState<ActivePremiumContent> {
|
|
27
28
|
bool _isPopupShowing = false;
|
|
28
29
|
|
|
30
|
+
/// Decide where the subscription can be managed. If it was bought on another
|
|
31
|
+
/// platform (e.g. on the web via Stripe while the user is now on iOS), we must
|
|
32
|
+
/// not link out to an external provider (App Store / Play Store policy) — show
|
|
33
|
+
/// an info dialog with a "restore purchases" action instead of the cancel flow.
|
|
34
|
+
Future<void> _handleManageTap(BuildContext context) async {
|
|
35
|
+
final store = ref.read(userStateNotifierProvider).subscription?.store;
|
|
36
|
+
if (resolveManageLocation(store) == ManageLocation.elsewhere) {
|
|
37
|
+
final t = Translations.of(context).activePremium;
|
|
38
|
+
await showKasyConfirmDialog(
|
|
39
|
+
context,
|
|
40
|
+
title: t.managed_elsewhere_title,
|
|
41
|
+
message: t.managed_elsewhere_description,
|
|
42
|
+
cancelLabel: t.cancel_button,
|
|
43
|
+
confirmLabel: t.restore_button,
|
|
44
|
+
onConfirm: () {
|
|
45
|
+
ref.read(userStateNotifierProvider.notifier).refreshSubscription();
|
|
46
|
+
},
|
|
47
|
+
);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
await _showUnsubscribePopup(context);
|
|
51
|
+
}
|
|
52
|
+
|
|
29
53
|
Future<void> _showUnsubscribePopup(BuildContext context) async {
|
|
30
54
|
if (_isPopupShowing) return;
|
|
31
55
|
setState(() => _isPopupShowing = true);
|
|
@@ -156,7 +180,7 @@ class _ActivePremiumContentState extends ConsumerState<ActivePremiumContent> {
|
|
|
156
180
|
label: Translations.of(context).activePremium.unsubscribe_button,
|
|
157
181
|
variant: KasyButtonVariant.soft,
|
|
158
182
|
expand: true,
|
|
159
|
-
onPressed: () =>
|
|
183
|
+
onPressed: () => _handleManageTap(context),
|
|
160
184
|
),
|
|
161
185
|
),
|
|
162
186
|
],
|
|
@@ -4,13 +4,13 @@ import 'package:google_fonts/google_fonts.dart';
|
|
|
4
4
|
import 'package:kasy_kit/components/components.dart';
|
|
5
5
|
import 'package:kasy_kit/core/data/models/subscription.dart';
|
|
6
6
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
7
|
-
import 'package:kasy_kit/features/
|
|
8
|
-
import 'package:kasy_kit/features/
|
|
9
|
-
import 'package:kasy_kit/features/
|
|
10
|
-
import 'package:kasy_kit/features/
|
|
11
|
-
import 'package:kasy_kit/features/
|
|
12
|
-
import 'package:kasy_kit/features/
|
|
13
|
-
import 'package:kasy_kit/features/
|
|
7
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/premium_page_factory.dart';
|
|
8
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/paywall_empty_state.dart';
|
|
9
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_background_gradient.dart';
|
|
10
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_bottom_menu.dart';
|
|
11
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_close_button.dart';
|
|
12
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_feature.dart';
|
|
13
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/selectable_row.dart';
|
|
14
14
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
15
15
|
|
|
16
16
|
/// Minimal paywall: benefits list + single CTA.
|
package/templates/firebase/lib/features/{subscription → subscriptions}/ui/component/paywall_row.dart
RENAMED
|
@@ -6,14 +6,14 @@ import 'package:kasy_kit/components/components.dart';
|
|
|
6
6
|
import 'package:kasy_kit/core/animations/movefade_anim.dart';
|
|
7
7
|
import 'package:kasy_kit/core/data/models/subscription.dart';
|
|
8
8
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
9
|
-
import 'package:kasy_kit/features/
|
|
10
|
-
import 'package:kasy_kit/features/
|
|
11
|
-
import 'package:kasy_kit/features/
|
|
12
|
-
import 'package:kasy_kit/features/
|
|
13
|
-
import 'package:kasy_kit/features/
|
|
14
|
-
import 'package:kasy_kit/features/
|
|
15
|
-
import 'package:kasy_kit/features/
|
|
16
|
-
import 'package:kasy_kit/features/
|
|
9
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/premium_page_factory.dart';
|
|
10
|
+
import 'package:kasy_kit/features/subscriptions/ui/premium_page.dart';
|
|
11
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/comparison_table.dart';
|
|
12
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/feature_line.dart';
|
|
13
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_bottom_menu.dart';
|
|
14
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_close_button.dart';
|
|
15
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/selectable_col.dart';
|
|
16
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/selectable_row.dart';
|
|
17
17
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
18
18
|
|
|
19
19
|
|
|
@@ -4,13 +4,13 @@ import 'package:google_fonts/google_fonts.dart';
|
|
|
4
4
|
import 'package:kasy_kit/components/components.dart';
|
|
5
5
|
import 'package:kasy_kit/core/data/models/subscription.dart';
|
|
6
6
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
7
|
-
import 'package:kasy_kit/features/
|
|
8
|
-
import 'package:kasy_kit/features/
|
|
9
|
-
import 'package:kasy_kit/features/
|
|
10
|
-
import 'package:kasy_kit/features/
|
|
11
|
-
import 'package:kasy_kit/features/
|
|
12
|
-
import 'package:kasy_kit/features/
|
|
13
|
-
import 'package:kasy_kit/features/
|
|
7
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/premium_page_factory.dart';
|
|
8
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_background_gradient.dart';
|
|
9
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_bottom_menu.dart';
|
|
10
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_close_button.dart';
|
|
11
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_feature.dart';
|
|
12
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/selectable_row.dart';
|
|
13
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/trial_switcher.dart';
|
|
14
14
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
15
15
|
|
|
16
16
|
|
|
@@ -6,13 +6,13 @@ import 'package:kasy_kit/components/components.dart';
|
|
|
6
6
|
import 'package:kasy_kit/core/animations/movefade_anim.dart';
|
|
7
7
|
import 'package:kasy_kit/core/data/models/subscription.dart';
|
|
8
8
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
9
|
-
import 'package:kasy_kit/features/
|
|
10
|
-
import 'package:kasy_kit/features/
|
|
11
|
-
import 'package:kasy_kit/features/
|
|
12
|
-
import 'package:kasy_kit/features/
|
|
13
|
-
import 'package:kasy_kit/features/
|
|
14
|
-
import 'package:kasy_kit/features/
|
|
15
|
-
import 'package:kasy_kit/features/
|
|
9
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/premium_page_factory.dart';
|
|
10
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_background.dart';
|
|
11
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_bottom_menu.dart';
|
|
12
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_card.dart';
|
|
13
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_close_button.dart';
|
|
14
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_feature.dart';
|
|
15
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/selectable_row.dart';
|
|
16
16
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
17
17
|
|
|
18
18
|
class BasicPaywall extends StatelessWidget {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'package:flutter/material.dart';
|
|
2
2
|
import 'package:kasy_kit/core/data/models/subscription.dart';
|
|
3
|
-
import 'package:kasy_kit/features/
|
|
4
|
-
import 'package:kasy_kit/features/
|
|
5
|
-
import 'package:kasy_kit/features/
|
|
6
|
-
import 'package:kasy_kit/features/
|
|
7
|
-
import 'package:kasy_kit/features/
|
|
3
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/paywall_minimal.dart';
|
|
4
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/paywall_row.dart';
|
|
5
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/paywall_with_switch.dart';
|
|
6
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/premium_content.dart';
|
|
7
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/selectable_row.dart';
|
|
8
8
|
|
|
9
9
|
typedef OnTapSubscription = void Function();
|
|
10
10
|
|
|
@@ -3,11 +3,11 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
3
3
|
import 'package:go_router/go_router.dart';
|
|
4
4
|
import 'package:kasy_kit/core/data/api/analytics_api.dart';
|
|
5
5
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
6
|
-
import 'package:kasy_kit/features/
|
|
7
|
-
import 'package:kasy_kit/features/
|
|
8
|
-
import 'package:kasy_kit/features/
|
|
9
|
-
import 'package:kasy_kit/features/
|
|
10
|
-
import 'package:kasy_kit/features/
|
|
6
|
+
import 'package:kasy_kit/features/subscriptions/providers/models/premium_state.dart';
|
|
7
|
+
import 'package:kasy_kit/features/subscriptions/providers/premium_page_provider.dart';
|
|
8
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/active_premium_content.dart';
|
|
9
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/premium_page_factory.dart';
|
|
10
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/paywall_empty_state.dart';
|
|
11
11
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
12
12
|
|
|
13
13
|
class PremiumPageArgs {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'package:flutter/material.dart';
|
|
2
2
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
3
3
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
4
|
-
import 'package:kasy_kit/
|
|
4
|
+
import 'package:kasy_kit/environments.dart';
|
|
5
5
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
6
6
|
|
|
7
7
|
/// Returns a list of [ComparisonTableRow] instances representing the features
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import 'package:flutter/material.dart';
|
|
2
2
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
3
|
-
import 'package:kasy_kit/features/
|
|
4
|
-
import 'package:kasy_kit/features/
|
|
5
|
-
import 'package:kasy_kit/features/
|
|
6
|
-
import 'package:kasy_kit/features/
|
|
3
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/premium_page_factory.dart';
|
|
4
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_background_gradient.dart';
|
|
5
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_bottom_menu.dart';
|
|
6
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/premium_close_button.dart';
|
|
7
7
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
8
8
|
|
|
9
9
|
class PaywallEmptyState extends StatelessWidget {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import 'package:flutter/foundation.dart';
|
|
2
2
|
import 'package:flutter/material.dart';
|
|
3
3
|
import 'package:kasy_kit/components/components.dart';
|
|
4
|
-
import 'package:kasy_kit/core/config/features.dart';
|
|
5
4
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
6
|
-
import 'package:kasy_kit/
|
|
7
|
-
import 'package:kasy_kit/features/
|
|
5
|
+
import 'package:kasy_kit/environments.dart';
|
|
6
|
+
import 'package:kasy_kit/features/subscriptions/ui/component/premium_page_factory.dart';
|
|
8
7
|
import 'package:kasy_kit/i18n/translations.g.dart';
|
|
9
8
|
import 'package:url_launcher/url_launcher.dart';
|
|
10
9
|
|
|
@@ -26,7 +25,7 @@ class BottomPremiumMenu extends StatelessWidget {
|
|
|
26
25
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
27
26
|
children: [
|
|
28
27
|
_buildPrivacyButton(context),
|
|
29
|
-
|
|
28
|
+
_buildRestoreButton(context),
|
|
30
29
|
_buildTermsButton(context),
|
|
31
30
|
],
|
|
32
31
|
);
|
|
@@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
|
|
|
4
4
|
import 'package:flutter_animate/flutter_animate.dart';
|
|
5
5
|
import 'package:kasy_kit/core/haptics/kasy_haptics.dart';
|
|
6
6
|
import 'package:kasy_kit/core/theme/theme.dart';
|
|
7
|
-
import 'package:kasy_kit/features/
|
|
7
|
+
import 'package:kasy_kit/features/subscriptions/ui/widgets/selectable_row.dart';
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class SelectableColGroup<T> extends StatefulWidget {
|