├── .gitignore ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutter_firebase_remote_config_demo │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── backup └── remote_config.json ├── header.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── app_router.dart ├── app_router.g.dart ├── features │ ├── app_update │ │ ├── data │ │ │ ├── app_update_service.dart │ │ │ ├── app_update_service.g.dart │ │ │ └── models │ │ │ │ ├── app_update_status.dart │ │ │ │ ├── app_update_status.freezed.dart │ │ │ │ ├── app_version.dart │ │ │ │ ├── app_version.freezed.dart │ │ │ │ └── app_version.g.dart │ │ └── widgets │ │ │ └── app_update_dialog.dart │ ├── event │ │ ├── data │ │ │ ├── event_repository.dart │ │ │ ├── event_repository.g.dart │ │ │ └── models │ │ │ │ ├── event_info.dart │ │ │ │ ├── event_info.freezed.dart │ │ │ │ ├── event_info.g.dart │ │ │ │ ├── event_session.dart │ │ │ │ ├── event_session.freezed.dart │ │ │ │ └── event_session.g.dart │ │ └── view │ │ │ └── event_page.dart │ ├── favorites │ │ └── data │ │ │ ├── enums │ │ │ └── favorite_button_type.dart │ │ │ ├── favorites_service.dart │ │ │ └── favorites_service.g.dart │ ├── firebase │ │ ├── firebase_remote_config_service.dart │ │ └── firebase_remote_config_service.g.dart │ ├── live_stream │ │ ├── data │ │ │ ├── live_stream_service.dart │ │ │ └── live_stream_service.g.dart │ │ └── widgets │ │ │ └── stream_live_notification.dart │ └── splash │ │ └── view │ │ └── splash_page.dart ├── main.dart ├── util │ ├── url_launcher.dart │ └── url_launcher.g.dart └── widgets │ ├── event_session_card.dart │ └── loader.dart └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .classpath 21 | .project 22 | .settings/ 23 | .vscode/ 24 | 25 | # Flutter repo-specific 26 | /bin/cache/ 27 | /bin/internal/bootstrap.bat 28 | /bin/internal/bootstrap.sh 29 | /bin/mingit/ 30 | /dev/benchmarks/mega_gallery/ 31 | /dev/bots/.recipe_deps 32 | /dev/bots/android_tools/ 33 | /dev/devicelab/ABresults*.json 34 | /dev/docs/doc/ 35 | /dev/docs/flutter.docs.zip 36 | /dev/docs/lib/ 37 | /dev/docs/pubspec.yaml 38 | /dev/integration_tests/**/xcuserdata 39 | /dev/integration_tests/**/Pods 40 | /packages/flutter/coverage/ 41 | version 42 | analysis_benchmark.json 43 | 44 | # packages file containing multi-root paths 45 | .packages.generated 46 | 47 | # Flutter/Dart/Pub related 48 | **/doc/api/ 49 | .dart_tool/ 50 | .flutter-plugins 51 | .flutter-plugins-dependencies 52 | **/generated_plugin_registrant.dart 53 | .packages 54 | .pub-cache/ 55 | .pub/ 56 | build/ 57 | flutter_*.png 58 | linked_*.ds 59 | unlinked.ds 60 | unlinked_spec.ds 61 | 62 | # Android related 63 | **/android/**/gradle-wrapper.jar 64 | .gradle/ 65 | **/android/captures/ 66 | **/android/gradlew 67 | **/android/gradlew.bat 68 | **/android/local.properties 69 | **/android/**/GeneratedPluginRegistrant.java 70 | **/android/key.properties 71 | *.jks 72 | 73 | # iOS/XCode related 74 | **/ios/**/*.mode1v3 75 | **/ios/**/*.mode2v3 76 | **/ios/**/*.moved-aside 77 | **/ios/**/*.pbxuser 78 | **/ios/**/*.perspectivev3 79 | **/ios/**/*sync/ 80 | **/ios/**/.sconsign.dblite 81 | **/ios/**/.tags* 82 | **/ios/**/.vagrant/ 83 | **/ios/**/DerivedData/ 84 | **/ios/**/Icon? 85 | **/ios/**/Pods/ 86 | **/ios/**/.symlinks/ 87 | **/ios/**/profile 88 | **/ios/**/xcuserdata 89 | **/ios/.generated/ 90 | **/ios/Flutter/.last_build_id 91 | **/ios/Flutter/App.framework 92 | **/ios/Flutter/Flutter.framework 93 | **/ios/Flutter/Flutter.podspec 94 | **/ios/Flutter/Generated.xcconfig 95 | **/ios/Flutter/ephemeral 96 | **/ios/Flutter/app.flx 97 | **/ios/Flutter/app.zip 98 | **/ios/Flutter/flutter_assets/ 99 | **/ios/Flutter/flutter_export_environment.sh 100 | **/ios/ServiceDefinitions.json 101 | **/ios/Runner/GeneratedPluginRegistrant.* 102 | 103 | # macOS 104 | **/Flutter/ephemeral/ 105 | **/Pods/ 106 | **/macos/Flutter/GeneratedPluginRegistrant.swift 107 | **/macos/Flutter/ephemeral 108 | **/xcuserdata/ 109 | 110 | # Windows 111 | **/windows/flutter/generated_plugin_registrant.cc 112 | **/windows/flutter/generated_plugin_registrant.h 113 | 114 | # Linux 115 | **/linux/flutter/generated_plugin_registrant.cc 116 | **/linux/flutter/generated_plugin_registrant.h 117 | 118 | # Coverage 119 | coverage/ 120 | 121 | # Symbols 122 | app.*.symbols 123 | 124 | # Exceptions to above rules. 125 | !**/ios/**/default.mode1v3 126 | !**/ios/**/default.mode2v3 127 | !**/ios/**/default.pbxuser 128 | !**/ios/**/default.perspectivev3 129 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 130 | !/dev/ci/**/Gemfile.lock -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Mangirdas Kazlauskas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Firebase Remote Config demo app 2 | 3 | ![Control your Flutter app on the fly with Firebase Remote Config](header.png) 4 | 5 | A Flutter Forward agenda app that covers multiple Firebase Remote Config features: 6 | 7 | 1. Parameters; 8 | 2. Conditions; 9 | 3. Feature flags and staged rollouts; 10 | 4. A/B testing. 11 | 12 | Check the video tutorial on [YouTube](https://youtu.be/1qHSvGoqqiE). 13 | 14 | ## Building 15 | 16 | You can follow these instructions to build the app and install it onto your device. 17 | 18 | ### Prerequisites 19 | 20 | If you are new to Flutter, please first follow the [Flutter Setup](https://flutter.dev/setup/) guide. 21 | 22 | ### Building and installing the app 23 | 24 | The easiest way to get started is by cloning the repository and following the video tutorial on [YouTube](https://youtu.be/1qHSvGoqqiE). 25 | 26 | Create a new Firebase project and import the Firebase Remote Config configuration file `remote_config.json` from the `backup` directory. 27 | 28 | Then, connect the Firebase project to the Flutter app by running the following command (replace `` with your Firebase project ID): 29 | 30 | ``` 31 | flutterfire configure -p -o lib/features/firebase/firebase_options.dart 32 | ``` 33 | 34 | Finally, run the following commands to build and install the app: 35 | 36 | ``` 37 | flutter pub get 38 | flutter pub run build_runner build 39 | flutter run 40 | ``` 41 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | analyzer: 13 | exclude: 14 | - "**/*.freezed.dart" 15 | - "**/*.g.dart" 16 | errors: 17 | invalid_annotation_target: ignore 18 | 19 | linter: 20 | # The lint rules applied to this project can be customized in the 21 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 22 | # included above or to enable additional rules. A list of all available lints 23 | # and their documentation is published at 24 | # https://dart-lang.github.io/linter/lints/index.html. 25 | # 26 | # Instead of disabling a lint rule for the entire project in the 27 | # section below, it can also be suppressed for a single line of code 28 | # or a specific dart file by using the `// ignore: name_of_lint` and 29 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 30 | # producing the lint. 31 | rules: 32 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 33 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 34 | # Additional information about this file can be found at 35 | # https://dart.dev/guides/language/analysis-options 36 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | // START: FlutterFire Configuration 26 | apply plugin: 'com.google.gms.google-services' 27 | // END: FlutterFire Configuration 28 | apply plugin: 'kotlin-android' 29 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 30 | 31 | android { 32 | compileSdkVersion 33 33 | ndkVersion flutter.ndkVersion 34 | 35 | compileOptions { 36 | sourceCompatibility JavaVersion.VERSION_1_8 37 | targetCompatibility JavaVersion.VERSION_1_8 38 | } 39 | 40 | kotlinOptions { 41 | jvmTarget = '1.8' 42 | } 43 | 44 | sourceSets { 45 | main.java.srcDirs += 'src/main/kotlin' 46 | } 47 | 48 | defaultConfig { 49 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 50 | applicationId "com.example.flutter_firebase_remote_config_demo" 51 | // You can update the following values to match your application needs. 52 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 53 | minSdkVersion 19 54 | targetSdkVersion flutter.targetSdkVersion 55 | versionCode flutterVersionCode.toInteger() 56 | versionName flutterVersionName 57 | } 58 | 59 | buildTypes { 60 | release { 61 | // TODO: Add your own signing config for the release build. 62 | // Signing with the debug keys for now, so `flutter run --release` works. 63 | signingConfig signingConfigs.debug 64 | } 65 | } 66 | } 67 | 68 | flutter { 69 | source '../..' 70 | } 71 | 72 | dependencies { 73 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 74 | } 75 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_firebase_remote_config_demo/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_firebase_remote_config_demo 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | // START: FlutterFire Configuration 11 | classpath 'com.google.gms:google-services:4.3.10' 12 | // END: FlutterFire Configuration 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | 24 | rootProject.buildDir = '../build' 25 | subprojects { 26 | project.buildDir = "${rootProject.buildDir}/${project.name}" 27 | } 28 | subprojects { 29 | project.evaluationDependsOn(':app') 30 | } 31 | 32 | task clean(type: Delete) { 33 | delete rootProject.buildDir 34 | } 35 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /backup/remote_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "conditions": [ 3 | { 4 | "name": "Android", 5 | "expression": "device.os == 'android'", 6 | "tagColor": "LIME" 7 | }, 8 | { 9 | "name": "Event LIVE", 10 | "expression": "dateTime >= dateTime('2023-01-25T09:30:00', 'Etc/GMT-8') && dateTime < dateTime('2023-01-25T16:00:00', 'Etc/GMT-8')", 11 | "tagColor": "PINK" 12 | }, 13 | { 14 | "name": "10% of users", 15 | "expression": "percent <= 10", 16 | "tagColor": "BLUE" 17 | } 18 | ], 19 | "parameters": { 20 | "app_version": { 21 | "defaultValue": { 22 | "value": "{\"version\":\"1.0.0\",\"build_number\":1,\"is_optional\":true}" 23 | }, 24 | "conditionalValues": { 25 | "Android": { 26 | "value": "{\"version\":\"1.0.0\",\"build_number\":1,\"is_optional\":true}" 27 | } 28 | }, 29 | "description": "Preferred application version.", 30 | "valueType": "JSON" 31 | }, 32 | "event_info": { 33 | "defaultValue": { 34 | "value": "{\"title\":\"Flutter Forward\",\"startsAt\":\"2023-01-25T09:00:00.000\",\"sessions\":[{\"id\":\"whats-new-in-flutter\",\"color\":\"0xFFFEF752\",\"title\":\"What's new in Flutter\",\"dateTimeFrom\":\"2023-01-25T09:00:00.000-08:00\",\"dateTimeTo\":\"2023-01-25T10:00:00.000-08:00\",\"speakers\":[\"Tim Sneath\"]},{\"id\":\"flutter-plus-firebase-is-love\",\"color\":\"0xFF9D6BCE\",\"title\":\"Flutter + Firebase = 💙💛\",\"dateTimeFrom\":\"2023-01-25T10:00:00.000-08:00\",\"dateTimeTo\":\"2023-01-25T11:00:00.000-08:00\",\"speakers\":[\"Frank van Puffelen\",\"David East\"]},{\"id\":\"how-to-get-a-free-dash\",\"color\":\"0xFFBCEF4B\",\"title\":\"How to get a free Dash?!\",\"dateTimeFrom\":\"2023-01-25T11:00:00.000-08:00\",\"dateTimeTo\":\"2023-01-25T12:00:00.000-08:00\",\"speakers\":[\"Nilay Yener\"]},{\"id\":\"lunch-break\",\"color\":\"0xFFFEF752\",\"title\":\"Lunch break\",\"dateTimeFrom\":\"2023-01-25T12:00:00.000-08:00\",\"dateTimeTo\":\"2023-01-25T13:00:00.000-08:00\",\"speakers\":[]},{\"id\":\"state-management-in-flutter-is-easy\",\"color\":\"0xFF9D6BCE\",\"title\":\"State management in Flutter is easy!\",\"dateTimeFrom\":\"2023-01-25T13:00:00.000-08:00\",\"dateTimeTo\":\"2023-01-25T14:00:00.000-08:00\",\"speakers\":[\"Craig Labenz\"]},{\"id\":\"using-patterns-in-dart\",\"color\":\"0xFFBCEF4B\",\"title\":\"Using the new patterns in Dart\",\"dateTimeFrom\":\"2023-01-25T14:00:00.000-08:00\",\"dateTimeTo\":\"2023-01-25T15:00:00.000-08:00\",\"speakers\":[\"Michael Thomsen\"]},{\"id\":\"panel-discussion\",\"color\":\"0xFFFEF752\",\"title\":\"Panel discussion\",\"dateTimeFrom\":\"2023-01-25T15:00:00.000-08:00\",\"dateTimeTo\":\"2023-01-25T16:00:00.000-08:00\",\"speakers\":[\"Tim Sneath\",\"Craig Labenz\",\"Michael Thomsen\"]}]}" 35 | }, 36 | "description": "Event information JSON.", 37 | "valueType": "JSON" 38 | } 39 | }, 40 | "parameterGroups": { 41 | "Event stream": { 42 | "description": "Event stream properties.", 43 | "parameters": { 44 | "stream_link": { 45 | "defaultValue": { 46 | "value": "https://www.youtube.com/@flutterdev" 47 | }, 48 | "description": "Event stream link.", 49 | "valueType": "STRING" 50 | }, 51 | "stream_live": { 52 | "defaultValue": { 53 | "value": "false" 54 | }, 55 | "conditionalValues": { 56 | "Event LIVE": { 57 | "value": "true" 58 | } 59 | }, 60 | "description": "Is event stream LIVE.", 61 | "valueType": "BOOLEAN" 62 | } 63 | } 64 | }, 65 | "Add to favorites": { 66 | "description": "Add to favorites feature properties.", 67 | "parameters": { 68 | "favorite_button_type": { 69 | "defaultValue": { 70 | "value": "card" 71 | }, 72 | "conditionalValues": { 73 | "10% of users": { 74 | "value": "slideable" 75 | } 76 | }, 77 | "description": "Type of \"add to favorites\" button.", 78 | "valueType": "STRING" 79 | }, 80 | "favorites_enabled": { 81 | "defaultValue": { 82 | "value": "true" 83 | }, 84 | "description": "Enables \"add to favorites\" action.", 85 | "valueType": "BOOLEAN" 86 | } 87 | } 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/header.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 6C3B2917CBB97DD267504C5D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F605FAF12835D398BC066AA /* Pods_Runner.framework */; }; 13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | C2177E3433CCBBB8B4FF4006 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9CB81D5D4681EBFC7AB5FB8C /* GoogleService-Info.plist */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXCopyFilesBuildPhase section */ 21 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 22 | isa = PBXCopyFilesBuildPhase; 23 | buildActionMask = 2147483647; 24 | dstPath = ""; 25 | dstSubfolderSpec = 10; 26 | files = ( 27 | ); 28 | name = "Embed Frameworks"; 29 | runOnlyForDeploymentPostprocessing = 0; 30 | }; 31 | /* End PBXCopyFilesBuildPhase section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 0BA1F66E7DDF8F79308DB6D6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 35 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 36 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 8B0025E4AEBD47CDDFE56BEB /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 9CB81D5D4681EBFC7AB5FB8C /* GoogleService-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "Runner/GoogleService-Info.plist"; sourceTree = ""; }; 50 | 9F605FAF12835D398BC066AA /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | AA80D65629C5E7EAE19F0730 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 6C3B2917CBB97DD267504C5D /* Pods_Runner.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 9740EEB11CF90186004384FC /* Flutter */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 70 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 71 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 72 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 73 | ); 74 | name = Flutter; 75 | sourceTree = ""; 76 | }; 77 | 97C146E51CF9000F007C117D = { 78 | isa = PBXGroup; 79 | children = ( 80 | 9740EEB11CF90186004384FC /* Flutter */, 81 | 97C146F01CF9000F007C117D /* Runner */, 82 | 97C146EF1CF9000F007C117D /* Products */, 83 | DB3F83EB443D3C36E3B548B5 /* Pods */, 84 | B06328E59FFC15C83C928AFF /* Frameworks */, 85 | 9CB81D5D4681EBFC7AB5FB8C /* GoogleService-Info.plist */, 86 | ); 87 | sourceTree = ""; 88 | }; 89 | 97C146EF1CF9000F007C117D /* Products */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 97C146EE1CF9000F007C117D /* Runner.app */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | 97C146F01CF9000F007C117D /* Runner */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 101 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 102 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 103 | 97C147021CF9000F007C117D /* Info.plist */, 104 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 105 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 106 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 107 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 108 | ); 109 | path = Runner; 110 | sourceTree = ""; 111 | }; 112 | B06328E59FFC15C83C928AFF /* Frameworks */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 9F605FAF12835D398BC066AA /* Pods_Runner.framework */, 116 | ); 117 | name = Frameworks; 118 | sourceTree = ""; 119 | }; 120 | DB3F83EB443D3C36E3B548B5 /* Pods */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 8B0025E4AEBD47CDDFE56BEB /* Pods-Runner.debug.xcconfig */, 124 | AA80D65629C5E7EAE19F0730 /* Pods-Runner.release.xcconfig */, 125 | 0BA1F66E7DDF8F79308DB6D6 /* Pods-Runner.profile.xcconfig */, 126 | ); 127 | name = Pods; 128 | path = Pods; 129 | sourceTree = ""; 130 | }; 131 | /* End PBXGroup section */ 132 | 133 | /* Begin PBXNativeTarget section */ 134 | 97C146ED1CF9000F007C117D /* Runner */ = { 135 | isa = PBXNativeTarget; 136 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 137 | buildPhases = ( 138 | 4447C2506FCF924A1AF84106 /* [CP] Check Pods Manifest.lock */, 139 | 9740EEB61CF901F6004384FC /* Run Script */, 140 | 97C146EA1CF9000F007C117D /* Sources */, 141 | 97C146EB1CF9000F007C117D /* Frameworks */, 142 | 97C146EC1CF9000F007C117D /* Resources */, 143 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 144 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 145 | 65191375BCB911F5197B1FC1 /* [CP] Embed Pods Frameworks */, 146 | ); 147 | buildRules = ( 148 | ); 149 | dependencies = ( 150 | ); 151 | name = Runner; 152 | productName = Runner; 153 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 154 | productType = "com.apple.product-type.application"; 155 | }; 156 | /* End PBXNativeTarget section */ 157 | 158 | /* Begin PBXProject section */ 159 | 97C146E61CF9000F007C117D /* Project object */ = { 160 | isa = PBXProject; 161 | attributes = { 162 | LastUpgradeCheck = 1300; 163 | ORGANIZATIONNAME = ""; 164 | TargetAttributes = { 165 | 97C146ED1CF9000F007C117D = { 166 | CreatedOnToolsVersion = 7.3.1; 167 | LastSwiftMigration = 1100; 168 | }; 169 | }; 170 | }; 171 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 172 | compatibilityVersion = "Xcode 9.3"; 173 | developmentRegion = en; 174 | hasScannedForEncodings = 0; 175 | knownRegions = ( 176 | en, 177 | Base, 178 | ); 179 | mainGroup = 97C146E51CF9000F007C117D; 180 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 181 | projectDirPath = ""; 182 | projectRoot = ""; 183 | targets = ( 184 | 97C146ED1CF9000F007C117D /* Runner */, 185 | ); 186 | }; 187 | /* End PBXProject section */ 188 | 189 | /* Begin PBXResourcesBuildPhase section */ 190 | 97C146EC1CF9000F007C117D /* Resources */ = { 191 | isa = PBXResourcesBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 195 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 196 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 197 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 198 | C2177E3433CCBBB8B4FF4006 /* GoogleService-Info.plist in Resources */, 199 | ); 200 | runOnlyForDeploymentPostprocessing = 0; 201 | }; 202 | /* End PBXResourcesBuildPhase section */ 203 | 204 | /* Begin PBXShellScriptBuildPhase section */ 205 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 206 | isa = PBXShellScriptBuildPhase; 207 | alwaysOutOfDate = 1; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputPaths = ( 212 | ); 213 | name = "Thin Binary"; 214 | outputPaths = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | shellPath = /bin/sh; 218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 219 | }; 220 | 4447C2506FCF924A1AF84106 /* [CP] Check Pods Manifest.lock */ = { 221 | isa = PBXShellScriptBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | ); 225 | inputFileListPaths = ( 226 | ); 227 | inputPaths = ( 228 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 229 | "${PODS_ROOT}/Manifest.lock", 230 | ); 231 | name = "[CP] Check Pods Manifest.lock"; 232 | outputFileListPaths = ( 233 | ); 234 | outputPaths = ( 235 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | shellPath = /bin/sh; 239 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 240 | showEnvVarsInLog = 0; 241 | }; 242 | 65191375BCB911F5197B1FC1 /* [CP] Embed Pods Frameworks */ = { 243 | isa = PBXShellScriptBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | ); 247 | inputFileListPaths = ( 248 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 249 | ); 250 | name = "[CP] Embed Pods Frameworks"; 251 | outputFileListPaths = ( 252 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | shellPath = /bin/sh; 256 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 257 | showEnvVarsInLog = 0; 258 | }; 259 | 9740EEB61CF901F6004384FC /* Run Script */ = { 260 | isa = PBXShellScriptBuildPhase; 261 | alwaysOutOfDate = 1; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | ); 265 | inputPaths = ( 266 | ); 267 | name = "Run Script"; 268 | outputPaths = ( 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | shellPath = /bin/sh; 272 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 273 | }; 274 | /* End PBXShellScriptBuildPhase section */ 275 | 276 | /* Begin PBXSourcesBuildPhase section */ 277 | 97C146EA1CF9000F007C117D /* Sources */ = { 278 | isa = PBXSourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 282 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXSourcesBuildPhase section */ 287 | 288 | /* Begin PBXVariantGroup section */ 289 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 290 | isa = PBXVariantGroup; 291 | children = ( 292 | 97C146FB1CF9000F007C117D /* Base */, 293 | ); 294 | name = Main.storyboard; 295 | sourceTree = ""; 296 | }; 297 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 298 | isa = PBXVariantGroup; 299 | children = ( 300 | 97C147001CF9000F007C117D /* Base */, 301 | ); 302 | name = LaunchScreen.storyboard; 303 | sourceTree = ""; 304 | }; 305 | /* End PBXVariantGroup section */ 306 | 307 | /* Begin XCBuildConfiguration section */ 308 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 309 | isa = XCBuildConfiguration; 310 | buildSettings = { 311 | ALWAYS_SEARCH_USER_PATHS = NO; 312 | CLANG_ANALYZER_NONNULL = YES; 313 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 314 | CLANG_CXX_LIBRARY = "libc++"; 315 | CLANG_ENABLE_MODULES = YES; 316 | CLANG_ENABLE_OBJC_ARC = YES; 317 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 318 | CLANG_WARN_BOOL_CONVERSION = YES; 319 | CLANG_WARN_COMMA = YES; 320 | CLANG_WARN_CONSTANT_CONVERSION = YES; 321 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 322 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 323 | CLANG_WARN_EMPTY_BODY = YES; 324 | CLANG_WARN_ENUM_CONVERSION = YES; 325 | CLANG_WARN_INFINITE_RECURSION = YES; 326 | CLANG_WARN_INT_CONVERSION = YES; 327 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 328 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 329 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 330 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 331 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 332 | CLANG_WARN_STRICT_PROTOTYPES = YES; 333 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 334 | CLANG_WARN_UNREACHABLE_CODE = YES; 335 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 336 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 337 | COPY_PHASE_STRIP = NO; 338 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 339 | ENABLE_NS_ASSERTIONS = NO; 340 | ENABLE_STRICT_OBJC_MSGSEND = YES; 341 | GCC_C_LANGUAGE_STANDARD = gnu99; 342 | GCC_NO_COMMON_BLOCKS = YES; 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 350 | MTL_ENABLE_DEBUG_INFO = NO; 351 | SDKROOT = iphoneos; 352 | SUPPORTED_PLATFORMS = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | VALIDATE_PRODUCT = YES; 355 | }; 356 | name = Profile; 357 | }; 358 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 359 | isa = XCBuildConfiguration; 360 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 361 | buildSettings = { 362 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 363 | CLANG_ENABLE_MODULES = YES; 364 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 365 | DEVELOPMENT_TEAM = 272UF85X8C; 366 | ENABLE_BITCODE = NO; 367 | INFOPLIST_FILE = Runner/Info.plist; 368 | LD_RUNPATH_SEARCH_PATHS = ( 369 | "$(inherited)", 370 | "@executable_path/Frameworks", 371 | ); 372 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterFirebaseRemoteConfigDemo; 373 | PRODUCT_NAME = "$(TARGET_NAME)"; 374 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 375 | SWIFT_VERSION = 5.0; 376 | VERSIONING_SYSTEM = "apple-generic"; 377 | }; 378 | name = Profile; 379 | }; 380 | 97C147031CF9000F007C117D /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ALWAYS_SEARCH_USER_PATHS = NO; 384 | CLANG_ANALYZER_NONNULL = YES; 385 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 386 | CLANG_CXX_LIBRARY = "libc++"; 387 | CLANG_ENABLE_MODULES = YES; 388 | CLANG_ENABLE_OBJC_ARC = YES; 389 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 390 | CLANG_WARN_BOOL_CONVERSION = YES; 391 | CLANG_WARN_COMMA = YES; 392 | CLANG_WARN_CONSTANT_CONVERSION = YES; 393 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 394 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 395 | CLANG_WARN_EMPTY_BODY = YES; 396 | CLANG_WARN_ENUM_CONVERSION = YES; 397 | CLANG_WARN_INFINITE_RECURSION = YES; 398 | CLANG_WARN_INT_CONVERSION = YES; 399 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 400 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 401 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 402 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 403 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 404 | CLANG_WARN_STRICT_PROTOTYPES = YES; 405 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 406 | CLANG_WARN_UNREACHABLE_CODE = YES; 407 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 408 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 409 | COPY_PHASE_STRIP = NO; 410 | DEBUG_INFORMATION_FORMAT = dwarf; 411 | ENABLE_STRICT_OBJC_MSGSEND = YES; 412 | ENABLE_TESTABILITY = YES; 413 | GCC_C_LANGUAGE_STANDARD = gnu99; 414 | GCC_DYNAMIC_NO_PIC = NO; 415 | GCC_NO_COMMON_BLOCKS = YES; 416 | GCC_OPTIMIZATION_LEVEL = 0; 417 | GCC_PREPROCESSOR_DEFINITIONS = ( 418 | "DEBUG=1", 419 | "$(inherited)", 420 | ); 421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 423 | GCC_WARN_UNDECLARED_SELECTOR = YES; 424 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 425 | GCC_WARN_UNUSED_FUNCTION = YES; 426 | GCC_WARN_UNUSED_VARIABLE = YES; 427 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 428 | MTL_ENABLE_DEBUG_INFO = YES; 429 | ONLY_ACTIVE_ARCH = YES; 430 | SDKROOT = iphoneos; 431 | TARGETED_DEVICE_FAMILY = "1,2"; 432 | }; 433 | name = Debug; 434 | }; 435 | 97C147041CF9000F007C117D /* Release */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ALWAYS_SEARCH_USER_PATHS = NO; 439 | CLANG_ANALYZER_NONNULL = YES; 440 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 441 | CLANG_CXX_LIBRARY = "libc++"; 442 | CLANG_ENABLE_MODULES = YES; 443 | CLANG_ENABLE_OBJC_ARC = YES; 444 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 445 | CLANG_WARN_BOOL_CONVERSION = YES; 446 | CLANG_WARN_COMMA = YES; 447 | CLANG_WARN_CONSTANT_CONVERSION = YES; 448 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 449 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 450 | CLANG_WARN_EMPTY_BODY = YES; 451 | CLANG_WARN_ENUM_CONVERSION = YES; 452 | CLANG_WARN_INFINITE_RECURSION = YES; 453 | CLANG_WARN_INT_CONVERSION = YES; 454 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 455 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 456 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 457 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 458 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 459 | CLANG_WARN_STRICT_PROTOTYPES = YES; 460 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 461 | CLANG_WARN_UNREACHABLE_CODE = YES; 462 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 463 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 464 | COPY_PHASE_STRIP = NO; 465 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 466 | ENABLE_NS_ASSERTIONS = NO; 467 | ENABLE_STRICT_OBJC_MSGSEND = YES; 468 | GCC_C_LANGUAGE_STANDARD = gnu99; 469 | GCC_NO_COMMON_BLOCKS = YES; 470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 471 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 472 | GCC_WARN_UNDECLARED_SELECTOR = YES; 473 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 474 | GCC_WARN_UNUSED_FUNCTION = YES; 475 | GCC_WARN_UNUSED_VARIABLE = YES; 476 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 477 | MTL_ENABLE_DEBUG_INFO = NO; 478 | SDKROOT = iphoneos; 479 | SUPPORTED_PLATFORMS = iphoneos; 480 | SWIFT_COMPILATION_MODE = wholemodule; 481 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 482 | TARGETED_DEVICE_FAMILY = "1,2"; 483 | VALIDATE_PRODUCT = YES; 484 | }; 485 | name = Release; 486 | }; 487 | 97C147061CF9000F007C117D /* Debug */ = { 488 | isa = XCBuildConfiguration; 489 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 490 | buildSettings = { 491 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 492 | CLANG_ENABLE_MODULES = YES; 493 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 494 | DEVELOPMENT_TEAM = 272UF85X8C; 495 | ENABLE_BITCODE = NO; 496 | INFOPLIST_FILE = Runner/Info.plist; 497 | LD_RUNPATH_SEARCH_PATHS = ( 498 | "$(inherited)", 499 | "@executable_path/Frameworks", 500 | ); 501 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterFirebaseRemoteConfigDemo; 502 | PRODUCT_NAME = "$(TARGET_NAME)"; 503 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 504 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 505 | SWIFT_VERSION = 5.0; 506 | VERSIONING_SYSTEM = "apple-generic"; 507 | }; 508 | name = Debug; 509 | }; 510 | 97C147071CF9000F007C117D /* Release */ = { 511 | isa = XCBuildConfiguration; 512 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 513 | buildSettings = { 514 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 515 | CLANG_ENABLE_MODULES = YES; 516 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 517 | DEVELOPMENT_TEAM = 272UF85X8C; 518 | ENABLE_BITCODE = NO; 519 | INFOPLIST_FILE = Runner/Info.plist; 520 | LD_RUNPATH_SEARCH_PATHS = ( 521 | "$(inherited)", 522 | "@executable_path/Frameworks", 523 | ); 524 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterFirebaseRemoteConfigDemo; 525 | PRODUCT_NAME = "$(TARGET_NAME)"; 526 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 527 | SWIFT_VERSION = 5.0; 528 | VERSIONING_SYSTEM = "apple-generic"; 529 | }; 530 | name = Release; 531 | }; 532 | /* End XCBuildConfiguration section */ 533 | 534 | /* Begin XCConfigurationList section */ 535 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 536 | isa = XCConfigurationList; 537 | buildConfigurations = ( 538 | 97C147031CF9000F007C117D /* Debug */, 539 | 97C147041CF9000F007C117D /* Release */, 540 | 249021D3217E4FDB00AE95B9 /* Profile */, 541 | ); 542 | defaultConfigurationIsVisible = 0; 543 | defaultConfigurationName = Release; 544 | }; 545 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 546 | isa = XCConfigurationList; 547 | buildConfigurations = ( 548 | 97C147061CF9000F007C117D /* Debug */, 549 | 97C147071CF9000F007C117D /* Release */, 550 | 249021D4217E4FDB00AE95B9 /* Profile */, 551 | ); 552 | defaultConfigurationIsVisible = 0; 553 | defaultConfigurationName = Release; 554 | }; 555 | /* End XCConfigurationList section */ 556 | }; 557 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 558 | } 559 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkobuolys/flutter-firebase-remote-config-demo/1ccbfc25e3cf75b8c4f543fd61a89225d0d1acec/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Firebase Remote Config Demo 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_firebase_remote_config_demo 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/app_router.dart: -------------------------------------------------------------------------------- 1 | import 'package:go_router/go_router.dart'; 2 | import 'package:riverpod_annotation/riverpod_annotation.dart'; 3 | 4 | import 'features/event/view/event_page.dart'; 5 | import 'features/splash/view/splash_page.dart'; 6 | 7 | part 'app_router.g.dart'; 8 | 9 | @riverpod 10 | GoRouter router(_) => GoRouter( 11 | routes: [ 12 | GoRoute( 13 | path: EventPage.path, 14 | builder: (context, state) => const EventPage(), 15 | ), 16 | GoRoute( 17 | path: SplashPage.path, 18 | builder: (context, state) => const SplashPage(), 19 | ), 20 | ], 21 | initialLocation: SplashPage.path, 22 | ); 23 | -------------------------------------------------------------------------------- /lib/app_router.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'app_router.dart'; 4 | 5 | // ************************************************************************** 6 | // RiverpodGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: avoid_private_typedef_functions, non_constant_identifier_names, subtype_of_sealed_class, invalid_use_of_internal_member, unused_element, constant_identifier_names, unnecessary_raw_strings, library_private_types_in_public_api 10 | 11 | /// Copied from Dart SDK 12 | class _SystemHash { 13 | _SystemHash._(); 14 | 15 | static int combine(int hash, int value) { 16 | // ignore: parameter_assignments 17 | hash = 0x1fffffff & (hash + value); 18 | // ignore: parameter_assignments 19 | hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); 20 | return hash ^ (hash >> 6); 21 | } 22 | 23 | static int finish(int hash) { 24 | // ignore: parameter_assignments 25 | hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 26 | // ignore: parameter_assignments 27 | hash = hash ^ (hash >> 11); 28 | return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 29 | } 30 | } 31 | 32 | String $routerHash() => r'5ca0f6a9178a43635bdcf26fda631dbcbd867a7b'; 33 | 34 | /// See also [router]. 35 | final routerProvider = AutoDisposeProvider( 36 | router, 37 | name: r'routerProvider', 38 | debugGetCreateSourceHash: 39 | const bool.fromEnvironment('dart.vm.product') ? null : $routerHash, 40 | ); 41 | typedef RouterRef = AutoDisposeProviderRef; 42 | -------------------------------------------------------------------------------- /lib/features/app_update/data/app_update_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:package_info_plus/package_info_plus.dart'; 4 | import 'package:riverpod_annotation/riverpod_annotation.dart'; 5 | 6 | import '../../firebase/firebase_remote_config_service.dart'; 7 | import 'models/app_update_status.dart'; 8 | import 'models/app_version.dart'; 9 | 10 | part 'app_update_service.g.dart'; 11 | 12 | @riverpod 13 | AppUpdateService appUpdateService(AppUpdateServiceRef ref) { 14 | return AppUpdateService( 15 | firebaseRemoteConfigService: ref.watch(firebaseRemoteConfigServiceProvider), 16 | ); 17 | } 18 | 19 | @riverpod 20 | Future updateStatus(UpdateStatusRef ref) async { 21 | return ref.watch(appUpdateServiceProvider).checkForUpdate(); 22 | } 23 | 24 | class AppUpdateService { 25 | const AppUpdateService({ 26 | required this.firebaseRemoteConfigService, 27 | }); 28 | 29 | final FirebaseRemoteConfigService firebaseRemoteConfigService; 30 | 31 | Future checkForUpdate() async { 32 | final json = firebaseRemoteConfigService.getAppVersionJson(); 33 | final appVersion = AppVersion.fromJson( 34 | jsonDecode(json) as Map, 35 | ); 36 | 37 | final packageInfo = await PackageInfo.fromPlatform(); 38 | final currentAppVersion = AppVersion( 39 | version: packageInfo.version, 40 | buildNumber: int.tryParse(packageInfo.buildNumber) ?? 0, 41 | ); 42 | 43 | return AppUpdateStatus( 44 | updateAvailable: currentAppVersion.compareToPreferred(appVersion), 45 | optional: appVersion.optional, 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/features/app_update/data/app_update_service.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'app_update_service.dart'; 4 | 5 | // ************************************************************************** 6 | // RiverpodGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: avoid_private_typedef_functions, non_constant_identifier_names, subtype_of_sealed_class, invalid_use_of_internal_member, unused_element, constant_identifier_names, unnecessary_raw_strings, library_private_types_in_public_api 10 | 11 | /// Copied from Dart SDK 12 | class _SystemHash { 13 | _SystemHash._(); 14 | 15 | static int combine(int hash, int value) { 16 | // ignore: parameter_assignments 17 | hash = 0x1fffffff & (hash + value); 18 | // ignore: parameter_assignments 19 | hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); 20 | return hash ^ (hash >> 6); 21 | } 22 | 23 | static int finish(int hash) { 24 | // ignore: parameter_assignments 25 | hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 26 | // ignore: parameter_assignments 27 | hash = hash ^ (hash >> 11); 28 | return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 29 | } 30 | } 31 | 32 | String $appUpdateServiceHash() => r'c49e0bf298334d747cfcbb336e5aa2ded8979f9b'; 33 | 34 | /// See also [appUpdateService]. 35 | final appUpdateServiceProvider = AutoDisposeProvider( 36 | appUpdateService, 37 | name: r'appUpdateServiceProvider', 38 | debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') 39 | ? null 40 | : $appUpdateServiceHash, 41 | ); 42 | typedef AppUpdateServiceRef = AutoDisposeProviderRef; 43 | String $updateStatusHash() => r'3c0ac2a868004073674f9a09da2f2949be603c47'; 44 | 45 | /// See also [updateStatus]. 46 | final updateStatusProvider = AutoDisposeFutureProvider( 47 | updateStatus, 48 | name: r'updateStatusProvider', 49 | debugGetCreateSourceHash: 50 | const bool.fromEnvironment('dart.vm.product') ? null : $updateStatusHash, 51 | ); 52 | typedef UpdateStatusRef = AutoDisposeFutureProviderRef; 53 | -------------------------------------------------------------------------------- /lib/features/app_update/data/models/app_update_status.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'app_update_status.freezed.dart'; 4 | 5 | @freezed 6 | class AppUpdateStatus with _$AppUpdateStatus { 7 | const factory AppUpdateStatus({ 8 | @Default(false) bool updateAvailable, 9 | @Default(true) bool optional, 10 | }) = _AppUpdateStatus; 11 | } 12 | -------------------------------------------------------------------------------- /lib/features/app_update/data/models/app_update_status.freezed.dart: -------------------------------------------------------------------------------- 1 | // coverage:ignore-file 2 | // GENERATED CODE - DO NOT MODIFY BY HAND 3 | // ignore_for_file: type=lint 4 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark 5 | 6 | part of 'app_update_status.dart'; 7 | 8 | // ************************************************************************** 9 | // FreezedGenerator 10 | // ************************************************************************** 11 | 12 | T _$identity(T value) => value; 13 | 14 | final _privateConstructorUsedError = UnsupportedError( 15 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); 16 | 17 | /// @nodoc 18 | mixin _$AppUpdateStatus { 19 | bool get updateAvailable => throw _privateConstructorUsedError; 20 | bool get optional => throw _privateConstructorUsedError; 21 | 22 | @JsonKey(ignore: true) 23 | $AppUpdateStatusCopyWith get copyWith => 24 | throw _privateConstructorUsedError; 25 | } 26 | 27 | /// @nodoc 28 | abstract class $AppUpdateStatusCopyWith<$Res> { 29 | factory $AppUpdateStatusCopyWith( 30 | AppUpdateStatus value, $Res Function(AppUpdateStatus) then) = 31 | _$AppUpdateStatusCopyWithImpl<$Res, AppUpdateStatus>; 32 | @useResult 33 | $Res call({bool updateAvailable, bool optional}); 34 | } 35 | 36 | /// @nodoc 37 | class _$AppUpdateStatusCopyWithImpl<$Res, $Val extends AppUpdateStatus> 38 | implements $AppUpdateStatusCopyWith<$Res> { 39 | _$AppUpdateStatusCopyWithImpl(this._value, this._then); 40 | 41 | // ignore: unused_field 42 | final $Val _value; 43 | // ignore: unused_field 44 | final $Res Function($Val) _then; 45 | 46 | @pragma('vm:prefer-inline') 47 | @override 48 | $Res call({ 49 | Object? updateAvailable = null, 50 | Object? optional = null, 51 | }) { 52 | return _then(_value.copyWith( 53 | updateAvailable: null == updateAvailable 54 | ? _value.updateAvailable 55 | : updateAvailable // ignore: cast_nullable_to_non_nullable 56 | as bool, 57 | optional: null == optional 58 | ? _value.optional 59 | : optional // ignore: cast_nullable_to_non_nullable 60 | as bool, 61 | ) as $Val); 62 | } 63 | } 64 | 65 | /// @nodoc 66 | abstract class _$$_AppUpdateStatusCopyWith<$Res> 67 | implements $AppUpdateStatusCopyWith<$Res> { 68 | factory _$$_AppUpdateStatusCopyWith( 69 | _$_AppUpdateStatus value, $Res Function(_$_AppUpdateStatus) then) = 70 | __$$_AppUpdateStatusCopyWithImpl<$Res>; 71 | @override 72 | @useResult 73 | $Res call({bool updateAvailable, bool optional}); 74 | } 75 | 76 | /// @nodoc 77 | class __$$_AppUpdateStatusCopyWithImpl<$Res> 78 | extends _$AppUpdateStatusCopyWithImpl<$Res, _$_AppUpdateStatus> 79 | implements _$$_AppUpdateStatusCopyWith<$Res> { 80 | __$$_AppUpdateStatusCopyWithImpl( 81 | _$_AppUpdateStatus _value, $Res Function(_$_AppUpdateStatus) _then) 82 | : super(_value, _then); 83 | 84 | @pragma('vm:prefer-inline') 85 | @override 86 | $Res call({ 87 | Object? updateAvailable = null, 88 | Object? optional = null, 89 | }) { 90 | return _then(_$_AppUpdateStatus( 91 | updateAvailable: null == updateAvailable 92 | ? _value.updateAvailable 93 | : updateAvailable // ignore: cast_nullable_to_non_nullable 94 | as bool, 95 | optional: null == optional 96 | ? _value.optional 97 | : optional // ignore: cast_nullable_to_non_nullable 98 | as bool, 99 | )); 100 | } 101 | } 102 | 103 | /// @nodoc 104 | 105 | class _$_AppUpdateStatus implements _AppUpdateStatus { 106 | const _$_AppUpdateStatus( 107 | {this.updateAvailable = false, this.optional = true}); 108 | 109 | @override 110 | @JsonKey() 111 | final bool updateAvailable; 112 | @override 113 | @JsonKey() 114 | final bool optional; 115 | 116 | @override 117 | String toString() { 118 | return 'AppUpdateStatus(updateAvailable: $updateAvailable, optional: $optional)'; 119 | } 120 | 121 | @override 122 | bool operator ==(dynamic other) { 123 | return identical(this, other) || 124 | (other.runtimeType == runtimeType && 125 | other is _$_AppUpdateStatus && 126 | (identical(other.updateAvailable, updateAvailable) || 127 | other.updateAvailable == updateAvailable) && 128 | (identical(other.optional, optional) || 129 | other.optional == optional)); 130 | } 131 | 132 | @override 133 | int get hashCode => Object.hash(runtimeType, updateAvailable, optional); 134 | 135 | @JsonKey(ignore: true) 136 | @override 137 | @pragma('vm:prefer-inline') 138 | _$$_AppUpdateStatusCopyWith<_$_AppUpdateStatus> get copyWith => 139 | __$$_AppUpdateStatusCopyWithImpl<_$_AppUpdateStatus>(this, _$identity); 140 | } 141 | 142 | abstract class _AppUpdateStatus implements AppUpdateStatus { 143 | const factory _AppUpdateStatus( 144 | {final bool updateAvailable, final bool optional}) = _$_AppUpdateStatus; 145 | 146 | @override 147 | bool get updateAvailable; 148 | @override 149 | bool get optional; 150 | @override 151 | @JsonKey(ignore: true) 152 | _$$_AppUpdateStatusCopyWith<_$_AppUpdateStatus> get copyWith => 153 | throw _privateConstructorUsedError; 154 | } 155 | -------------------------------------------------------------------------------- /lib/features/app_update/data/models/app_version.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'app_version.freezed.dart'; 4 | part 'app_version.g.dart'; 5 | 6 | @freezed 7 | class AppVersion with _$AppVersion { 8 | const factory AppVersion({ 9 | required String version, 10 | @JsonKey(name: 'build_number') required int buildNumber, 11 | @JsonKey(name: 'is_optional') @Default(true) bool optional, 12 | }) = _AppVersion; 13 | 14 | factory AppVersion.fromJson(Map json) => 15 | _$AppVersionFromJson(json); 16 | } 17 | 18 | extension AppVersionX on AppVersion { 19 | bool compareToPreferred(AppVersion firebaseAppVersion) { 20 | final curr = splitVersion; 21 | final upd = firebaseAppVersion.splitVersion; 22 | 23 | if (curr.length != upd.length || curr.length != 3) return false; 24 | 25 | for (var i = 0; i < curr.length; i++) { 26 | final currSegment = int.tryParse(curr[i]) ?? 0; 27 | final updSegment = int.tryParse(upd[i]) ?? 0; 28 | 29 | if (currSegment < updSegment) return true; 30 | if (updSegment < currSegment) return false; 31 | } 32 | 33 | return buildNumber < firebaseAppVersion.buildNumber; 34 | } 35 | 36 | List get splitVersion => version.split('.'); 37 | } 38 | -------------------------------------------------------------------------------- /lib/features/app_update/data/models/app_version.freezed.dart: -------------------------------------------------------------------------------- 1 | // coverage:ignore-file 2 | // GENERATED CODE - DO NOT MODIFY BY HAND 3 | // ignore_for_file: type=lint 4 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark 5 | 6 | part of 'app_version.dart'; 7 | 8 | // ************************************************************************** 9 | // FreezedGenerator 10 | // ************************************************************************** 11 | 12 | T _$identity(T value) => value; 13 | 14 | final _privateConstructorUsedError = UnsupportedError( 15 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); 16 | 17 | AppVersion _$AppVersionFromJson(Map json) { 18 | return _AppVersion.fromJson(json); 19 | } 20 | 21 | /// @nodoc 22 | mixin _$AppVersion { 23 | String get version => throw _privateConstructorUsedError; 24 | @JsonKey(name: 'build_number') 25 | int get buildNumber => throw _privateConstructorUsedError; 26 | @JsonKey(name: 'is_optional') 27 | bool get optional => throw _privateConstructorUsedError; 28 | 29 | Map toJson() => throw _privateConstructorUsedError; 30 | @JsonKey(ignore: true) 31 | $AppVersionCopyWith get copyWith => 32 | throw _privateConstructorUsedError; 33 | } 34 | 35 | /// @nodoc 36 | abstract class $AppVersionCopyWith<$Res> { 37 | factory $AppVersionCopyWith( 38 | AppVersion value, $Res Function(AppVersion) then) = 39 | _$AppVersionCopyWithImpl<$Res, AppVersion>; 40 | @useResult 41 | $Res call( 42 | {String version, 43 | @JsonKey(name: 'build_number') int buildNumber, 44 | @JsonKey(name: 'is_optional') bool optional}); 45 | } 46 | 47 | /// @nodoc 48 | class _$AppVersionCopyWithImpl<$Res, $Val extends AppVersion> 49 | implements $AppVersionCopyWith<$Res> { 50 | _$AppVersionCopyWithImpl(this._value, this._then); 51 | 52 | // ignore: unused_field 53 | final $Val _value; 54 | // ignore: unused_field 55 | final $Res Function($Val) _then; 56 | 57 | @pragma('vm:prefer-inline') 58 | @override 59 | $Res call({ 60 | Object? version = null, 61 | Object? buildNumber = null, 62 | Object? optional = null, 63 | }) { 64 | return _then(_value.copyWith( 65 | version: null == version 66 | ? _value.version 67 | : version // ignore: cast_nullable_to_non_nullable 68 | as String, 69 | buildNumber: null == buildNumber 70 | ? _value.buildNumber 71 | : buildNumber // ignore: cast_nullable_to_non_nullable 72 | as int, 73 | optional: null == optional 74 | ? _value.optional 75 | : optional // ignore: cast_nullable_to_non_nullable 76 | as bool, 77 | ) as $Val); 78 | } 79 | } 80 | 81 | /// @nodoc 82 | abstract class _$$_AppVersionCopyWith<$Res> 83 | implements $AppVersionCopyWith<$Res> { 84 | factory _$$_AppVersionCopyWith( 85 | _$_AppVersion value, $Res Function(_$_AppVersion) then) = 86 | __$$_AppVersionCopyWithImpl<$Res>; 87 | @override 88 | @useResult 89 | $Res call( 90 | {String version, 91 | @JsonKey(name: 'build_number') int buildNumber, 92 | @JsonKey(name: 'is_optional') bool optional}); 93 | } 94 | 95 | /// @nodoc 96 | class __$$_AppVersionCopyWithImpl<$Res> 97 | extends _$AppVersionCopyWithImpl<$Res, _$_AppVersion> 98 | implements _$$_AppVersionCopyWith<$Res> { 99 | __$$_AppVersionCopyWithImpl( 100 | _$_AppVersion _value, $Res Function(_$_AppVersion) _then) 101 | : super(_value, _then); 102 | 103 | @pragma('vm:prefer-inline') 104 | @override 105 | $Res call({ 106 | Object? version = null, 107 | Object? buildNumber = null, 108 | Object? optional = null, 109 | }) { 110 | return _then(_$_AppVersion( 111 | version: null == version 112 | ? _value.version 113 | : version // ignore: cast_nullable_to_non_nullable 114 | as String, 115 | buildNumber: null == buildNumber 116 | ? _value.buildNumber 117 | : buildNumber // ignore: cast_nullable_to_non_nullable 118 | as int, 119 | optional: null == optional 120 | ? _value.optional 121 | : optional // ignore: cast_nullable_to_non_nullable 122 | as bool, 123 | )); 124 | } 125 | } 126 | 127 | /// @nodoc 128 | @JsonSerializable() 129 | class _$_AppVersion implements _AppVersion { 130 | const _$_AppVersion( 131 | {required this.version, 132 | @JsonKey(name: 'build_number') required this.buildNumber, 133 | @JsonKey(name: 'is_optional') this.optional = true}); 134 | 135 | factory _$_AppVersion.fromJson(Map json) => 136 | _$$_AppVersionFromJson(json); 137 | 138 | @override 139 | final String version; 140 | @override 141 | @JsonKey(name: 'build_number') 142 | final int buildNumber; 143 | @override 144 | @JsonKey(name: 'is_optional') 145 | final bool optional; 146 | 147 | @override 148 | String toString() { 149 | return 'AppVersion(version: $version, buildNumber: $buildNumber, optional: $optional)'; 150 | } 151 | 152 | @override 153 | bool operator ==(dynamic other) { 154 | return identical(this, other) || 155 | (other.runtimeType == runtimeType && 156 | other is _$_AppVersion && 157 | (identical(other.version, version) || other.version == version) && 158 | (identical(other.buildNumber, buildNumber) || 159 | other.buildNumber == buildNumber) && 160 | (identical(other.optional, optional) || 161 | other.optional == optional)); 162 | } 163 | 164 | @JsonKey(ignore: true) 165 | @override 166 | int get hashCode => Object.hash(runtimeType, version, buildNumber, optional); 167 | 168 | @JsonKey(ignore: true) 169 | @override 170 | @pragma('vm:prefer-inline') 171 | _$$_AppVersionCopyWith<_$_AppVersion> get copyWith => 172 | __$$_AppVersionCopyWithImpl<_$_AppVersion>(this, _$identity); 173 | 174 | @override 175 | Map toJson() { 176 | return _$$_AppVersionToJson( 177 | this, 178 | ); 179 | } 180 | } 181 | 182 | abstract class _AppVersion implements AppVersion { 183 | const factory _AppVersion( 184 | {required final String version, 185 | @JsonKey(name: 'build_number') required final int buildNumber, 186 | @JsonKey(name: 'is_optional') final bool optional}) = _$_AppVersion; 187 | 188 | factory _AppVersion.fromJson(Map json) = 189 | _$_AppVersion.fromJson; 190 | 191 | @override 192 | String get version; 193 | @override 194 | @JsonKey(name: 'build_number') 195 | int get buildNumber; 196 | @override 197 | @JsonKey(name: 'is_optional') 198 | bool get optional; 199 | @override 200 | @JsonKey(ignore: true) 201 | _$$_AppVersionCopyWith<_$_AppVersion> get copyWith => 202 | throw _privateConstructorUsedError; 203 | } 204 | -------------------------------------------------------------------------------- /lib/features/app_update/data/models/app_version.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'app_version.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_AppVersion _$$_AppVersionFromJson(Map json) => 10 | _$_AppVersion( 11 | version: json['version'] as String, 12 | buildNumber: json['build_number'] as int, 13 | optional: json['is_optional'] as bool? ?? true, 14 | ); 15 | 16 | Map _$$_AppVersionToJson(_$_AppVersion instance) => 17 | { 18 | 'version': instance.version, 19 | 'build_number': instance.buildNumber, 20 | 'is_optional': instance.optional, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/features/app_update/widgets/app_update_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 3 | import 'package:go_router/go_router.dart'; 4 | 5 | import '../../../util/url_launcher.dart'; 6 | import '../../event/view/event_page.dart'; 7 | 8 | void showAppUpdateDialog( 9 | BuildContext context, { 10 | required bool optional, 11 | }) { 12 | showDialog( 13 | context: context, 14 | builder: (_) => _AppUpdateDialog(optional: optional), 15 | barrierDismissible: false, 16 | ); 17 | } 18 | 19 | class _AppUpdateDialog extends ConsumerWidget { 20 | const _AppUpdateDialog({ 21 | required this.optional, 22 | }); 23 | 24 | final bool optional; 25 | 26 | @override 27 | Widget build(BuildContext context, WidgetRef ref) { 28 | return AlertDialog( 29 | title: const Text('Update available'), 30 | content: const Text('A new version of the app is available.'), 31 | actions: [ 32 | if (optional) 33 | TextButton( 34 | onPressed: () => context.replace(EventPage.path), 35 | child: const Text('Skip'), 36 | ), 37 | TextButton( 38 | onPressed: () => 39 | ref.read(urlLauncherProvider).launchUrl('https://apps.apple.com'), 40 | child: const Text('Update'), 41 | ), 42 | ], 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/features/event/data/event_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:riverpod_annotation/riverpod_annotation.dart'; 4 | 5 | import '../../firebase/firebase_remote_config_service.dart'; 6 | import 'models/event_info.dart'; 7 | 8 | part 'event_repository.g.dart'; 9 | 10 | @riverpod 11 | EventRepository eventRepository(EventRepositoryRef ref) { 12 | return EventRepository( 13 | firebaseRemoteConfigService: ref.watch(firebaseRemoteConfigServiceProvider), 14 | ); 15 | } 16 | 17 | @riverpod 18 | Future eventInfo(EventInfoRef ref) { 19 | return ref.watch(eventRepositoryProvider).getEventInfo(); 20 | } 21 | 22 | class EventRepository { 23 | const EventRepository({ 24 | required this.firebaseRemoteConfigService, 25 | }); 26 | 27 | final FirebaseRemoteConfigService firebaseRemoteConfigService; 28 | 29 | Future getEventInfo() async { 30 | final json = firebaseRemoteConfigService.getEventInfoJson(); 31 | 32 | return EventInfo.fromJson(jsonDecode(json) as Map); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/features/event/data/event_repository.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'event_repository.dart'; 4 | 5 | // ************************************************************************** 6 | // RiverpodGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: avoid_private_typedef_functions, non_constant_identifier_names, subtype_of_sealed_class, invalid_use_of_internal_member, unused_element, constant_identifier_names, unnecessary_raw_strings, library_private_types_in_public_api 10 | 11 | /// Copied from Dart SDK 12 | class _SystemHash { 13 | _SystemHash._(); 14 | 15 | static int combine(int hash, int value) { 16 | // ignore: parameter_assignments 17 | hash = 0x1fffffff & (hash + value); 18 | // ignore: parameter_assignments 19 | hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); 20 | return hash ^ (hash >> 6); 21 | } 22 | 23 | static int finish(int hash) { 24 | // ignore: parameter_assignments 25 | hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 26 | // ignore: parameter_assignments 27 | hash = hash ^ (hash >> 11); 28 | return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 29 | } 30 | } 31 | 32 | String $eventRepositoryHash() => r'48228af0559b3bbc601336b7282512e8587b99d6'; 33 | 34 | /// See also [eventRepository]. 35 | final eventRepositoryProvider = AutoDisposeProvider( 36 | eventRepository, 37 | name: r'eventRepositoryProvider', 38 | debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') 39 | ? null 40 | : $eventRepositoryHash, 41 | ); 42 | typedef EventRepositoryRef = AutoDisposeProviderRef; 43 | String $eventInfoHash() => r'b74891dff0412200c89f1b75b4b79471a6d2c574'; 44 | 45 | /// See also [eventInfo]. 46 | final eventInfoProvider = AutoDisposeFutureProvider( 47 | eventInfo, 48 | name: r'eventInfoProvider', 49 | debugGetCreateSourceHash: 50 | const bool.fromEnvironment('dart.vm.product') ? null : $eventInfoHash, 51 | ); 52 | typedef EventInfoRef = AutoDisposeFutureProviderRef; 53 | -------------------------------------------------------------------------------- /lib/features/event/data/models/event_info.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | import 'event_session.dart'; 4 | 5 | part 'event_info.freezed.dart'; 6 | part 'event_info.g.dart'; 7 | 8 | @freezed 9 | class EventInfo with _$EventInfo { 10 | const factory EventInfo({ 11 | required String title, 12 | required DateTime startsAt, 13 | @Default([]) List sessions, 14 | }) = _EventInfo; 15 | 16 | factory EventInfo.fromJson(Map json) => 17 | _$EventInfoFromJson(json); 18 | } 19 | -------------------------------------------------------------------------------- /lib/features/event/data/models/event_info.freezed.dart: -------------------------------------------------------------------------------- 1 | // coverage:ignore-file 2 | // GENERATED CODE - DO NOT MODIFY BY HAND 3 | // ignore_for_file: type=lint 4 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark 5 | 6 | part of 'event_info.dart'; 7 | 8 | // ************************************************************************** 9 | // FreezedGenerator 10 | // ************************************************************************** 11 | 12 | T _$identity(T value) => value; 13 | 14 | final _privateConstructorUsedError = UnsupportedError( 15 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); 16 | 17 | EventInfo _$EventInfoFromJson(Map json) { 18 | return _EventInfo.fromJson(json); 19 | } 20 | 21 | /// @nodoc 22 | mixin _$EventInfo { 23 | String get title => throw _privateConstructorUsedError; 24 | DateTime get startsAt => throw _privateConstructorUsedError; 25 | List get sessions => throw _privateConstructorUsedError; 26 | 27 | Map toJson() => throw _privateConstructorUsedError; 28 | @JsonKey(ignore: true) 29 | $EventInfoCopyWith get copyWith => 30 | throw _privateConstructorUsedError; 31 | } 32 | 33 | /// @nodoc 34 | abstract class $EventInfoCopyWith<$Res> { 35 | factory $EventInfoCopyWith(EventInfo value, $Res Function(EventInfo) then) = 36 | _$EventInfoCopyWithImpl<$Res, EventInfo>; 37 | @useResult 38 | $Res call({String title, DateTime startsAt, List sessions}); 39 | } 40 | 41 | /// @nodoc 42 | class _$EventInfoCopyWithImpl<$Res, $Val extends EventInfo> 43 | implements $EventInfoCopyWith<$Res> { 44 | _$EventInfoCopyWithImpl(this._value, this._then); 45 | 46 | // ignore: unused_field 47 | final $Val _value; 48 | // ignore: unused_field 49 | final $Res Function($Val) _then; 50 | 51 | @pragma('vm:prefer-inline') 52 | @override 53 | $Res call({ 54 | Object? title = null, 55 | Object? startsAt = null, 56 | Object? sessions = null, 57 | }) { 58 | return _then(_value.copyWith( 59 | title: null == title 60 | ? _value.title 61 | : title // ignore: cast_nullable_to_non_nullable 62 | as String, 63 | startsAt: null == startsAt 64 | ? _value.startsAt 65 | : startsAt // ignore: cast_nullable_to_non_nullable 66 | as DateTime, 67 | sessions: null == sessions 68 | ? _value.sessions 69 | : sessions // ignore: cast_nullable_to_non_nullable 70 | as List, 71 | ) as $Val); 72 | } 73 | } 74 | 75 | /// @nodoc 76 | abstract class _$$_EventInfoCopyWith<$Res> implements $EventInfoCopyWith<$Res> { 77 | factory _$$_EventInfoCopyWith( 78 | _$_EventInfo value, $Res Function(_$_EventInfo) then) = 79 | __$$_EventInfoCopyWithImpl<$Res>; 80 | @override 81 | @useResult 82 | $Res call({String title, DateTime startsAt, List sessions}); 83 | } 84 | 85 | /// @nodoc 86 | class __$$_EventInfoCopyWithImpl<$Res> 87 | extends _$EventInfoCopyWithImpl<$Res, _$_EventInfo> 88 | implements _$$_EventInfoCopyWith<$Res> { 89 | __$$_EventInfoCopyWithImpl( 90 | _$_EventInfo _value, $Res Function(_$_EventInfo) _then) 91 | : super(_value, _then); 92 | 93 | @pragma('vm:prefer-inline') 94 | @override 95 | $Res call({ 96 | Object? title = null, 97 | Object? startsAt = null, 98 | Object? sessions = null, 99 | }) { 100 | return _then(_$_EventInfo( 101 | title: null == title 102 | ? _value.title 103 | : title // ignore: cast_nullable_to_non_nullable 104 | as String, 105 | startsAt: null == startsAt 106 | ? _value.startsAt 107 | : startsAt // ignore: cast_nullable_to_non_nullable 108 | as DateTime, 109 | sessions: null == sessions 110 | ? _value._sessions 111 | : sessions // ignore: cast_nullable_to_non_nullable 112 | as List, 113 | )); 114 | } 115 | } 116 | 117 | /// @nodoc 118 | @JsonSerializable() 119 | class _$_EventInfo implements _EventInfo { 120 | const _$_EventInfo( 121 | {required this.title, 122 | required this.startsAt, 123 | final List sessions = const []}) 124 | : _sessions = sessions; 125 | 126 | factory _$_EventInfo.fromJson(Map json) => 127 | _$$_EventInfoFromJson(json); 128 | 129 | @override 130 | final String title; 131 | @override 132 | final DateTime startsAt; 133 | final List _sessions; 134 | @override 135 | @JsonKey() 136 | List get sessions { 137 | if (_sessions is EqualUnmodifiableListView) return _sessions; 138 | // ignore: implicit_dynamic_type 139 | return EqualUnmodifiableListView(_sessions); 140 | } 141 | 142 | @override 143 | String toString() { 144 | return 'EventInfo(title: $title, startsAt: $startsAt, sessions: $sessions)'; 145 | } 146 | 147 | @override 148 | bool operator ==(dynamic other) { 149 | return identical(this, other) || 150 | (other.runtimeType == runtimeType && 151 | other is _$_EventInfo && 152 | (identical(other.title, title) || other.title == title) && 153 | (identical(other.startsAt, startsAt) || 154 | other.startsAt == startsAt) && 155 | const DeepCollectionEquality().equals(other._sessions, _sessions)); 156 | } 157 | 158 | @JsonKey(ignore: true) 159 | @override 160 | int get hashCode => Object.hash(runtimeType, title, startsAt, 161 | const DeepCollectionEquality().hash(_sessions)); 162 | 163 | @JsonKey(ignore: true) 164 | @override 165 | @pragma('vm:prefer-inline') 166 | _$$_EventInfoCopyWith<_$_EventInfo> get copyWith => 167 | __$$_EventInfoCopyWithImpl<_$_EventInfo>(this, _$identity); 168 | 169 | @override 170 | Map toJson() { 171 | return _$$_EventInfoToJson( 172 | this, 173 | ); 174 | } 175 | } 176 | 177 | abstract class _EventInfo implements EventInfo { 178 | const factory _EventInfo( 179 | {required final String title, 180 | required final DateTime startsAt, 181 | final List sessions}) = _$_EventInfo; 182 | 183 | factory _EventInfo.fromJson(Map json) = 184 | _$_EventInfo.fromJson; 185 | 186 | @override 187 | String get title; 188 | @override 189 | DateTime get startsAt; 190 | @override 191 | List get sessions; 192 | @override 193 | @JsonKey(ignore: true) 194 | _$$_EventInfoCopyWith<_$_EventInfo> get copyWith => 195 | throw _privateConstructorUsedError; 196 | } 197 | -------------------------------------------------------------------------------- /lib/features/event/data/models/event_info.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'event_info.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_EventInfo _$$_EventInfoFromJson(Map json) => _$_EventInfo( 10 | title: json['title'] as String, 11 | startsAt: DateTime.parse(json['startsAt'] as String), 12 | sessions: (json['sessions'] as List?) 13 | ?.map((e) => EventSession.fromJson(e as Map)) 14 | .toList() ?? 15 | const [], 16 | ); 17 | 18 | Map _$$_EventInfoToJson(_$_EventInfo instance) => 19 | { 20 | 'title': instance.title, 21 | 'startsAt': instance.startsAt.toIso8601String(), 22 | 'sessions': instance.sessions, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/features/event/data/models/event_session.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'event_session.freezed.dart'; 4 | part 'event_session.g.dart'; 5 | 6 | @freezed 7 | class EventSession with _$EventSession { 8 | const factory EventSession({ 9 | required String id, 10 | @ColorConverter() required int color, 11 | required DateTime dateTimeFrom, 12 | required DateTime dateTimeTo, 13 | String? title, 14 | @Default([]) List speakers, 15 | }) = _EventSession; 16 | 17 | factory EventSession.fromJson(Map json) => 18 | _$EventSessionFromJson(json); 19 | } 20 | 21 | class ColorConverter implements JsonConverter { 22 | const ColorConverter(); 23 | 24 | @override 25 | int fromJson(String color) => int.parse(color); 26 | 27 | @override 28 | String toJson(int color) => color.toString(); 29 | } 30 | -------------------------------------------------------------------------------- /lib/features/event/data/models/event_session.freezed.dart: -------------------------------------------------------------------------------- 1 | // coverage:ignore-file 2 | // GENERATED CODE - DO NOT MODIFY BY HAND 3 | // ignore_for_file: type=lint 4 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark 5 | 6 | part of 'event_session.dart'; 7 | 8 | // ************************************************************************** 9 | // FreezedGenerator 10 | // ************************************************************************** 11 | 12 | T _$identity(T value) => value; 13 | 14 | final _privateConstructorUsedError = UnsupportedError( 15 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); 16 | 17 | EventSession _$EventSessionFromJson(Map json) { 18 | return _EventSession.fromJson(json); 19 | } 20 | 21 | /// @nodoc 22 | mixin _$EventSession { 23 | String get id => throw _privateConstructorUsedError; 24 | @ColorConverter() 25 | int get color => throw _privateConstructorUsedError; 26 | DateTime get dateTimeFrom => throw _privateConstructorUsedError; 27 | DateTime get dateTimeTo => throw _privateConstructorUsedError; 28 | String? get title => throw _privateConstructorUsedError; 29 | List get speakers => throw _privateConstructorUsedError; 30 | 31 | Map toJson() => throw _privateConstructorUsedError; 32 | @JsonKey(ignore: true) 33 | $EventSessionCopyWith get copyWith => 34 | throw _privateConstructorUsedError; 35 | } 36 | 37 | /// @nodoc 38 | abstract class $EventSessionCopyWith<$Res> { 39 | factory $EventSessionCopyWith( 40 | EventSession value, $Res Function(EventSession) then) = 41 | _$EventSessionCopyWithImpl<$Res, EventSession>; 42 | @useResult 43 | $Res call( 44 | {String id, 45 | @ColorConverter() int color, 46 | DateTime dateTimeFrom, 47 | DateTime dateTimeTo, 48 | String? title, 49 | List speakers}); 50 | } 51 | 52 | /// @nodoc 53 | class _$EventSessionCopyWithImpl<$Res, $Val extends EventSession> 54 | implements $EventSessionCopyWith<$Res> { 55 | _$EventSessionCopyWithImpl(this._value, this._then); 56 | 57 | // ignore: unused_field 58 | final $Val _value; 59 | // ignore: unused_field 60 | final $Res Function($Val) _then; 61 | 62 | @pragma('vm:prefer-inline') 63 | @override 64 | $Res call({ 65 | Object? id = null, 66 | Object? color = null, 67 | Object? dateTimeFrom = null, 68 | Object? dateTimeTo = null, 69 | Object? title = freezed, 70 | Object? speakers = null, 71 | }) { 72 | return _then(_value.copyWith( 73 | id: null == id 74 | ? _value.id 75 | : id // ignore: cast_nullable_to_non_nullable 76 | as String, 77 | color: null == color 78 | ? _value.color 79 | : color // ignore: cast_nullable_to_non_nullable 80 | as int, 81 | dateTimeFrom: null == dateTimeFrom 82 | ? _value.dateTimeFrom 83 | : dateTimeFrom // ignore: cast_nullable_to_non_nullable 84 | as DateTime, 85 | dateTimeTo: null == dateTimeTo 86 | ? _value.dateTimeTo 87 | : dateTimeTo // ignore: cast_nullable_to_non_nullable 88 | as DateTime, 89 | title: freezed == title 90 | ? _value.title 91 | : title // ignore: cast_nullable_to_non_nullable 92 | as String?, 93 | speakers: null == speakers 94 | ? _value.speakers 95 | : speakers // ignore: cast_nullable_to_non_nullable 96 | as List, 97 | ) as $Val); 98 | } 99 | } 100 | 101 | /// @nodoc 102 | abstract class _$$_EventSessionCopyWith<$Res> 103 | implements $EventSessionCopyWith<$Res> { 104 | factory _$$_EventSessionCopyWith( 105 | _$_EventSession value, $Res Function(_$_EventSession) then) = 106 | __$$_EventSessionCopyWithImpl<$Res>; 107 | @override 108 | @useResult 109 | $Res call( 110 | {String id, 111 | @ColorConverter() int color, 112 | DateTime dateTimeFrom, 113 | DateTime dateTimeTo, 114 | String? title, 115 | List speakers}); 116 | } 117 | 118 | /// @nodoc 119 | class __$$_EventSessionCopyWithImpl<$Res> 120 | extends _$EventSessionCopyWithImpl<$Res, _$_EventSession> 121 | implements _$$_EventSessionCopyWith<$Res> { 122 | __$$_EventSessionCopyWithImpl( 123 | _$_EventSession _value, $Res Function(_$_EventSession) _then) 124 | : super(_value, _then); 125 | 126 | @pragma('vm:prefer-inline') 127 | @override 128 | $Res call({ 129 | Object? id = null, 130 | Object? color = null, 131 | Object? dateTimeFrom = null, 132 | Object? dateTimeTo = null, 133 | Object? title = freezed, 134 | Object? speakers = null, 135 | }) { 136 | return _then(_$_EventSession( 137 | id: null == id 138 | ? _value.id 139 | : id // ignore: cast_nullable_to_non_nullable 140 | as String, 141 | color: null == color 142 | ? _value.color 143 | : color // ignore: cast_nullable_to_non_nullable 144 | as int, 145 | dateTimeFrom: null == dateTimeFrom 146 | ? _value.dateTimeFrom 147 | : dateTimeFrom // ignore: cast_nullable_to_non_nullable 148 | as DateTime, 149 | dateTimeTo: null == dateTimeTo 150 | ? _value.dateTimeTo 151 | : dateTimeTo // ignore: cast_nullable_to_non_nullable 152 | as DateTime, 153 | title: freezed == title 154 | ? _value.title 155 | : title // ignore: cast_nullable_to_non_nullable 156 | as String?, 157 | speakers: null == speakers 158 | ? _value._speakers 159 | : speakers // ignore: cast_nullable_to_non_nullable 160 | as List, 161 | )); 162 | } 163 | } 164 | 165 | /// @nodoc 166 | @JsonSerializable() 167 | class _$_EventSession implements _EventSession { 168 | const _$_EventSession( 169 | {required this.id, 170 | @ColorConverter() required this.color, 171 | required this.dateTimeFrom, 172 | required this.dateTimeTo, 173 | this.title, 174 | final List speakers = const []}) 175 | : _speakers = speakers; 176 | 177 | factory _$_EventSession.fromJson(Map json) => 178 | _$$_EventSessionFromJson(json); 179 | 180 | @override 181 | final String id; 182 | @override 183 | @ColorConverter() 184 | final int color; 185 | @override 186 | final DateTime dateTimeFrom; 187 | @override 188 | final DateTime dateTimeTo; 189 | @override 190 | final String? title; 191 | final List _speakers; 192 | @override 193 | @JsonKey() 194 | List get speakers { 195 | if (_speakers is EqualUnmodifiableListView) return _speakers; 196 | // ignore: implicit_dynamic_type 197 | return EqualUnmodifiableListView(_speakers); 198 | } 199 | 200 | @override 201 | String toString() { 202 | return 'EventSession(id: $id, color: $color, dateTimeFrom: $dateTimeFrom, dateTimeTo: $dateTimeTo, title: $title, speakers: $speakers)'; 203 | } 204 | 205 | @override 206 | bool operator ==(dynamic other) { 207 | return identical(this, other) || 208 | (other.runtimeType == runtimeType && 209 | other is _$_EventSession && 210 | (identical(other.id, id) || other.id == id) && 211 | (identical(other.color, color) || other.color == color) && 212 | (identical(other.dateTimeFrom, dateTimeFrom) || 213 | other.dateTimeFrom == dateTimeFrom) && 214 | (identical(other.dateTimeTo, dateTimeTo) || 215 | other.dateTimeTo == dateTimeTo) && 216 | (identical(other.title, title) || other.title == title) && 217 | const DeepCollectionEquality().equals(other._speakers, _speakers)); 218 | } 219 | 220 | @JsonKey(ignore: true) 221 | @override 222 | int get hashCode => Object.hash(runtimeType, id, color, dateTimeFrom, 223 | dateTimeTo, title, const DeepCollectionEquality().hash(_speakers)); 224 | 225 | @JsonKey(ignore: true) 226 | @override 227 | @pragma('vm:prefer-inline') 228 | _$$_EventSessionCopyWith<_$_EventSession> get copyWith => 229 | __$$_EventSessionCopyWithImpl<_$_EventSession>(this, _$identity); 230 | 231 | @override 232 | Map toJson() { 233 | return _$$_EventSessionToJson( 234 | this, 235 | ); 236 | } 237 | } 238 | 239 | abstract class _EventSession implements EventSession { 240 | const factory _EventSession( 241 | {required final String id, 242 | @ColorConverter() required final int color, 243 | required final DateTime dateTimeFrom, 244 | required final DateTime dateTimeTo, 245 | final String? title, 246 | final List speakers}) = _$_EventSession; 247 | 248 | factory _EventSession.fromJson(Map json) = 249 | _$_EventSession.fromJson; 250 | 251 | @override 252 | String get id; 253 | @override 254 | @ColorConverter() 255 | int get color; 256 | @override 257 | DateTime get dateTimeFrom; 258 | @override 259 | DateTime get dateTimeTo; 260 | @override 261 | String? get title; 262 | @override 263 | List get speakers; 264 | @override 265 | @JsonKey(ignore: true) 266 | _$$_EventSessionCopyWith<_$_EventSession> get copyWith => 267 | throw _privateConstructorUsedError; 268 | } 269 | -------------------------------------------------------------------------------- /lib/features/event/data/models/event_session.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'event_session.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_EventSession _$$_EventSessionFromJson(Map json) => 10 | _$_EventSession( 11 | id: json['id'] as String, 12 | color: const ColorConverter().fromJson(json['color'] as String), 13 | dateTimeFrom: DateTime.parse(json['dateTimeFrom'] as String), 14 | dateTimeTo: DateTime.parse(json['dateTimeTo'] as String), 15 | title: json['title'] as String?, 16 | speakers: (json['speakers'] as List?) 17 | ?.map((e) => e as String) 18 | .toList() ?? 19 | const [], 20 | ); 21 | 22 | Map _$$_EventSessionToJson(_$_EventSession instance) => 23 | { 24 | 'id': instance.id, 25 | 'color': const ColorConverter().toJson(instance.color), 26 | 'dateTimeFrom': instance.dateTimeFrom.toIso8601String(), 27 | 'dateTimeTo': instance.dateTimeTo.toIso8601String(), 28 | 'title': instance.title, 29 | 'speakers': instance.speakers, 30 | }; 31 | -------------------------------------------------------------------------------- /lib/features/event/view/event_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_animate/flutter_animate.dart'; 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | import 'package:intl/intl.dart'; 5 | 6 | import '../../../widgets/event_session_card.dart'; 7 | import '../../../widgets/loader.dart'; 8 | import '../../live_stream/widgets/stream_live_notification.dart'; 9 | import '../data/event_repository.dart'; 10 | 11 | class EventPage extends ConsumerWidget { 12 | static const path = '/'; 13 | 14 | const EventPage({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context, WidgetRef ref) { 18 | final eventInfo = ref.watch(eventInfoProvider); 19 | 20 | return Scaffold( 21 | body: SafeArea( 22 | child: eventInfo.maybeWhen( 23 | data: (eventInfo) => Padding( 24 | padding: const EdgeInsets.only(top: 16.0), 25 | child: Column( 26 | children: [ 27 | const LiveStreamNotification(), 28 | _Header( 29 | title: eventInfo.title, 30 | startsAt: eventInfo.startsAt, 31 | ), 32 | const SizedBox(height: 16.0), 33 | Expanded( 34 | child: ListView.separated( 35 | padding: const EdgeInsets.fromLTRB(16.0, 16.0, 0.0, 16.0), 36 | itemBuilder: (context, index) => EventSessionCard( 37 | eventSession: eventInfo.sessions[index], 38 | ).animate(delay: Duration(milliseconds: 100 * index)).slide( 39 | begin: const Offset(1.0, 0.0), 40 | curve: Curves.easeOutQuad, 41 | ), 42 | itemCount: eventInfo.sessions.length, 43 | separatorBuilder: (_, __) => const SizedBox(height: 8.0), 44 | ), 45 | ), 46 | ], 47 | ), 48 | ), 49 | orElse: () => const Loader(), 50 | ), 51 | ), 52 | ); 53 | } 54 | } 55 | 56 | class _Header extends StatelessWidget { 57 | const _Header({ 58 | required this.title, 59 | required this.startsAt, 60 | }); 61 | 62 | final String title; 63 | final DateTime startsAt; 64 | 65 | @override 66 | Widget build(BuildContext context) { 67 | final textColor = Theme.of(context).colorScheme.onBackground; 68 | 69 | return Padding( 70 | padding: const EdgeInsets.symmetric(horizontal: 16.0), 71 | child: Column( 72 | crossAxisAlignment: CrossAxisAlignment.start, 73 | children: [ 74 | Row( 75 | children: [ 76 | const FlutterLogo(size: 36.0), 77 | const SizedBox(width: 8.0), 78 | Text( 79 | title, 80 | style: Theme.of(context) 81 | .textTheme 82 | .headlineLarge 83 | ?.copyWith(color: textColor), 84 | ), 85 | ], 86 | ), 87 | const SizedBox(height: 16.0), 88 | Text( 89 | DateFormat.yMMMd().format(startsAt), 90 | style: Theme.of(context) 91 | .textTheme 92 | .titleLarge 93 | ?.copyWith(color: textColor), 94 | ), 95 | ], 96 | ), 97 | ); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /lib/features/favorites/data/enums/favorite_button_type.dart: -------------------------------------------------------------------------------- 1 | enum FavoriteButtonType { 2 | card('card'), 3 | slideable('slideable'); 4 | 5 | const FavoriteButtonType(this.value); 6 | 7 | final String value; 8 | 9 | static FavoriteButtonType fromString(String value) { 10 | return FavoriteButtonType.values.firstWhere( 11 | (e) => e.value == value, 12 | orElse: () => FavoriteButtonType.slideable, 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/features/favorites/data/favorites_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_analytics/firebase_analytics.dart'; 2 | import 'package:riverpod_annotation/riverpod_annotation.dart'; 3 | 4 | import '../../firebase/firebase_remote_config_service.dart'; 5 | import 'enums/favorite_button_type.dart'; 6 | 7 | part 'favorites_service.g.dart'; 8 | 9 | @riverpod 10 | FavoritesService favoritesService(FavoritesServiceRef ref) { 11 | return FavoritesService( 12 | analytics: FirebaseAnalytics.instance, 13 | firebaseRemoteConfigService: ref.watch(firebaseRemoteConfigServiceProvider), 14 | ); 15 | } 16 | 17 | @riverpod 18 | bool favoritesEnabled(FavoritesEnabledRef ref) { 19 | return ref.watch(favoritesServiceProvider).favoritesEnabled(); 20 | } 21 | 22 | @riverpod 23 | FavoriteButtonType favoriteButtonType(FavoriteButtonTypeRef ref) { 24 | return ref.watch(favoritesServiceProvider).favoriteButtonType(); 25 | } 26 | 27 | class FavoritesService { 28 | const FavoritesService({ 29 | required this.analytics, 30 | required this.firebaseRemoteConfigService, 31 | }); 32 | 33 | final FirebaseAnalytics analytics; 34 | final FirebaseRemoteConfigService firebaseRemoteConfigService; 35 | 36 | Future addToFavorites(String id) async { 37 | await analytics.logEvent( 38 | name: 'add_to_favorites', 39 | parameters: {'session_id': id}, 40 | ); 41 | } 42 | 43 | bool favoritesEnabled() { 44 | return firebaseRemoteConfigService.getFavoritesEnabled(); 45 | } 46 | 47 | FavoriteButtonType favoriteButtonType() { 48 | final type = firebaseRemoteConfigService.getFavoriteButtonType(); 49 | 50 | return FavoriteButtonType.fromString(type); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/features/favorites/data/favorites_service.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'favorites_service.dart'; 4 | 5 | // ************************************************************************** 6 | // RiverpodGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: avoid_private_typedef_functions, non_constant_identifier_names, subtype_of_sealed_class, invalid_use_of_internal_member, unused_element, constant_identifier_names, unnecessary_raw_strings, library_private_types_in_public_api 10 | 11 | /// Copied from Dart SDK 12 | class _SystemHash { 13 | _SystemHash._(); 14 | 15 | static int combine(int hash, int value) { 16 | // ignore: parameter_assignments 17 | hash = 0x1fffffff & (hash + value); 18 | // ignore: parameter_assignments 19 | hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); 20 | return hash ^ (hash >> 6); 21 | } 22 | 23 | static int finish(int hash) { 24 | // ignore: parameter_assignments 25 | hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 26 | // ignore: parameter_assignments 27 | hash = hash ^ (hash >> 11); 28 | return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 29 | } 30 | } 31 | 32 | String $favoritesServiceHash() => r'309d5196db9f2cace22f6ac3d004d0f4d8a8d202'; 33 | 34 | /// See also [favoritesService]. 35 | final favoritesServiceProvider = AutoDisposeProvider( 36 | favoritesService, 37 | name: r'favoritesServiceProvider', 38 | debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') 39 | ? null 40 | : $favoritesServiceHash, 41 | ); 42 | typedef FavoritesServiceRef = AutoDisposeProviderRef; 43 | String $favoritesEnabledHash() => r'eddd7d5c767cabb6e6600ba9921e19be2361864e'; 44 | 45 | /// See also [favoritesEnabled]. 46 | final favoritesEnabledProvider = AutoDisposeProvider( 47 | favoritesEnabled, 48 | name: r'favoritesEnabledProvider', 49 | debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') 50 | ? null 51 | : $favoritesEnabledHash, 52 | ); 53 | typedef FavoritesEnabledRef = AutoDisposeProviderRef; 54 | String $favoriteButtonTypeHash() => r'5fa9b452341fec297fa9729a50f34c1f7231e78a'; 55 | 56 | /// See also [favoriteButtonType]. 57 | final favoriteButtonTypeProvider = AutoDisposeProvider( 58 | favoriteButtonType, 59 | name: r'favoriteButtonTypeProvider', 60 | debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') 61 | ? null 62 | : $favoriteButtonTypeHash, 63 | ); 64 | typedef FavoriteButtonTypeRef = AutoDisposeProviderRef; 65 | -------------------------------------------------------------------------------- /lib/features/firebase/firebase_remote_config_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer' as developer; 2 | 3 | import 'package:firebase_core/firebase_core.dart'; 4 | import 'package:firebase_remote_config/firebase_remote_config.dart'; 5 | import 'package:riverpod_annotation/riverpod_annotation.dart'; 6 | 7 | part 'firebase_remote_config_service.g.dart'; 8 | 9 | @riverpod 10 | FirebaseRemoteConfigService firebaseRemoteConfigService(_) { 11 | throw UnimplementedError(); 12 | } 13 | 14 | class FirebaseRemoteConfigService { 15 | const FirebaseRemoteConfigService({ 16 | required this.firebaseRemoteConfig, 17 | }); 18 | 19 | final FirebaseRemoteConfig firebaseRemoteConfig; 20 | 21 | Future init() async { 22 | try { 23 | await firebaseRemoteConfig.ensureInitialized(); 24 | await firebaseRemoteConfig.setConfigSettings( 25 | RemoteConfigSettings( 26 | fetchTimeout: const Duration(seconds: 10), 27 | minimumFetchInterval: Duration.zero, 28 | ), 29 | ); 30 | await firebaseRemoteConfig.fetchAndActivate(); 31 | } on FirebaseException catch (e, st) { 32 | developer.log( 33 | 'Unable to initialize Firebase Remote Config', 34 | error: e, 35 | stackTrace: st, 36 | ); 37 | } 38 | } 39 | 40 | String getEventInfoJson() => firebaseRemoteConfig.getString('event_info'); 41 | 42 | String getAppVersionJson() => firebaseRemoteConfig.getString('app_version'); 43 | 44 | String getStreamLink() => firebaseRemoteConfig.getString('stream_link'); 45 | 46 | bool getStreamLive() => firebaseRemoteConfig.getBool('stream_live'); 47 | 48 | bool getFavoritesEnabled() => 49 | firebaseRemoteConfig.getBool('favorites_enabled'); 50 | 51 | String getFavoriteButtonType() => 52 | firebaseRemoteConfig.getString('favorite_button_type'); 53 | } 54 | -------------------------------------------------------------------------------- /lib/features/firebase/firebase_remote_config_service.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'firebase_remote_config_service.dart'; 4 | 5 | // ************************************************************************** 6 | // RiverpodGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: avoid_private_typedef_functions, non_constant_identifier_names, subtype_of_sealed_class, invalid_use_of_internal_member, unused_element, constant_identifier_names, unnecessary_raw_strings, library_private_types_in_public_api 10 | 11 | /// Copied from Dart SDK 12 | class _SystemHash { 13 | _SystemHash._(); 14 | 15 | static int combine(int hash, int value) { 16 | // ignore: parameter_assignments 17 | hash = 0x1fffffff & (hash + value); 18 | // ignore: parameter_assignments 19 | hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); 20 | return hash ^ (hash >> 6); 21 | } 22 | 23 | static int finish(int hash) { 24 | // ignore: parameter_assignments 25 | hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 26 | // ignore: parameter_assignments 27 | hash = hash ^ (hash >> 11); 28 | return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 29 | } 30 | } 31 | 32 | String $firebaseRemoteConfigServiceHash() => 33 | r'43544e7d847fc4f3c6a38203e26c8481fb2e0d53'; 34 | 35 | /// See also [firebaseRemoteConfigService]. 36 | final firebaseRemoteConfigServiceProvider = 37 | AutoDisposeProvider( 38 | firebaseRemoteConfigService, 39 | name: r'firebaseRemoteConfigServiceProvider', 40 | debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') 41 | ? null 42 | : $firebaseRemoteConfigServiceHash, 43 | ); 44 | typedef FirebaseRemoteConfigServiceRef 45 | = AutoDisposeProviderRef; 46 | -------------------------------------------------------------------------------- /lib/features/live_stream/data/live_stream_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:riverpod_annotation/riverpod_annotation.dart'; 2 | 3 | import '../../firebase/firebase_remote_config_service.dart'; 4 | 5 | part 'live_stream_service.g.dart'; 6 | 7 | @riverpod 8 | LiveStreamService liveStreamService(LiveStreamServiceRef ref) { 9 | return LiveStreamService( 10 | firebaseRemoteConfigService: ref.watch(firebaseRemoteConfigServiceProvider), 11 | ); 12 | } 13 | 14 | @riverpod 15 | bool streamLive(StreamLiveRef ref) { 16 | return ref.watch(liveStreamServiceProvider).streamLive(); 17 | } 18 | 19 | @riverpod 20 | String streamLink(StreamLinkRef ref) { 21 | return ref.watch(liveStreamServiceProvider).streamLink(); 22 | } 23 | 24 | class LiveStreamService { 25 | const LiveStreamService({ 26 | required this.firebaseRemoteConfigService, 27 | }); 28 | 29 | final FirebaseRemoteConfigService firebaseRemoteConfigService; 30 | 31 | bool streamLive() { 32 | return firebaseRemoteConfigService.getStreamLive(); 33 | } 34 | 35 | String streamLink() { 36 | return firebaseRemoteConfigService.getStreamLink(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/features/live_stream/data/live_stream_service.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'live_stream_service.dart'; 4 | 5 | // ************************************************************************** 6 | // RiverpodGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: avoid_private_typedef_functions, non_constant_identifier_names, subtype_of_sealed_class, invalid_use_of_internal_member, unused_element, constant_identifier_names, unnecessary_raw_strings, library_private_types_in_public_api 10 | 11 | /// Copied from Dart SDK 12 | class _SystemHash { 13 | _SystemHash._(); 14 | 15 | static int combine(int hash, int value) { 16 | // ignore: parameter_assignments 17 | hash = 0x1fffffff & (hash + value); 18 | // ignore: parameter_assignments 19 | hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); 20 | return hash ^ (hash >> 6); 21 | } 22 | 23 | static int finish(int hash) { 24 | // ignore: parameter_assignments 25 | hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 26 | // ignore: parameter_assignments 27 | hash = hash ^ (hash >> 11); 28 | return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 29 | } 30 | } 31 | 32 | String $liveStreamServiceHash() => r'342df6a4554712559362d4e626497b0abc842f8f'; 33 | 34 | /// See also [liveStreamService]. 35 | final liveStreamServiceProvider = AutoDisposeProvider( 36 | liveStreamService, 37 | name: r'liveStreamServiceProvider', 38 | debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product') 39 | ? null 40 | : $liveStreamServiceHash, 41 | ); 42 | typedef LiveStreamServiceRef = AutoDisposeProviderRef; 43 | String $streamLiveHash() => r'f83fdae40db862682bf6ed06fab607d1530497e1'; 44 | 45 | /// See also [streamLive]. 46 | final streamLiveProvider = AutoDisposeProvider( 47 | streamLive, 48 | name: r'streamLiveProvider', 49 | debugGetCreateSourceHash: 50 | const bool.fromEnvironment('dart.vm.product') ? null : $streamLiveHash, 51 | ); 52 | typedef StreamLiveRef = AutoDisposeProviderRef; 53 | String $streamLinkHash() => r'a6ee09d8734d15efa3f2294fadfa6d36ebbf959e'; 54 | 55 | /// See also [streamLink]. 56 | final streamLinkProvider = AutoDisposeProvider( 57 | streamLink, 58 | name: r'streamLinkProvider', 59 | debugGetCreateSourceHash: 60 | const bool.fromEnvironment('dart.vm.product') ? null : $streamLinkHash, 61 | ); 62 | typedef StreamLinkRef = AutoDisposeProviderRef; 63 | -------------------------------------------------------------------------------- /lib/features/live_stream/widgets/stream_live_notification.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/gestures.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | 5 | import '../../../util/url_launcher.dart'; 6 | import '../data/live_stream_service.dart'; 7 | 8 | class LiveStreamNotification extends ConsumerWidget { 9 | const LiveStreamNotification({super.key}); 10 | 11 | @override 12 | Widget build(BuildContext context, WidgetRef ref) { 13 | final streamLive = ref.watch(streamLiveProvider); 14 | 15 | if (!streamLive) return const SizedBox.shrink(); 16 | 17 | final streamLink = ref.watch(streamLinkProvider); 18 | 19 | return Container( 20 | padding: const EdgeInsets.symmetric( 21 | horizontal: 16.0, 22 | vertical: 8.0, 23 | ), 24 | margin: const EdgeInsets.fromLTRB(16.0, 0.0, 16.0, 16.0), 25 | color: Colors.red, 26 | child: Text.rich( 27 | TextSpan( 28 | text: 'The event is LIVE! ', 29 | children: [ 30 | TextSpan( 31 | text: 'Watch here.', 32 | style: const TextStyle( 33 | decoration: TextDecoration.underline, 34 | fontWeight: FontWeight.bold, 35 | ), 36 | recognizer: TapGestureRecognizer() 37 | ..onTap = 38 | () => ref.read(urlLauncherProvider).launchUrl(streamLink), 39 | ), 40 | ], 41 | ), 42 | style: Theme.of(context).textTheme.labelLarge, 43 | ), 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/features/splash/view/splash_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 3 | import 'package:go_router/go_router.dart'; 4 | 5 | import '../../app_update/data/app_update_service.dart'; 6 | import '../../app_update/widgets/app_update_dialog.dart'; 7 | import '../../event/view/event_page.dart'; 8 | 9 | class SplashPage extends ConsumerStatefulWidget { 10 | static const path = '/splash'; 11 | 12 | const SplashPage({super.key}); 13 | 14 | @override 15 | ConsumerState createState() => _SplashPageState(); 16 | } 17 | 18 | class _SplashPageState extends ConsumerState 19 | with SingleTickerProviderStateMixin { 20 | late final AnimationController _controller; 21 | 22 | @override 23 | void initState() { 24 | super.initState(); 25 | 26 | _controller = AnimationController( 27 | vsync: this, 28 | duration: const Duration(seconds: 2), 29 | )..repeat(); 30 | } 31 | 32 | @override 33 | void dispose() { 34 | _controller.dispose(); 35 | 36 | super.dispose(); 37 | } 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | ref.listen( 42 | updateStatusProvider, 43 | (_, cur) => cur.whenData((updateStatus) { 44 | final updateAvailable = updateStatus.updateAvailable; 45 | 46 | if (!updateAvailable) return context.replace(EventPage.path); 47 | 48 | showAppUpdateDialog( 49 | context, 50 | optional: updateStatus.optional, 51 | ); 52 | }), 53 | ); 54 | 55 | return Scaffold( 56 | body: SafeArea( 57 | child: Center( 58 | child: RotationTransition( 59 | turns: _controller, 60 | child: const FlutterLogo(size: 64.0), 61 | ), 62 | ), 63 | ), 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_core/firebase_core.dart'; 2 | import 'package:firebase_remote_config/firebase_remote_config.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 5 | 6 | import 'app_router.dart'; 7 | import 'features/firebase/firebase_options.dart'; 8 | import 'features/firebase/firebase_remote_config_service.dart'; 9 | 10 | Future main() async { 11 | WidgetsFlutterBinding.ensureInitialized(); 12 | 13 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); 14 | 15 | final firebaseRemoteConfigService = FirebaseRemoteConfigService( 16 | firebaseRemoteConfig: FirebaseRemoteConfig.instance, 17 | ); 18 | await firebaseRemoteConfigService.init(); 19 | 20 | runApp( 21 | ProviderScope( 22 | overrides: [ 23 | firebaseRemoteConfigServiceProvider.overrideWith( 24 | (_) => firebaseRemoteConfigService, 25 | ), 26 | ], 27 | child: const App(), 28 | ), 29 | ); 30 | } 31 | 32 | class App extends ConsumerWidget { 33 | const App({super.key}); 34 | 35 | @override 36 | Widget build(BuildContext context, WidgetRef ref) { 37 | final router = ref.watch(routerProvider); 38 | 39 | const backgroundColor = Color(0xFF1F1F1F); 40 | 41 | return MaterialApp.router( 42 | title: 'Flutter Firebase Remote Config Demo', 43 | routerConfig: router, 44 | theme: ThemeData.from( 45 | colorScheme: const ColorScheme.dark(background: backgroundColor), 46 | useMaterial3: true, 47 | ).copyWith( 48 | scaffoldBackgroundColor: backgroundColor, 49 | typography: Typography.material2021(), 50 | appBarTheme: const AppBarTheme( 51 | backgroundColor: backgroundColor, 52 | ), 53 | floatingActionButtonTheme: FloatingActionButtonThemeData( 54 | backgroundColor: Colors.white, 55 | foregroundColor: backgroundColor, 56 | splashColor: backgroundColor.withOpacity(0.2), 57 | ), 58 | snackBarTheme: const SnackBarThemeData( 59 | backgroundColor: Colors.red, 60 | contentTextStyle: TextStyle(color: Colors.white), 61 | ), 62 | ), 63 | debugShowCheckedModeBanner: false, 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/util/url_launcher.dart: -------------------------------------------------------------------------------- 1 | import 'package:riverpod_annotation/riverpod_annotation.dart'; 2 | import 'package:url_launcher/url_launcher.dart' as url_launcher; 3 | 4 | part 'url_launcher.g.dart'; 5 | 6 | @riverpod 7 | UrlLauncher urlLauncher(_) => const UrlLauncher(); 8 | 9 | class UrlLauncher { 10 | const UrlLauncher(); 11 | 12 | Future launchUrl(String urlString) async { 13 | final url = Uri.tryParse(urlString); 14 | 15 | if (url == null) return; 16 | 17 | if (!await url_launcher.launchUrl(url)) { 18 | throw 'Could not launch $url'; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/util/url_launcher.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'url_launcher.dart'; 4 | 5 | // ************************************************************************** 6 | // RiverpodGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: avoid_private_typedef_functions, non_constant_identifier_names, subtype_of_sealed_class, invalid_use_of_internal_member, unused_element, constant_identifier_names, unnecessary_raw_strings, library_private_types_in_public_api 10 | 11 | /// Copied from Dart SDK 12 | class _SystemHash { 13 | _SystemHash._(); 14 | 15 | static int combine(int hash, int value) { 16 | // ignore: parameter_assignments 17 | hash = 0x1fffffff & (hash + value); 18 | // ignore: parameter_assignments 19 | hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10)); 20 | return hash ^ (hash >> 6); 21 | } 22 | 23 | static int finish(int hash) { 24 | // ignore: parameter_assignments 25 | hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3)); 26 | // ignore: parameter_assignments 27 | hash = hash ^ (hash >> 11); 28 | return 0x1fffffff & (hash + ((0x00003fff & hash) << 15)); 29 | } 30 | } 31 | 32 | String $urlLauncherHash() => r'd3164e8ba938609a983f040200bc9ba9f345d30a'; 33 | 34 | /// See also [urlLauncher]. 35 | final urlLauncherProvider = AutoDisposeProvider( 36 | urlLauncher, 37 | name: r'urlLauncherProvider', 38 | debugGetCreateSourceHash: 39 | const bool.fromEnvironment('dart.vm.product') ? null : $urlLauncherHash, 40 | ); 41 | typedef UrlLauncherRef = AutoDisposeProviderRef; 42 | -------------------------------------------------------------------------------- /lib/widgets/event_session_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 3 | import 'package:flutter_slidable/flutter_slidable.dart'; 4 | import 'package:intl/intl.dart'; 5 | 6 | import '../features/event/data/models/event_session.dart'; 7 | import '../features/favorites/data/enums/favorite_button_type.dart'; 8 | import '../features/favorites/data/favorites_service.dart'; 9 | 10 | class EventSessionCard extends ConsumerWidget { 11 | const EventSessionCard({ 12 | required this.eventSession, 13 | super.key, 14 | }); 15 | 16 | final EventSession eventSession; 17 | 18 | void _addToFavorites(BuildContext context, WidgetRef ref) { 19 | ref.read(favoritesServiceProvider).addToFavorites(eventSession.id).then( 20 | (_) { 21 | const snackBar = SnackBar( 22 | content: Text( 23 | 'Add to favorites feature is coming soon!', 24 | textAlign: TextAlign.center, 25 | ), 26 | ); 27 | 28 | ScaffoldMessenger.of(context) 29 | ..hideCurrentSnackBar() 30 | ..showSnackBar(snackBar); 31 | }, 32 | ); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context, WidgetRef ref) { 37 | final favoritesEnabled = ref.watch(favoritesEnabledProvider); 38 | final favoriteButtonType = ref.watch(favoriteButtonTypeProvider); 39 | 40 | return Slidable( 41 | enabled: favoritesEnabled && 42 | FavoriteButtonType.slideable == favoriteButtonType, 43 | endActionPane: ActionPane( 44 | motion: const Padding( 45 | padding: EdgeInsets.only(right: 16.0), 46 | child: ScrollMotion(), 47 | ), 48 | extentRatio: 0.25, 49 | children: [ 50 | SlidableAction( 51 | backgroundColor: Colors.red, 52 | borderRadius: const BorderRadius.horizontal( 53 | right: Radius.circular(16.0), 54 | ), 55 | icon: Icons.favorite, 56 | onPressed: (context) => _addToFavorites(context, ref), 57 | ), 58 | ], 59 | ), 60 | child: Container( 61 | decoration: BoxDecoration( 62 | color: Color(eventSession.color), 63 | borderRadius: const BorderRadius.horizontal( 64 | left: Radius.circular(16.0), 65 | ), 66 | ), 67 | child: IntrinsicHeight( 68 | child: Row( 69 | children: [ 70 | _TimeIndicator( 71 | dateTimeFrom: eventSession.dateTimeFrom, 72 | dateTimeTo: eventSession.dateTimeTo, 73 | ), 74 | Expanded( 75 | child: _CardContent( 76 | title: eventSession.title ?? 'TBA', 77 | speakers: eventSession.speakers, 78 | onAddToFavorites: () => _addToFavorites(context, ref), 79 | ), 80 | ), 81 | ], 82 | ), 83 | ), 84 | ), 85 | ); 86 | } 87 | } 88 | 89 | class _CardContent extends StatelessWidget { 90 | const _CardContent({ 91 | required this.title, 92 | required this.speakers, 93 | required this.onAddToFavorites, 94 | }); 95 | 96 | final String title; 97 | final List speakers; 98 | final VoidCallback onAddToFavorites; 99 | 100 | @override 101 | Widget build(BuildContext context) { 102 | final textColor = Theme.of(context).colorScheme.background; 103 | 104 | return Column( 105 | crossAxisAlignment: CrossAxisAlignment.start, 106 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 107 | children: [ 108 | Padding( 109 | padding: const EdgeInsets.fromLTRB(0.0, 16.0, 16.0, 16.0), 110 | child: Text( 111 | title, 112 | style: Theme.of(context) 113 | .textTheme 114 | .headlineLarge 115 | ?.copyWith(color: textColor, fontWeight: FontWeight.w500), 116 | ), 117 | ), 118 | Row( 119 | crossAxisAlignment: CrossAxisAlignment.end, 120 | mainAxisAlignment: MainAxisAlignment.end, 121 | children: [ 122 | if (speakers.isNotEmpty) 123 | Expanded( 124 | child: Padding( 125 | padding: const EdgeInsets.only(bottom: 16.0), 126 | child: Text( 127 | 'by ${speakers.join(', ')}', 128 | style: Theme.of(context).textTheme.bodyMedium?.copyWith( 129 | color: textColor, fontWeight: FontWeight.w500), 130 | ), 131 | ), 132 | ), 133 | const SizedBox(width: 16.0), 134 | _FavoriteButton(onTap: onAddToFavorites), 135 | ], 136 | ), 137 | ], 138 | ); 139 | } 140 | } 141 | 142 | class _FavoriteButton extends ConsumerWidget { 143 | const _FavoriteButton({ 144 | required this.onTap, 145 | }); 146 | 147 | final VoidCallback onTap; 148 | 149 | @override 150 | Widget build(BuildContext context, WidgetRef ref) { 151 | final favoritesEnabled = ref.watch(favoritesEnabledProvider); 152 | final favoriteButtonType = ref.watch(favoriteButtonTypeProvider); 153 | 154 | final enabled = 155 | favoritesEnabled && FavoriteButtonType.card == favoriteButtonType; 156 | 157 | if (!enabled) return const SizedBox.shrink(); 158 | 159 | const borderRadius = BorderRadius.only(topLeft: Radius.circular(16.0)); 160 | 161 | return Material( 162 | borderRadius: borderRadius, 163 | color: Colors.red, 164 | child: InkWell( 165 | borderRadius: borderRadius, 166 | onTap: onTap, 167 | child: const Padding( 168 | padding: EdgeInsets.all(8.0), 169 | child: Icon(Icons.favorite, size: 20.0), 170 | ), 171 | ), 172 | ); 173 | } 174 | } 175 | 176 | class _TimeIndicator extends StatelessWidget { 177 | const _TimeIndicator({ 178 | required this.dateTimeFrom, 179 | required this.dateTimeTo, 180 | }); 181 | 182 | final DateTime dateTimeFrom; 183 | final DateTime dateTimeTo; 184 | 185 | @override 186 | Widget build(BuildContext context) { 187 | return Padding( 188 | padding: const EdgeInsets.all(16.0), 189 | child: Column( 190 | mainAxisAlignment: MainAxisAlignment.center, 191 | children: [ 192 | _TimeColumn(dateTimeFrom), 193 | Container( 194 | height: 16.0, 195 | width: 1.0, 196 | margin: const EdgeInsets.symmetric(vertical: 4.0), 197 | color: Theme.of(context).colorScheme.background, 198 | ), 199 | _TimeColumn(dateTimeTo), 200 | ], 201 | ), 202 | ); 203 | } 204 | } 205 | 206 | class _TimeColumn extends StatelessWidget { 207 | const _TimeColumn(this.dateTime); 208 | 209 | final DateTime dateTime; 210 | 211 | @override 212 | Widget build(BuildContext context) { 213 | final textColor = Theme.of(context).colorScheme.background; 214 | 215 | return Column( 216 | crossAxisAlignment: CrossAxisAlignment.center, 217 | children: [ 218 | Text( 219 | DateFormat.H().format(dateTime), 220 | style: Theme.of(context).textTheme.titleMedium?.copyWith( 221 | color: textColor, 222 | fontWeight: FontWeight.w600, 223 | height: 1.0, 224 | ), 225 | ), 226 | const SizedBox(height: 2.0), 227 | Text( 228 | DateFormat('mm').format(dateTime), 229 | style: Theme.of(context).textTheme.bodySmall?.copyWith( 230 | color: textColor, 231 | fontWeight: FontWeight.w500, 232 | height: 1.0, 233 | ), 234 | ), 235 | ], 236 | ); 237 | } 238 | } 239 | -------------------------------------------------------------------------------- /lib/widgets/loader.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Loader extends StatelessWidget { 4 | const Loader({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return const Center( 9 | child: CircularProgressIndicator(color: Colors.white), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_firebase_remote_config_demo 2 | description: Flutter + Firebase Remote Config demo project. 3 | publish_to: "none" 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.18.5 <3.0.0" 8 | dependencies: 9 | cupertino_icons: ^1.0.2 10 | firebase_analytics: ^10.1.0 11 | firebase_core: ^2.4.1 12 | firebase_remote_config: ^3.0.9 13 | flutter: 14 | sdk: flutter 15 | flutter_animate: ^2.0.1 16 | flutter_riverpod: ^2.1.1 17 | flutter_slidable: ^2.0.0 18 | freezed_annotation: ^2.2.0 19 | go_router: ^5.2.2 20 | intl: ^0.17.0 21 | json_annotation: ^4.7.0 22 | package_info_plus: ^3.0.2 23 | riverpod_annotation: ^1.0.6 24 | url_launcher: ^6.1.7 25 | 26 | dev_dependencies: 27 | build_runner: ^2.3.2 28 | flutter_test: 29 | sdk: flutter 30 | flutter_lints: ^2.0.0 31 | freezed: ^2.3.0 32 | json_serializable: ^6.5.4 33 | riverpod_generator: ^1.0.6 34 | 35 | flutter: 36 | uses-material-design: true 37 | --------------------------------------------------------------------------------