rothzerg 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +949 -0
- package/package.json +27 -0
- package/readme.md +0 -0
- package/templates/_base-website/App.tsx +59 -0
- package/templates/_base-website/InitialDataContext.tsx +21 -0
- package/templates/_base-website/_gitignore +5 -0
- package/templates/_base-website/client.tsx +26 -0
- package/templates/_base-website/components/DeepLinkLayout.css +41 -0
- package/templates/_base-website/components/DeepLinkLayout.tsx +39 -0
- package/templates/_base-website/components/DownloadSection.css +60 -0
- package/templates/_base-website/components/DownloadSection.tsx +61 -0
- package/templates/_base-website/components/SiteFeaturesSection.tsx +68 -0
- package/templates/_base-website/components/SiteFooter.tsx +29 -0
- package/templates/_base-website/components/SiteHeroSection.tsx +30 -0
- package/templates/_base-website/components/SiteHighlightsSection.tsx +38 -0
- package/templates/_base-website/components/SiteLanguageSwitcher.tsx +9 -0
- package/templates/_base-website/components/SiteNavigation.tsx +24 -0
- package/templates/_base-website/config.ts +78 -0
- package/templates/_base-website/data/blog/authors.json +18 -0
- package/templates/_base-website/data/blog/categories.json +53 -0
- package/templates/_base-website/data/blog/posts.json +29 -0
- package/templates/_base-website/data/blog/tags.json +86 -0
- package/templates/_base-website/i18n/config.ts +60 -0
- package/templates/_base-website/i18n/sections/blog/_index.ts +41 -0
- package/templates/_base-website/i18n/sections/blog/ar.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/de.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/en.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/es.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/fr.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/hi.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/id.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/it.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/ja.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/ko.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/nl.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/pl.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/pt.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/ru.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/sv.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/th.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/tr.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/vi.ts +24 -0
- package/templates/_base-website/i18n/sections/blog/zh.ts +24 -0
- package/templates/_base-website/i18n/sections/common/_index.ts +41 -0
- package/templates/_base-website/i18n/sections/common/ar.ts +29 -0
- package/templates/_base-website/i18n/sections/common/de.ts +29 -0
- package/templates/_base-website/i18n/sections/common/en.ts +29 -0
- package/templates/_base-website/i18n/sections/common/es.ts +29 -0
- package/templates/_base-website/i18n/sections/common/fr.ts +29 -0
- package/templates/_base-website/i18n/sections/common/hi.ts +29 -0
- package/templates/_base-website/i18n/sections/common/id.ts +29 -0
- package/templates/_base-website/i18n/sections/common/it.ts +29 -0
- package/templates/_base-website/i18n/sections/common/ja.ts +29 -0
- package/templates/_base-website/i18n/sections/common/ko.ts +29 -0
- package/templates/_base-website/i18n/sections/common/nl.ts +29 -0
- package/templates/_base-website/i18n/sections/common/pl.ts +29 -0
- package/templates/_base-website/i18n/sections/common/pt.ts +29 -0
- package/templates/_base-website/i18n/sections/common/ru.ts +29 -0
- package/templates/_base-website/i18n/sections/common/sv.ts +29 -0
- package/templates/_base-website/i18n/sections/common/th.ts +29 -0
- package/templates/_base-website/i18n/sections/common/tr.ts +29 -0
- package/templates/_base-website/i18n/sections/common/vi.ts +29 -0
- package/templates/_base-website/i18n/sections/common/zh.ts +29 -0
- package/templates/_base-website/i18n/sections/deepLink/_index.ts +41 -0
- package/templates/_base-website/i18n/sections/deepLink/ar.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/de.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/en.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/es.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/fr.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/hi.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/id.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/it.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/ja.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/ko.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/nl.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/pl.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/pt.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/ru.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/sv.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/th.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/tr.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/vi.ts +14 -0
- package/templates/_base-website/i18n/sections/deepLink/zh.ts +14 -0
- package/templates/_base-website/i18n/sections/home/_index.ts +41 -0
- package/templates/_base-website/i18n/sections/home/ar.ts +85 -0
- package/templates/_base-website/i18n/sections/home/de.ts +85 -0
- package/templates/_base-website/i18n/sections/home/en.ts +85 -0
- package/templates/_base-website/i18n/sections/home/es.ts +85 -0
- package/templates/_base-website/i18n/sections/home/fr.ts +85 -0
- package/templates/_base-website/i18n/sections/home/hi.ts +85 -0
- package/templates/_base-website/i18n/sections/home/id.ts +85 -0
- package/templates/_base-website/i18n/sections/home/it.ts +85 -0
- package/templates/_base-website/i18n/sections/home/ja.ts +85 -0
- package/templates/_base-website/i18n/sections/home/ko.ts +85 -0
- package/templates/_base-website/i18n/sections/home/nl.ts +85 -0
- package/templates/_base-website/i18n/sections/home/pl.ts +85 -0
- package/templates/_base-website/i18n/sections/home/pt.ts +85 -0
- package/templates/_base-website/i18n/sections/home/ru.ts +85 -0
- package/templates/_base-website/i18n/sections/home/sv.ts +85 -0
- package/templates/_base-website/i18n/sections/home/th.ts +85 -0
- package/templates/_base-website/i18n/sections/home/tr.ts +85 -0
- package/templates/_base-website/i18n/sections/home/vi.ts +85 -0
- package/templates/_base-website/i18n/sections/home/zh.ts +85 -0
- package/templates/_base-website/i18n/sections/support/_index.ts +41 -0
- package/templates/_base-website/i18n/sections/support/ar.ts +37 -0
- package/templates/_base-website/i18n/sections/support/de.ts +37 -0
- package/templates/_base-website/i18n/sections/support/en.ts +37 -0
- package/templates/_base-website/i18n/sections/support/es.ts +37 -0
- package/templates/_base-website/i18n/sections/support/fr.ts +37 -0
- package/templates/_base-website/i18n/sections/support/hi.ts +37 -0
- package/templates/_base-website/i18n/sections/support/id.ts +37 -0
- package/templates/_base-website/i18n/sections/support/it.ts +37 -0
- package/templates/_base-website/i18n/sections/support/ja.ts +37 -0
- package/templates/_base-website/i18n/sections/support/ko.ts +37 -0
- package/templates/_base-website/i18n/sections/support/nl.ts +37 -0
- package/templates/_base-website/i18n/sections/support/pl.ts +37 -0
- package/templates/_base-website/i18n/sections/support/pt.ts +37 -0
- package/templates/_base-website/i18n/sections/support/ru.ts +37 -0
- package/templates/_base-website/i18n/sections/support/sv.ts +37 -0
- package/templates/_base-website/i18n/sections/support/th.ts +37 -0
- package/templates/_base-website/i18n/sections/support/tr.ts +37 -0
- package/templates/_base-website/i18n/sections/support/vi.ts +37 -0
- package/templates/_base-website/i18n/sections/support/zh.ts +37 -0
- package/templates/_base-website/i18n/translations.ts +25 -0
- package/templates/_base-website/index.ts +460 -0
- package/templates/_base-website/pages/404.tsx +35 -0
- package/templates/_base-website/pages/blog/author.tsx +97 -0
- package/templates/_base-website/pages/blog/category.tsx +89 -0
- package/templates/_base-website/pages/blog/index.tsx +81 -0
- package/templates/_base-website/pages/blog/post.tsx +110 -0
- package/templates/_base-website/pages/blog/tag.tsx +86 -0
- package/templates/_base-website/pages/custom-pages/example.tsx +54 -0
- package/templates/_base-website/pages/index.tsx +29 -0
- package/templates/_base-website/pages/privacy.tsx +45 -0
- package/templates/_base-website/pages/support.tsx +154 -0
- package/templates/_base-website/pages/terms.tsx +68 -0
- package/templates/_base-website/public/images/16.png +0 -0
- package/templates/_base-website/public/images/apple-touch-icon.png +0 -0
- package/templates/_base-website/public/images/favicon-32x32.png +0 -0
- package/templates/_base-website/public/images/favicon.png +0 -0
- package/templates/_base-website/public/images/logo_dark.svg +6 -0
- package/templates/_base-website/public/images/logo_light.svg +6 -0
- package/templates/_base-website/public/images/og-image.png +0 -0
- package/templates/_base-website/public/images/screenshots/ar_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/de_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/en_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/es_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/fr_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/hi_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/id_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/it_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/ja_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/ko_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/nl_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/pl_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/pt_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/ru_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/sv_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/th_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/tr_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/vi_dashboard.jpg +0 -0
- package/templates/_base-website/public/images/screenshots/zh_dashboard.jpg +0 -0
- package/templates/_base-website/rothzerg.template.json +63 -0
- package/templates/_base-website/styles/404.css +32 -0
- package/templates/_base-website/styles/_app.css +131 -0
- package/templates/_base-website/styles/_shared.css +194 -0
- package/templates/_base-website/styles/index.css +1 -0
- package/templates/_base-website/styles/privacy.css +1 -0
- package/templates/_base-website/styles/support.css +148 -0
- package/templates/_base-website/styles/terms.css +22 -0
- package/templates/mobile-app/_gitignore +46 -0
- package/templates/mobile-app/analysis_options.yaml +28 -0
- package/templates/mobile-app/android/app/build.gradle.kts +56 -0
- package/templates/mobile-app/android/app/google-services.json +29 -0
- package/templates/mobile-app/android/app/src/debug/AndroidManifest.xml +7 -0
- package/templates/mobile-app/android/app/src/main/AndroidManifest.xml +54 -0
- package/templates/mobile-app/android/app/src/main/kotlin/com/example/{{projectNameSnake}}/MainActivity.kt +5 -0
- package/templates/mobile-app/android/app/src/main/res/drawable/launch_background.xml +12 -0
- package/templates/mobile-app/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
- package/templates/mobile-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/mobile-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/mobile-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/mobile-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/mobile-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/mobile-app/android/app/src/main/res/values/styles.xml +18 -0
- package/templates/mobile-app/android/app/src/main/res/values-night/styles.xml +18 -0
- package/templates/mobile-app/android/app/src/profile/AndroidManifest.xml +7 -0
- package/templates/mobile-app/android/build.gradle.kts +24 -0
- package/templates/mobile-app/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/templates/mobile-app/android/gradle.properties +2 -0
- package/templates/mobile-app/android/settings.gradle.kts +31 -0
- package/templates/mobile-app/assets/icons/logo.png +0 -0
- package/templates/mobile-app/assets/icons/logo_dark.svg +5 -0
- package/templates/mobile-app/assets/icons/logo_light.svg +5 -0
- package/templates/mobile-app/assets/lottie/tick.json +1 -0
- package/templates/mobile-app/devtools_options.yaml +3 -0
- package/templates/mobile-app/ios/Flutter/AppFrameworkInfo.plist +26 -0
- package/templates/mobile-app/ios/Flutter/Debug.xcconfig +2 -0
- package/templates/mobile-app/ios/Flutter/Release.xcconfig +2 -0
- package/templates/mobile-app/ios/Podfile +46 -0
- package/templates/mobile-app/ios/Podfile.lock +1807 -0
- package/templates/mobile-app/ios/Runner/AppDelegate.swift +16 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +122 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +23 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png +0 -0
- package/templates/mobile-app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +5 -0
- package/templates/mobile-app/ios/Runner/Base.lproj/LaunchScreen.storyboard +37 -0
- package/templates/mobile-app/ios/Runner/Base.lproj/Main.storyboard +26 -0
- package/templates/mobile-app/ios/Runner/GoogleService-Info.plist +30 -0
- package/templates/mobile-app/ios/Runner/Info.plist +70 -0
- package/templates/mobile-app/ios/Runner/Runner-Bridging-Header.h +1 -0
- package/templates/mobile-app/ios/Runner.xcodeproj/project.pbxproj +772 -0
- package/templates/mobile-app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/templates/mobile-app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/templates/mobile-app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/templates/mobile-app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +101 -0
- package/templates/mobile-app/ios/Runner.xcworkspace/contents.xcworkspacedata +10 -0
- package/templates/mobile-app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/templates/mobile-app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/templates/mobile-app/ios/RunnerTests/RunnerTests.swift +12 -0
- package/templates/mobile-app/l10n.yaml +5 -0
- package/templates/mobile-app/lib/core/config/app_config.dart +76 -0
- package/templates/mobile-app/lib/core/constants/app_colors.dart +13 -0
- package/templates/mobile-app/lib/core/constants/app_constants.dart +123 -0
- package/templates/mobile-app/lib/core/constants/countries.dart +199 -0
- package/templates/mobile-app/lib/core/constants/keys.dart +46 -0
- package/templates/mobile-app/lib/core/constants/languages.dart +51 -0
- package/templates/mobile-app/lib/core/services/admin_service.dart +271 -0
- package/templates/mobile-app/lib/core/services/analytics_service.dart +296 -0
- package/templates/mobile-app/lib/core/services/auth_service.dart +185 -0
- package/templates/mobile-app/lib/core/services/device_service.dart +228 -0
- package/templates/mobile-app/lib/core/services/firebase_service.dart +490 -0
- package/templates/mobile-app/lib/core/services/in_app_messaging_service.dart +166 -0
- package/templates/mobile-app/lib/core/services/logging_service.dart +451 -0
- package/templates/mobile-app/lib/core/services/messaging_service.dart +460 -0
- package/templates/mobile-app/lib/core/services/remote_config_service.dart +167 -0
- package/templates/mobile-app/lib/core/services/revenue_cat_service.dart +364 -0
- package/templates/mobile-app/lib/core/services/storage_service.dart +313 -0
- package/templates/mobile-app/lib/core/theme/dark_theme.dart +295 -0
- package/templates/mobile-app/lib/core/theme/light_theme.dart +296 -0
- package/templates/mobile-app/lib/core/utils/formatters.dart +236 -0
- package/templates/mobile-app/lib/core/utils/image_picker_helper.dart +78 -0
- package/templates/mobile-app/lib/core/utils/validators.dart +292 -0
- package/templates/mobile-app/lib/firebase_options.dart +19 -0
- package/templates/mobile-app/lib/l10n/app_en.arb +1371 -0
- package/templates/mobile-app/lib/l10n/app_localizations.dart +2042 -0
- package/templates/mobile-app/lib/l10n/app_localizations_en.dart +1033 -0
- package/templates/mobile-app/lib/main.dart +152 -0
- package/templates/mobile-app/lib/models/device_model.dart +90 -0
- package/templates/mobile-app/lib/models/news_banner.dart +53 -0
- package/templates/mobile-app/lib/models/user_model.dart +120 -0
- package/templates/mobile-app/lib/providers/admin_provider.dart +67 -0
- package/templates/mobile-app/lib/providers/auth_provider.dart +328 -0
- package/templates/mobile-app/lib/providers/remote_config_provider.dart +81 -0
- package/templates/mobile-app/lib/providers/subscription_provider.dart +67 -0
- package/templates/mobile-app/lib/providers/theme_provider.dart +51 -0
- package/templates/mobile-app/lib/screens/admin/admin_panel_screen.dart +436 -0
- package/templates/mobile-app/lib/screens/admin/admin_panel_user_details_screen.dart +942 -0
- package/templates/mobile-app/lib/screens/admin/admin_panel_users_screen.dart +344 -0
- package/templates/mobile-app/lib/screens/auth/auth_home_screen.dart +266 -0
- package/templates/mobile-app/lib/screens/auth/forgot_password_screen.dart +214 -0
- package/templates/mobile-app/lib/screens/auth/login_screen.dart +312 -0
- package/templates/mobile-app/lib/screens/auth/profile_setup_screen.dart +157 -0
- package/templates/mobile-app/lib/screens/auth/register_screen.dart +288 -0
- package/templates/mobile-app/lib/screens/developer/developer_panel_screen.dart +436 -0
- package/templates/mobile-app/lib/screens/developer/remote_config_screen.dart +315 -0
- package/templates/mobile-app/lib/screens/developer/remote_config_test_screen.dart +461 -0
- package/templates/mobile-app/lib/screens/home/home_screen.dart +270 -0
- package/templates/mobile-app/lib/screens/legal/privacy_policy_screen.dart +63 -0
- package/templates/mobile-app/lib/screens/legal/terms_screen.dart +82 -0
- package/templates/mobile-app/lib/screens/main_navigation_screen.dart +85 -0
- package/templates/mobile-app/lib/screens/premium/subscription_screen.dart +516 -0
- package/templates/mobile-app/lib/screens/profile/edit_profile_screen.dart +246 -0
- package/templates/mobile-app/lib/screens/settings/about_app_screen.dart +200 -0
- package/templates/mobile-app/lib/screens/settings/cache_manager_screen.dart +400 -0
- package/templates/mobile-app/lib/screens/settings/change_password_screen.dart +269 -0
- package/templates/mobile-app/lib/screens/settings/delete_account_screen.dart +261 -0
- package/templates/mobile-app/lib/screens/settings/settings_screen.dart +400 -0
- package/templates/mobile-app/lib/screens/splash/splash_screen.dart +125 -0
- package/templates/mobile-app/lib/widgets/app_button.dart +255 -0
- package/templates/mobile-app/lib/widgets/app_drawer.dart +207 -0
- package/templates/mobile-app/lib/widgets/bottom_sheet_selector.dart +79 -0
- package/templates/mobile-app/lib/widgets/button_banner.dart +177 -0
- package/templates/mobile-app/lib/widgets/country_picker.dart +169 -0
- package/templates/mobile-app/lib/widgets/custom_app_bar.dart +30 -0
- package/templates/mobile-app/lib/widgets/email_verification_banner.dart +163 -0
- package/templates/mobile-app/lib/widgets/empty_screen.dart +42 -0
- package/templates/mobile-app/lib/widgets/language_picker.dart +145 -0
- package/templates/mobile-app/lib/widgets/news_banner_widget.dart +264 -0
- package/templates/mobile-app/lib/widgets/remote_config/remote_config_widgets.dart +294 -0
- package/templates/mobile-app/lib/widgets/section_header.dart +23 -0
- package/templates/mobile-app/lib/widgets/success_overlay.dart +117 -0
- package/templates/mobile-app/lib/widgets/top_notification.dart +263 -0
- package/templates/mobile-app/lib/widgets/user_avatar_picker.dart +58 -0
- package/templates/mobile-app/pubspec.yaml +97 -0
- package/templates/mobile-app/rothzerg.template.json +43 -0
- package/templates/web-app/_gitignore +4 -0
- package/templates/web-app/index.html +12 -0
- package/templates/web-app/package.json +23 -0
- package/templates/web-app/rothzerg.template.json +41 -0
- package/templates/web-app/src/App.css +6 -0
- package/templates/web-app/src/App.tsx +12 -0
- package/templates/web-app/src/index.css +14 -0
- package/templates/web-app/src/main.tsx +10 -0
- package/templates/web-app/tsconfig.app.json +20 -0
- package/templates/web-app/tsconfig.json +7 -0
- package/templates/web-app/tsconfig.node.json +18 -0
- package/templates/web-app/vite.config.ts +6 -0
- package/templates/website-blog/overrides/config.ts +76 -0
- package/templates/website-blog/overrides/pages/index.tsx +63 -0
- package/templates/website-blog/rothzerg.template.json +29 -0
- package/templates/website-business/overrides/App.tsx +49 -0
- package/templates/website-business/overrides/components/SiteHeroSection.tsx +33 -0
- package/templates/website-business/overrides/config.ts +76 -0
- package/templates/website-business/overrides/pages/about.tsx +50 -0
- package/templates/website-business/overrides/pages/contact.tsx +61 -0
- package/templates/website-business/overrides/pages/index.tsx +37 -0
- package/templates/website-business/overrides/pages/services.tsx +70 -0
- package/templates/website-business/rothzerg.template.json +18 -0
- package/templates/website-mobile/overrides/App.tsx +62 -0
- package/templates/website-mobile/overrides/components/SiteHeroSection.tsx +18 -0
- package/templates/website-mobile/overrides/config.ts +76 -0
- package/templates/website-mobile/overrides/pages/index.tsx +34 -0
- package/templates/website-mobile/rothzerg.template.json +64 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import 'package:flutter/material.dart';
|
|
2
|
+
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
3
|
+
import 'package:cloud_firestore/cloud_firestore.dart';
|
|
4
|
+
import 'package:device_info_plus/device_info_plus.dart';
|
|
5
|
+
import 'dart:io';
|
|
6
|
+
import '../../core/config/app_config.dart';
|
|
7
|
+
import '../../core/services/logging_service.dart';
|
|
8
|
+
import '../../l10n/app_localizations.dart';
|
|
9
|
+
import '../../providers/auth_provider.dart';
|
|
10
|
+
import '../../providers/subscription_provider.dart';
|
|
11
|
+
import '../../widgets/custom_app_bar.dart';
|
|
12
|
+
import '../../widgets/app_button.dart';
|
|
13
|
+
import '../../widgets/top_notification.dart';
|
|
14
|
+
import '../auth/login_screen.dart';
|
|
15
|
+
|
|
16
|
+
class DeleteAccountScreen extends ConsumerStatefulWidget {
|
|
17
|
+
const DeleteAccountScreen({super.key});
|
|
18
|
+
|
|
19
|
+
@override
|
|
20
|
+
ConsumerState<DeleteAccountScreen> createState() =>
|
|
21
|
+
_DeleteAccountScreenState();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class _DeleteAccountScreenState extends ConsumerState<DeleteAccountScreen> {
|
|
25
|
+
bool _isDeleting = false;
|
|
26
|
+
final LoggingService _loggingService = LoggingService();
|
|
27
|
+
|
|
28
|
+
Future<void> _deleteAccount() async {
|
|
29
|
+
final l10n = AppLocalizations.of(context)!;
|
|
30
|
+
|
|
31
|
+
// Show confirmation dialog
|
|
32
|
+
final confirmed = await showDialog<bool>(
|
|
33
|
+
context: context,
|
|
34
|
+
builder: (context) => AlertDialog(
|
|
35
|
+
title: Text(l10n.confirmDeletion),
|
|
36
|
+
content: Text(l10n.confirmDeletionMessage),
|
|
37
|
+
actions: [
|
|
38
|
+
TextButton(
|
|
39
|
+
onPressed: () => Navigator.pop(context, false),
|
|
40
|
+
child: Text(l10n.cancel),
|
|
41
|
+
),
|
|
42
|
+
TextButton(
|
|
43
|
+
onPressed: () => Navigator.pop(context, true),
|
|
44
|
+
style: TextButton.styleFrom(
|
|
45
|
+
foregroundColor: Theme.of(context).colorScheme.error,
|
|
46
|
+
),
|
|
47
|
+
child: Text(l10n.delete),
|
|
48
|
+
),
|
|
49
|
+
],
|
|
50
|
+
),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
if (confirmed != true) return;
|
|
54
|
+
|
|
55
|
+
setState(() {
|
|
56
|
+
_isDeleting = true;
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
final authController = ref.read(authControllerProvider);
|
|
61
|
+
final user = authController.currentUser;
|
|
62
|
+
|
|
63
|
+
if (user == null) {
|
|
64
|
+
throw Exception('No user logged in');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Get device information
|
|
68
|
+
final deviceInfo = DeviceInfoPlugin();
|
|
69
|
+
String deviceModel = 'Unknown';
|
|
70
|
+
String osVersion = 'Unknown';
|
|
71
|
+
|
|
72
|
+
if (Platform.isAndroid) {
|
|
73
|
+
final androidInfo = await deviceInfo.androidInfo;
|
|
74
|
+
deviceModel = androidInfo.model;
|
|
75
|
+
osVersion = 'Android ${androidInfo.version.release}';
|
|
76
|
+
} else if (Platform.isIOS) {
|
|
77
|
+
final iosInfo = await deviceInfo.iosInfo;
|
|
78
|
+
deviceModel = iosInfo.model;
|
|
79
|
+
osVersion = 'iOS ${iosInfo.systemVersion}';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Calculate deletion date (30 days from now)
|
|
83
|
+
final deletionDate = DateTime.now().add(const Duration(days: 30));
|
|
84
|
+
|
|
85
|
+
// Get subscription details
|
|
86
|
+
final customerInfo = await ref
|
|
87
|
+
.read(customerInfoProvider.future)
|
|
88
|
+
.catchError((_) => null);
|
|
89
|
+
final isPremium = await ref
|
|
90
|
+
.read(premiumStatusProvider.future)
|
|
91
|
+
.catchError((_) => false);
|
|
92
|
+
|
|
93
|
+
Map<String, dynamic> subscriptionData = {
|
|
94
|
+
'isPremium': isPremium,
|
|
95
|
+
'hasActiveSubscription': false,
|
|
96
|
+
'subscriptionProductId': null,
|
|
97
|
+
'subscriptionExpirationDate': null,
|
|
98
|
+
'subscriptionPurchaseDate': null,
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
if (customerInfo != null && customerInfo.entitlements.active.isNotEmpty) {
|
|
102
|
+
final activeEntitlement = customerInfo.entitlements.active.values.first;
|
|
103
|
+
final expirationDate = activeEntitlement.expirationDate;
|
|
104
|
+
final purchaseDate = activeEntitlement.latestPurchaseDate;
|
|
105
|
+
|
|
106
|
+
subscriptionData = {
|
|
107
|
+
'isPremium': isPremium,
|
|
108
|
+
'hasActiveSubscription': true,
|
|
109
|
+
'subscriptionProductId': activeEntitlement.productIdentifier,
|
|
110
|
+
'subscriptionExpirationDate': expirationDate != null
|
|
111
|
+
? Timestamp.fromDate(DateTime.parse(expirationDate))
|
|
112
|
+
: null,
|
|
113
|
+
'subscriptionPurchaseDate': Timestamp.fromDate(
|
|
114
|
+
DateTime.parse(purchaseDate),
|
|
115
|
+
),
|
|
116
|
+
'subscriptionWillRenew': activeEntitlement.willRenew,
|
|
117
|
+
'subscriptionStore': activeEntitlement.store.name,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Create account deletion request in Firestore
|
|
122
|
+
await FirebaseFirestore.instance
|
|
123
|
+
.collection('accountdeleterequest')
|
|
124
|
+
.doc(user.uid)
|
|
125
|
+
.set({
|
|
126
|
+
'userId': user.uid,
|
|
127
|
+
'email': user.email,
|
|
128
|
+
'displayName': user.displayName,
|
|
129
|
+
'phoneNumber': user.phoneNumber,
|
|
130
|
+
'requestedAt': FieldValue.serverTimestamp(),
|
|
131
|
+
'deletionDate': Timestamp.fromDate(deletionDate),
|
|
132
|
+
'deviceModel': deviceModel,
|
|
133
|
+
'osVersion': osVersion,
|
|
134
|
+
'appVersion': AppConfig.displayName,
|
|
135
|
+
'subscription': subscriptionData,
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// Log account deletion request
|
|
139
|
+
await _loggingService.logAccountDeletion(
|
|
140
|
+
uid: user.uid,
|
|
141
|
+
additionalData: {
|
|
142
|
+
'scheduled_deletion_date': deletionDate.toIso8601String(),
|
|
143
|
+
'isPremium': isPremium,
|
|
144
|
+
},
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
// Sign out the user
|
|
148
|
+
await authController.signOut();
|
|
149
|
+
|
|
150
|
+
if (mounted) {
|
|
151
|
+
// Show success notification
|
|
152
|
+
TopNotification.showSuccess(
|
|
153
|
+
context,
|
|
154
|
+
message: l10n.accountDeletionScheduled,
|
|
155
|
+
duration: const Duration(seconds: 4),
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
// Navigate to login screen
|
|
159
|
+
Navigator.of(context).pushAndRemoveUntil(
|
|
160
|
+
MaterialPageRoute(builder: (context) => const LoginScreen()),
|
|
161
|
+
(route) => false,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
} catch (e) {
|
|
165
|
+
setState(() {
|
|
166
|
+
_isDeleting = false;
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
if (mounted) {
|
|
170
|
+
TopNotification.showError(
|
|
171
|
+
context,
|
|
172
|
+
message: '${l10n.deletionFailed}: $e',
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@override
|
|
179
|
+
Widget build(BuildContext context) {
|
|
180
|
+
final l10n = AppLocalizations.of(context)!;
|
|
181
|
+
final theme = Theme.of(context);
|
|
182
|
+
|
|
183
|
+
return Scaffold(
|
|
184
|
+
appBar: CustomAppBar(title: l10n.deleteAccount),
|
|
185
|
+
body: Padding(
|
|
186
|
+
padding: const EdgeInsets.all(24.0),
|
|
187
|
+
child: Column(
|
|
188
|
+
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
189
|
+
children: [
|
|
190
|
+
// Warning Icon
|
|
191
|
+
Icon(
|
|
192
|
+
Icons.warning_amber_rounded,
|
|
193
|
+
size: 80,
|
|
194
|
+
color: theme.colorScheme.error,
|
|
195
|
+
),
|
|
196
|
+
const SizedBox(height: 32),
|
|
197
|
+
|
|
198
|
+
// Warning Message
|
|
199
|
+
Card(
|
|
200
|
+
child: Padding(
|
|
201
|
+
padding: const EdgeInsets.all(20.0),
|
|
202
|
+
child: Column(
|
|
203
|
+
crossAxisAlignment: CrossAxisAlignment.start,
|
|
204
|
+
children: [
|
|
205
|
+
Text(
|
|
206
|
+
l10n.deleteAccountWarning(AppConfig.displayName),
|
|
207
|
+
style: theme.textTheme.bodyLarge?.copyWith(height: 1.5),
|
|
208
|
+
),
|
|
209
|
+
const SizedBox(height: 24),
|
|
210
|
+
Text(
|
|
211
|
+
l10n.deleteAccountConfirmation,
|
|
212
|
+
style: theme.textTheme.titleMedium?.copyWith(
|
|
213
|
+
fontWeight: FontWeight.bold,
|
|
214
|
+
color: theme.colorScheme.error,
|
|
215
|
+
),
|
|
216
|
+
),
|
|
217
|
+
],
|
|
218
|
+
),
|
|
219
|
+
),
|
|
220
|
+
),
|
|
221
|
+
|
|
222
|
+
const Spacer(),
|
|
223
|
+
|
|
224
|
+
// Delete and Cancel Buttons
|
|
225
|
+
Row(
|
|
226
|
+
children: [
|
|
227
|
+
Expanded(
|
|
228
|
+
child: AppButton(
|
|
229
|
+
label: l10n.delete,
|
|
230
|
+
onPressed: _isDeleting ? null : _deleteAccount,
|
|
231
|
+
variant: AppButtonVariant.primary,
|
|
232
|
+
size: AppButtonSize.large,
|
|
233
|
+
isFullWidth: true,
|
|
234
|
+
isLoading: _isDeleting,
|
|
235
|
+
leading: const Icon(
|
|
236
|
+
Icons.delete_forever,
|
|
237
|
+
color: Colors.white,
|
|
238
|
+
),
|
|
239
|
+
),
|
|
240
|
+
),
|
|
241
|
+
const SizedBox(width: 12),
|
|
242
|
+
Expanded(
|
|
243
|
+
child: AppButton(
|
|
244
|
+
label: l10n.cancel,
|
|
245
|
+
onPressed: _isDeleting
|
|
246
|
+
? null
|
|
247
|
+
: () => Navigator.pop(context),
|
|
248
|
+
variant: AppButtonVariant.outlined,
|
|
249
|
+
size: AppButtonSize.large,
|
|
250
|
+
isFullWidth: true,
|
|
251
|
+
),
|
|
252
|
+
),
|
|
253
|
+
],
|
|
254
|
+
),
|
|
255
|
+
const SizedBox(height: 24),
|
|
256
|
+
],
|
|
257
|
+
),
|
|
258
|
+
),
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import 'package:flutter/material.dart';
|
|
2
|
+
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
3
|
+
import 'package:package_info_plus/package_info_plus.dart';
|
|
4
|
+
import 'package:share_plus/share_plus.dart';
|
|
5
|
+
import '../../core/config/app_config.dart';
|
|
6
|
+
import '../../providers/theme_provider.dart';
|
|
7
|
+
import '../../providers/auth_provider.dart';
|
|
8
|
+
import '../../l10n/app_localizations.dart';
|
|
9
|
+
import '../../widgets/app_button.dart';
|
|
10
|
+
import '../../widgets/section_header.dart';
|
|
11
|
+
import '../../widgets/language_picker.dart';
|
|
12
|
+
import '../../widgets/bottom_sheet_selector.dart';
|
|
13
|
+
import '../../core/constants/languages.dart';
|
|
14
|
+
import '../../widgets/top_notification.dart';
|
|
15
|
+
import '../../widgets/success_overlay.dart';
|
|
16
|
+
import '../auth/auth_home_screen.dart';
|
|
17
|
+
import '../legal/privacy_policy_screen.dart';
|
|
18
|
+
import '../legal/terms_screen.dart';
|
|
19
|
+
import '../premium/subscription_screen.dart';
|
|
20
|
+
import '../profile/edit_profile_screen.dart';
|
|
21
|
+
import '../admin/admin_panel_screen.dart';
|
|
22
|
+
import 'change_password_screen.dart';
|
|
23
|
+
import 'about_app_screen.dart';
|
|
24
|
+
import 'cache_manager_screen.dart';
|
|
25
|
+
import 'delete_account_screen.dart';
|
|
26
|
+
|
|
27
|
+
class SettingsScreen extends ConsumerStatefulWidget {
|
|
28
|
+
const SettingsScreen({super.key});
|
|
29
|
+
|
|
30
|
+
@override
|
|
31
|
+
ConsumerState<SettingsScreen> createState() => _SettingsScreenState();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class _SettingsScreenState extends ConsumerState<SettingsScreen> {
|
|
35
|
+
String _appVersion = '';
|
|
36
|
+
Language? _selectedLanguage;
|
|
37
|
+
String? _lastLang;
|
|
38
|
+
|
|
39
|
+
@override
|
|
40
|
+
void initState() {
|
|
41
|
+
super.initState();
|
|
42
|
+
_loadAppInfo();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
Future<void> _loadAppInfo() async {
|
|
46
|
+
final packageInfo = await PackageInfo.fromPlatform();
|
|
47
|
+
setState(() {
|
|
48
|
+
_appVersion = '${packageInfo.version} (${packageInfo.buildNumber})';
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
Future<void> _updateLanguage(Language language) async {
|
|
53
|
+
try {
|
|
54
|
+
final authState = ref.read(authStateProvider);
|
|
55
|
+
final uid = authState.value?.uid;
|
|
56
|
+
|
|
57
|
+
if (uid != null) {
|
|
58
|
+
await ref
|
|
59
|
+
.read(authControllerProvider)
|
|
60
|
+
.setupProfile(uid: uid, lang: language.code);
|
|
61
|
+
|
|
62
|
+
if (mounted) {
|
|
63
|
+
setState(() {
|
|
64
|
+
_selectedLanguage = language;
|
|
65
|
+
});
|
|
66
|
+
await SuccessOverlay.show(context);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
} catch (e) {
|
|
70
|
+
if (mounted) {
|
|
71
|
+
TopNotification.showError(
|
|
72
|
+
context,
|
|
73
|
+
message: 'Failed to update language: $e',
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@override
|
|
80
|
+
Widget build(BuildContext context) {
|
|
81
|
+
final l10n = AppLocalizations.of(context)!;
|
|
82
|
+
final themeMode = ref.watch(themeModeProvider);
|
|
83
|
+
final theme = Theme.of(context);
|
|
84
|
+
final authState = ref.watch(authStateProvider);
|
|
85
|
+
final uid = authState.value?.uid;
|
|
86
|
+
|
|
87
|
+
// Watch user profile and update language when stream data changes
|
|
88
|
+
bool isAdmin = false;
|
|
89
|
+
if (uid != null) {
|
|
90
|
+
final userProfileAsync = ref.watch(userProfileProvider(uid));
|
|
91
|
+
userProfileAsync.whenData((userProfile) {
|
|
92
|
+
if (userProfile != null) {
|
|
93
|
+
final newLang = userProfile.lang;
|
|
94
|
+
if (_lastLang != newLang) {
|
|
95
|
+
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
96
|
+
if (mounted) {
|
|
97
|
+
setState(() {
|
|
98
|
+
_selectedLanguage = getLanguageByCode(newLang);
|
|
99
|
+
_lastLang = newLang;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
// Check if user is admin
|
|
107
|
+
isAdmin = userProfileAsync.value?.isAdmin ?? false;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return Scaffold(
|
|
111
|
+
body: ListView(
|
|
112
|
+
children: [
|
|
113
|
+
// Appearance Section
|
|
114
|
+
SectionHeader(title: l10n.appearance),
|
|
115
|
+
ListTile(
|
|
116
|
+
leading: const Icon(Icons.brightness_6_outlined),
|
|
117
|
+
title: Text(l10n.theme),
|
|
118
|
+
subtitle: Text(_getThemeModeLabel(themeMode, l10n)),
|
|
119
|
+
onTap: () => _showThemeDialog(context),
|
|
120
|
+
),
|
|
121
|
+
ListTile(
|
|
122
|
+
leading: const Icon(Icons.language_outlined),
|
|
123
|
+
title: Text(l10n.language),
|
|
124
|
+
subtitle: Text(
|
|
125
|
+
_selectedLanguage?.nativeName ?? l10n.selectYourLanguage,
|
|
126
|
+
),
|
|
127
|
+
onTap: () async {
|
|
128
|
+
final selected = await showSelectorBottomSheet<Language>(
|
|
129
|
+
context: context,
|
|
130
|
+
builder: (context) => LanguagePicker(
|
|
131
|
+
selectedLanguage: _selectedLanguage,
|
|
132
|
+
onLanguageSelected: (language) async {
|
|
133
|
+
if (language != null) {
|
|
134
|
+
await _updateLanguage(language);
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
),
|
|
138
|
+
);
|
|
139
|
+
if (selected != null) {
|
|
140
|
+
await _updateLanguage(selected);
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
),
|
|
144
|
+
const Divider(),
|
|
145
|
+
|
|
146
|
+
// Account & Security Section (only for non-anonymous users)
|
|
147
|
+
// if (user != null && !user.isAnonymous) ...[
|
|
148
|
+
SectionHeader(title: l10n.accountSecurity),
|
|
149
|
+
ListTile(
|
|
150
|
+
leading: const Icon(Icons.person_outline),
|
|
151
|
+
title: Text(l10n.editProfile),
|
|
152
|
+
trailing: const Icon(Icons.chevron_right),
|
|
153
|
+
onTap: () {
|
|
154
|
+
Navigator.push(
|
|
155
|
+
context,
|
|
156
|
+
MaterialPageRoute(
|
|
157
|
+
builder: (context) => const EditProfileScreen(),
|
|
158
|
+
),
|
|
159
|
+
);
|
|
160
|
+
},
|
|
161
|
+
),
|
|
162
|
+
ListTile(
|
|
163
|
+
leading: const Icon(Icons.lock_outlined),
|
|
164
|
+
title: Text(l10n.changePassword),
|
|
165
|
+
trailing: const Icon(Icons.chevron_right),
|
|
166
|
+
onTap: () {
|
|
167
|
+
Navigator.push(
|
|
168
|
+
context,
|
|
169
|
+
MaterialPageRoute(
|
|
170
|
+
builder: (context) => const ChangePasswordScreen(),
|
|
171
|
+
),
|
|
172
|
+
);
|
|
173
|
+
},
|
|
174
|
+
),
|
|
175
|
+
ListTile(
|
|
176
|
+
leading: const Icon(Icons.star_outline),
|
|
177
|
+
title: Text(l10n.subscription),
|
|
178
|
+
trailing: const Icon(Icons.chevron_right),
|
|
179
|
+
onTap: () {
|
|
180
|
+
Navigator.push(
|
|
181
|
+
context,
|
|
182
|
+
MaterialPageRoute(
|
|
183
|
+
builder: (context) => const SubscriptionScreen(),
|
|
184
|
+
),
|
|
185
|
+
);
|
|
186
|
+
},
|
|
187
|
+
),
|
|
188
|
+
ListTile(
|
|
189
|
+
leading: const Icon(Icons.share_outlined),
|
|
190
|
+
title: Text(l10n.tellAFriend),
|
|
191
|
+
trailing: const Icon(Icons.chevron_right),
|
|
192
|
+
onTap: () {
|
|
193
|
+
final shareMessage = l10n.shareMessage(
|
|
194
|
+
AppConfig.displayName,
|
|
195
|
+
AppConfig.website,
|
|
196
|
+
);
|
|
197
|
+
final box = context.findRenderObject() as RenderBox?;
|
|
198
|
+
SharePlus.instance.share(
|
|
199
|
+
ShareParams(
|
|
200
|
+
text: shareMessage,
|
|
201
|
+
title: l10n.shareTitle(AppConfig.displayName),
|
|
202
|
+
subject: l10n.shareSubject(AppConfig.displayName),
|
|
203
|
+
sharePositionOrigin:
|
|
204
|
+
box!.localToGlobal(Offset.zero) & box.size,
|
|
205
|
+
),
|
|
206
|
+
);
|
|
207
|
+
},
|
|
208
|
+
),
|
|
209
|
+
const Divider(),
|
|
210
|
+
// ],
|
|
211
|
+
|
|
212
|
+
// Admin Section (only for admin users)
|
|
213
|
+
if (isAdmin) ...[
|
|
214
|
+
SectionHeader(title: 'Admin'),
|
|
215
|
+
ListTile(
|
|
216
|
+
leading: Icon(
|
|
217
|
+
Icons.admin_panel_settings,
|
|
218
|
+
color: Colors.purple,
|
|
219
|
+
),
|
|
220
|
+
title: const Text('Admin Panel'),
|
|
221
|
+
trailing: const Icon(Icons.chevron_right),
|
|
222
|
+
onTap: () {
|
|
223
|
+
Navigator.push(
|
|
224
|
+
context,
|
|
225
|
+
MaterialPageRoute(
|
|
226
|
+
builder: (context) => const AdminPanelScreen(),
|
|
227
|
+
),
|
|
228
|
+
);
|
|
229
|
+
},
|
|
230
|
+
),
|
|
231
|
+
const Divider(),
|
|
232
|
+
],
|
|
233
|
+
|
|
234
|
+
// Legal Section
|
|
235
|
+
SectionHeader(title: AppConfig.displayName),
|
|
236
|
+
ListTile(
|
|
237
|
+
leading: const Icon(Icons.info_outline),
|
|
238
|
+
title: Text(l10n.aboutAppName(AppConfig.displayName)),
|
|
239
|
+
trailing: const Icon(Icons.chevron_right),
|
|
240
|
+
onTap: () {
|
|
241
|
+
Navigator.push(
|
|
242
|
+
context,
|
|
243
|
+
MaterialPageRoute(builder: (context) => const AboutAppScreen()),
|
|
244
|
+
);
|
|
245
|
+
},
|
|
246
|
+
),
|
|
247
|
+
ListTile(
|
|
248
|
+
leading: const Icon(Icons.privacy_tip_outlined),
|
|
249
|
+
title: Text(l10n.privacyPolicy),
|
|
250
|
+
trailing: const Icon(Icons.chevron_right),
|
|
251
|
+
onTap: () {
|
|
252
|
+
Navigator.push(
|
|
253
|
+
context,
|
|
254
|
+
MaterialPageRoute(
|
|
255
|
+
builder: (context) => const PrivacyPolicyScreen(),
|
|
256
|
+
),
|
|
257
|
+
);
|
|
258
|
+
},
|
|
259
|
+
),
|
|
260
|
+
ListTile(
|
|
261
|
+
leading: const Icon(Icons.description_outlined),
|
|
262
|
+
title: Text(l10n.termsAndConditions),
|
|
263
|
+
trailing: const Icon(Icons.chevron_right),
|
|
264
|
+
onTap: () {
|
|
265
|
+
Navigator.push(
|
|
266
|
+
context,
|
|
267
|
+
MaterialPageRoute(builder: (context) => const TermsScreen()),
|
|
268
|
+
);
|
|
269
|
+
},
|
|
270
|
+
),
|
|
271
|
+
const Divider(),
|
|
272
|
+
|
|
273
|
+
// About Section
|
|
274
|
+
SectionHeader(title: "System"),
|
|
275
|
+
ListTile(
|
|
276
|
+
leading: const Icon(Icons.info_outlined),
|
|
277
|
+
title: Text(l10n.appVersion),
|
|
278
|
+
subtitle: Text(_appVersion.isEmpty ? l10n.loading : _appVersion),
|
|
279
|
+
),
|
|
280
|
+
ListTile(
|
|
281
|
+
leading: const Icon(Icons.cleaning_services_outlined),
|
|
282
|
+
title: Text(l10n.cacheManager),
|
|
283
|
+
trailing: const Icon(Icons.chevron_right),
|
|
284
|
+
onTap: () {
|
|
285
|
+
Navigator.push(
|
|
286
|
+
context,
|
|
287
|
+
MaterialPageRoute(
|
|
288
|
+
builder: (context) => const CacheManagerScreen(),
|
|
289
|
+
),
|
|
290
|
+
);
|
|
291
|
+
},
|
|
292
|
+
),
|
|
293
|
+
ListTile(
|
|
294
|
+
leading: Icon(
|
|
295
|
+
Icons.delete_forever_outlined,
|
|
296
|
+
color: theme.colorScheme.error,
|
|
297
|
+
),
|
|
298
|
+
title: Text(
|
|
299
|
+
l10n.deleteAccount,
|
|
300
|
+
style: TextStyle(color: theme.colorScheme.error),
|
|
301
|
+
),
|
|
302
|
+
trailing: const Icon(Icons.chevron_right),
|
|
303
|
+
onTap: () {
|
|
304
|
+
Navigator.push(
|
|
305
|
+
context,
|
|
306
|
+
MaterialPageRoute(
|
|
307
|
+
builder: (context) => const DeleteAccountScreen(),
|
|
308
|
+
),
|
|
309
|
+
);
|
|
310
|
+
},
|
|
311
|
+
),
|
|
312
|
+
const Divider(),
|
|
313
|
+
|
|
314
|
+
const SizedBox(height: 24),
|
|
315
|
+
|
|
316
|
+
// Sign Out
|
|
317
|
+
Padding(
|
|
318
|
+
padding: const EdgeInsets.fromLTRB(16, 8, 16, 24),
|
|
319
|
+
child: AppButton(
|
|
320
|
+
label: l10n.signOut,
|
|
321
|
+
onPressed: () async {
|
|
322
|
+
await ref.read(authControllerProvider).signOut();
|
|
323
|
+
if (context.mounted) {
|
|
324
|
+
Navigator.of(context).pushAndRemoveUntil(
|
|
325
|
+
MaterialPageRoute(
|
|
326
|
+
builder: (context) => const AuthHomeScreen(),
|
|
327
|
+
),
|
|
328
|
+
(route) => false,
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
variant: AppButtonVariant.outlined,
|
|
333
|
+
size: AppButtonSize.large,
|
|
334
|
+
isFullWidth: true,
|
|
335
|
+
),
|
|
336
|
+
),
|
|
337
|
+
],
|
|
338
|
+
),
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
String _getThemeModeLabel(ThemeMode mode, AppLocalizations l10n) {
|
|
343
|
+
switch (mode) {
|
|
344
|
+
case ThemeMode.light:
|
|
345
|
+
return l10n.light;
|
|
346
|
+
case ThemeMode.dark:
|
|
347
|
+
return l10n.dark;
|
|
348
|
+
case ThemeMode.system:
|
|
349
|
+
return l10n.systemDefault;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
void _showThemeDialog(BuildContext context) {
|
|
354
|
+
final l10n = AppLocalizations.of(context)!;
|
|
355
|
+
final currentMode = ref.read(themeModeProvider);
|
|
356
|
+
|
|
357
|
+
showModalBottomSheet(
|
|
358
|
+
context: context,
|
|
359
|
+
builder: (context) => SafeArea(
|
|
360
|
+
child: Column(
|
|
361
|
+
mainAxisSize: MainAxisSize.min,
|
|
362
|
+
children: [
|
|
363
|
+
Padding(
|
|
364
|
+
padding: const EdgeInsets.all(16.0),
|
|
365
|
+
child: Text(
|
|
366
|
+
l10n.selectTheme,
|
|
367
|
+
style: Theme.of(context).textTheme.titleLarge,
|
|
368
|
+
),
|
|
369
|
+
),
|
|
370
|
+
RadioGroup<ThemeMode>(
|
|
371
|
+
groupValue: currentMode,
|
|
372
|
+
onChanged: (value) {
|
|
373
|
+
if (value != null) {
|
|
374
|
+
ref.read(themeModeProvider.notifier).setThemeMode(value);
|
|
375
|
+
Navigator.pop(context);
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
child: Column(
|
|
379
|
+
children: [
|
|
380
|
+
RadioListTile<ThemeMode>(
|
|
381
|
+
title: Text(l10n.light),
|
|
382
|
+
value: ThemeMode.light,
|
|
383
|
+
),
|
|
384
|
+
RadioListTile<ThemeMode>(
|
|
385
|
+
title: Text(l10n.dark),
|
|
386
|
+
value: ThemeMode.dark,
|
|
387
|
+
),
|
|
388
|
+
RadioListTile<ThemeMode>(
|
|
389
|
+
title: Text(l10n.systemDefault),
|
|
390
|
+
value: ThemeMode.system,
|
|
391
|
+
),
|
|
392
|
+
],
|
|
393
|
+
),
|
|
394
|
+
),
|
|
395
|
+
],
|
|
396
|
+
),
|
|
397
|
+
),
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
}
|