├── .gitignore
├── .metadata
├── LICENSE
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── google-services.json
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ └── plugins
│ │ │ │ └── GeneratedPluginRegistrant.java
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── my_project
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── 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
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── audios
│ └── favicon.png
├── fonts
│ ├── Poppins-Regular.ttf
│ ├── Poppins-SemiBold.ttf
│ └── favicon.png
├── images
│ ├── ai_spy_logo.png
│ ├── app_launcher_icon.png
│ ├── codewords_game_cover.png
│ ├── favicon.png
│ └── spy_logo.png
├── lottie_animations
│ └── favicon.png
├── pdfs
│ └── favicon.png
├── rive_animations
│ └── favicon.png
└── videos
│ └── favicon.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── ImageNotification
│ ├── Info.plist
│ └── NotificationService.swift
├── 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
│ ├── GeneratedPluginRegistrant.h
│ ├── GeneratedPluginRegistrant.m
│ ├── GoogleService-Info.plist
│ ├── Info.plist
│ ├── Runner-Bridging-Header.h
│ └── Runner.entitlements
├── lib
├── app_state.dart
├── auth
│ ├── auth_manager.dart
│ ├── base_auth_user_provider.dart
│ └── firebase_auth
│ │ ├── anonymous_auth.dart
│ │ ├── apple_auth.dart
│ │ ├── auth_util.dart
│ │ ├── email_auth.dart
│ │ ├── firebase_auth_manager.dart
│ │ ├── firebase_user_provider.dart
│ │ ├── google_auth.dart
│ │ └── jwt_token_auth.dart
├── backend
│ ├── api_requests
│ │ ├── api_calls.dart
│ │ └── api_manager.dart
│ ├── backend.dart
│ ├── cloud_functions
│ │ └── cloud_functions.dart
│ ├── firebase
│ │ └── firebase_config.dart
│ ├── firebase_analytics
│ │ └── analytics.dart
│ └── schema
│ │ ├── firestore.indexes.json
│ │ ├── firestore.rules
│ │ ├── index.dart
│ │ ├── players_record.dart
│ │ ├── room_record.dart
│ │ ├── structs
│ │ ├── clue_data_struct.dart
│ │ └── index.dart
│ │ ├── users_record.dart
│ │ └── util
│ │ ├── firestore_util.dart
│ │ └── schema_util.dart
├── components
│ ├── game_mode_dialog
│ │ ├── game_mode_dialog_model.dart
│ │ └── game_mode_dialog_widget.dart
│ ├── join_game
│ │ ├── join_game_model.dart
│ │ └── join_game_widget.dart
│ ├── loading_dialog
│ │ ├── loading_dialog_model.dart
│ │ └── loading_dialog_widget.dart
│ └── loading_widget
│ │ ├── loading_widget_model.dart
│ │ └── loading_widget_widget.dart
├── custom_code
│ ├── actions
│ │ ├── calculate_words_left.dart
│ │ ├── declare_winner.dart
│ │ ├── generate_board_words.dart
│ │ ├── get_word_color.dart
│ │ ├── index.dart
│ │ ├── init_words.dart
│ │ └── word_tapped.dart
│ └── widgets
│ │ ├── circular_indicator.dart
│ │ ├── confetti_overlay.dart
│ │ └── index.dart
├── flutter_flow
│ ├── custom_functions.dart
│ ├── flutter_flow_animations.dart
│ ├── flutter_flow_icon_button.dart
│ ├── flutter_flow_model.dart
│ ├── flutter_flow_theme.dart
│ ├── flutter_flow_util.dart
│ ├── flutter_flow_widgets.dart
│ ├── form_field_controller.dart
│ ├── instant_timer.dart
│ ├── internationalization.dart
│ ├── lat_lng.dart
│ ├── nav
│ │ ├── nav.dart
│ │ └── serialization_util.dart
│ ├── place.dart
│ └── uploaded_file.dart
├── index.dart
├── main.dart
└── pages
│ ├── celebrate_pages
│ ├── blue_celebrate_page
│ │ ├── blue_celebrate_page_model.dart
│ │ └── blue_celebrate_page_widget.dart
│ └── red_celebrate_page
│ │ ├── red_celebrate_page_model.dart
│ │ └── red_celebrate_page_widget.dart
│ ├── create_join_screen
│ ├── create_join_screen_model.dart
│ └── create_join_screen_widget.dart
│ ├── game_pages
│ ├── field_operatives_view
│ │ ├── field_operatives_view_model.dart
│ │ └── field_operatives_view_widget.dart
│ └── spy_view
│ │ ├── spy_view_model.dart
│ │ └── spy_view_widget.dart
│ ├── joining_pages
│ ├── host_page
│ │ ├── host_page_model.dart
│ │ └── host_page_widget.dart
│ └── player_page
│ │ ├── player_page_model.dart
│ │ └── player_page_widget.dart
│ └── start_screen
│ ├── start_screen_model.dart
│ └── start_screen_widget.dart
├── pubspec.lock
├── pubspec.yaml
├── screenshots
├── codewords_ai_mode.png
├── codewords_screens.png
├── codewords_screens_2_rows.png
└── codewords_screens_new.png
├── test
└── widget_test.dart
└── web
├── codewords_game_cover.png
├── favicon.png
├── favicon_codewords.png
├── icons
├── Icon-192.png
├── Icon-512.png
└── app_launcher_icon.png
├── index.html
└── manifest.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Firebase – this is necessary if you use Firebase since it could otherwise
35 | # lead to leaking of private certificates to your repository, which is no bueno.
36 | .firebase/
37 |
38 | # Web related
39 | lib/generated_plugin_registrant.dart
40 |
41 | # Symbolication related
42 | app.*.symbols
43 |
44 | # Obfuscation related
45 | app.*.map.json
46 |
47 | # Android Studio will place build artifacts here
48 | /android/app/debug
49 | /android/app/profile
50 | /android/app/release
51 | .vscode/settings.json
52 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 4d7946a68d26794349189cf21b3f68cc6fe61dcb
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Souvik Biswas
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.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Codewords
2 |
3 | The famous [Codenames](https://en.wikipedia.org/wiki/Codenames_(board_game)) game created using [FlutterFlow](https://flutterflow.io/). The app is responsive and adapts to both mobile and desktop screen sizes.
4 |
5 | **Start playing [HERE](https://codewords.flutterflow.app)!**
6 |
7 | > It's recommended to have at least 6 players (Players: 4-8+).
8 |
9 | 
10 |
11 | ## New: AI Mode
12 |
13 | You can now use **AI-based Spymasters** while playing Codewords. That means Codewords is now fun even with less people, as low as just 2 players (one Operative in each team).
14 |
15 | > AI Spymasters are powered by [GPT 4](https://openai.com/product/gpt-4).
16 |
17 | 
18 |
19 | ## License
20 |
21 | Copyright (c) 2023 Souvik Biswas
22 |
23 | Permission is hereby granted, free of charge, to any person obtaining a copy
24 | of this software and associated documentation files (the "Software"), to deal
25 | in the Software without restriction, including without limitation the rights
26 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27 | copies of the Software, and to permit persons to whom the Software is
28 | furnished to do so, subject to the following conditions:
29 |
30 | The above copyright notice and this permission notice shall be included in all
31 | copies or substantial portions of the Software.
32 |
33 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39 | SOFTWARE.
40 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 | apply plugin: 'com.google.gms.google-services' // Google Services plugin
28 |
29 |
30 | def keystoreProperties = new Properties()
31 | def keystorePropertiesFile = rootProject.file('key.properties')
32 | if (keystorePropertiesFile.exists()) {
33 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
34 | }
35 |
36 | android {
37 | compileSdkVersion 33
38 |
39 |
40 | sourceSets {
41 | main.java.srcDirs += 'src/main/kotlin'
42 | }
43 |
44 | lintOptions {
45 | disable 'InvalidPackage'
46 | checkReleaseBuilds false
47 | }
48 |
49 | defaultConfig {
50 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
51 | applicationId "io.flutterflow.codewords"
52 | minSdkVersion 21
53 | targetSdkVersion 33
54 | versionCode flutterVersionCode.toInteger()
55 | versionName flutterVersionName
56 | }
57 |
58 | signingConfigs {
59 | release {
60 | keyAlias keystoreProperties['keyAlias']
61 | keyPassword keystoreProperties['keyPassword']
62 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
63 | storePassword keystoreProperties['storePassword']
64 | }
65 | }
66 |
67 | buildTypes {
68 | release {
69 | // TODO: Add your own signing config for the release build.
70 | // Signing with the debug keys for now, so `flutter run --release` works.
71 | signingConfig signingConfigs.debug
72 | }
73 | }
74 | }
75 |
76 | flutter {
77 | source '../..'
78 | }
79 |
80 | dependencies {
81 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
82 | }
83 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "82596644495",
4 | "project_id": "codewords-82f6e",
5 | "storage_bucket": "codewords-82f6e.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:82596644495:android:f8a5277f363b99d26f92fa",
11 | "android_client_info": {
12 | "package_name": "io.flutterflow.codewords"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "82596644495-ff8flnqmaofrkdkloeore6mktccf5ega.apps.googleusercontent.com",
18 | "client_type": 1,
19 | "android_info": {
20 | "package_name": "io.flutterflow.codewords",
21 | "certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4"
22 | }
23 | },
24 | {
25 | "client_id": "82596644495-ldllvd1bg9dsnlpggkq6i7aqmi08pmhe.apps.googleusercontent.com",
26 | "client_type": 3
27 | }
28 | ],
29 | "api_key": [
30 | {
31 | "current_key": "AIzaSyAUDQFSetq1-vGQUEXmKcsl6LZGdMQrDpw"
32 | }
33 | ],
34 | "services": {
35 | "appinvite_service": {
36 | "other_platform_oauth_client": [
37 | {
38 | "client_id": "82596644495-ldllvd1bg9dsnlpggkq6i7aqmi08pmhe.apps.googleusercontent.com",
39 | "client_type": 3
40 | },
41 | {
42 | "client_id": "82596644495-811s84aecqhpvrc12livlarnr5u43ce3.apps.googleusercontent.com",
43 | "client_type": 2,
44 | "ios_info": {
45 | "bundle_id": "io.flutterflow.codewords"
46 | }
47 | }
48 | ]
49 | }
50 | }
51 | }
52 | ],
53 | "configuration_version": "1"
54 | }
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
12 |
13 |
21 |
25 |
29 |
34 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
55 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:
--------------------------------------------------------------------------------
1 | package io.flutter.plugins;
2 |
3 | import androidx.annotation.Keep;
4 | import androidx.annotation.NonNull;
5 | import io.flutter.Log;
6 |
7 | import io.flutter.embedding.engine.FlutterEngine;
8 |
9 | /**
10 | * Generated file. Do not edit.
11 | * This file is generated by the Flutter tool based on the
12 | * plugins that support the Android platform.
13 | */
14 | @Keep
15 | public final class GeneratedPluginRegistrant {
16 | private static final String TAG = "GeneratedPluginRegistrant";
17 | public static void registerWith(@NonNull FlutterEngine flutterEngine) {
18 | try {
19 | flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin());
20 | } catch(Exception e) {
21 | Log.e(TAG, "Error registering plugin cloud_firestore, io.flutter.plugins.firebase.firestore.FlutterFirebaseFirestorePlugin", e);
22 | }
23 | try {
24 | flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.functions.FlutterFirebaseFunctionsPlugin());
25 | } catch(Exception e) {
26 | Log.e(TAG, "Error registering plugin cloud_functions, io.flutter.plugins.firebase.functions.FlutterFirebaseFunctionsPlugin", e);
27 | }
28 | try {
29 | flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.analytics.FlutterFirebaseAnalyticsPlugin());
30 | } catch(Exception e) {
31 | Log.e(TAG, "Error registering plugin firebase_analytics, io.flutter.plugins.firebase.analytics.FlutterFirebaseAnalyticsPlugin", e);
32 | }
33 | try {
34 | flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.auth.FlutterFirebaseAuthPlugin());
35 | } catch(Exception e) {
36 | Log.e(TAG, "Error registering plugin firebase_auth, io.flutter.plugins.firebase.auth.FlutterFirebaseAuthPlugin", e);
37 | }
38 | try {
39 | flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin());
40 | } catch(Exception e) {
41 | Log.e(TAG, "Error registering plugin firebase_core, io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin", e);
42 | }
43 | try {
44 | flutterEngine.getPlugins().add(new io.flutter.plugins.googlesignin.GoogleSignInPlugin());
45 | } catch(Exception e) {
46 | Log.e(TAG, "Error registering plugin google_sign_in_android, io.flutter.plugins.googlesignin.GoogleSignInPlugin", e);
47 | }
48 | try {
49 | flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin());
50 | } catch(Exception e) {
51 | Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e);
52 | }
53 | try {
54 | flutterEngine.getPlugins().add(new io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin());
55 | } catch(Exception e) {
56 | Log.e(TAG, "Error registering plugin shared_preferences_android, io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin", e);
57 | }
58 | try {
59 | flutterEngine.getPlugins().add(new com.aboutyou.dart_packages.sign_in_with_apple.SignInWithApplePlugin());
60 | } catch(Exception e) {
61 | Log.e(TAG, "Error registering plugin sign_in_with_apple, com.aboutyou.dart_packages.sign_in_with_apple.SignInWithApplePlugin", e);
62 | }
63 | try {
64 | flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin());
65 | } catch(Exception e) {
66 | Log.e(TAG, "Error registering plugin sqflite, com.tekartik.sqflite.SqflitePlugin", e);
67 | }
68 | try {
69 | flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin());
70 | } catch(Exception e) {
71 | Log.e(TAG, "Error registering plugin url_launcher_android, io.flutter.plugins.urllauncher.UrlLauncherPlugin", e);
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/my_project/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package io.flutterflow.codewords
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Codewords
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.8' // Google Services plugin
12 |
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | google()
19 | mavenCentral()
20 | }
21 | }
22 |
23 | rootProject.buildDir = '../build'
24 | subprojects {
25 | project.buildDir = "${rootProject.buildDir}/${project.name}"
26 | }
27 | subprojects {
28 | project.evaluationDependsOn(':app')
29 | }
30 |
31 | task clean(type: Delete) {
32 | delete rootProject.buildDir
33 | }
34 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4608m
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
7 |
--------------------------------------------------------------------------------
/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 |
13 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
14 |
15 | def plugins = new Properties()
16 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
17 | if (pluginsFile.exists()) {
18 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
19 | }
20 |
21 | plugins.each { name, path ->
22 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
23 | include ":$name"
24 | project(":$name").projectDir = pluginDirectory
25 | }
--------------------------------------------------------------------------------
/assets/audios/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/audios/favicon.png
--------------------------------------------------------------------------------
/assets/fonts/Poppins-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/fonts/Poppins-Regular.ttf
--------------------------------------------------------------------------------
/assets/fonts/Poppins-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/fonts/Poppins-SemiBold.ttf
--------------------------------------------------------------------------------
/assets/fonts/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/fonts/favicon.png
--------------------------------------------------------------------------------
/assets/images/ai_spy_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/images/ai_spy_logo.png
--------------------------------------------------------------------------------
/assets/images/app_launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/images/app_launcher_icon.png
--------------------------------------------------------------------------------
/assets/images/codewords_game_cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/images/codewords_game_cover.png
--------------------------------------------------------------------------------
/assets/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/images/favicon.png
--------------------------------------------------------------------------------
/assets/images/spy_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/images/spy_logo.png
--------------------------------------------------------------------------------
/assets/lottie_animations/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/lottie_animations/favicon.png
--------------------------------------------------------------------------------
/assets/pdfs/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/pdfs/favicon.png
--------------------------------------------------------------------------------
/assets/rive_animations/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/rive_animations/favicon.png
--------------------------------------------------------------------------------
/assets/videos/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/assets/videos/favicon.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | build/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/app.flx
23 | Flutter/app.zip
24 | Flutter/flutter_assets/
25 | Flutter/flutter_export_environment.sh
26 | ServiceDefinitions.json
27 | Runner/GeneratedPluginRegistrant.*
28 |
29 | # Exceptions to above rules.
30 | !default.mode1v3
31 | !default.mode2v3
32 | !default.pbxuser
33 | !default.perspectivev3
34 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | 13.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/ImageNotification/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | ImageNotification
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | NSExtension
24 |
25 | NSExtensionPointIdentifier
26 | com.apple.usernotifications.service
27 | NSExtensionPrincipalClass
28 | $(PRODUCT_MODULE_NAME).NotificationService
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/ios/ImageNotification/NotificationService.swift:
--------------------------------------------------------------------------------
1 | import FirebaseMessaging
2 | import UserNotifications
3 |
4 | class NotificationService: UNNotificationServiceExtension {
5 |
6 | var contentHandler: ((UNNotificationContent) -> Void)?
7 | var bestAttemptContent: UNMutableNotificationContent?
8 |
9 | override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
10 | self.contentHandler = contentHandler
11 | bestAttemptContent = request.content
12 | .mutableCopy() as? UNMutableNotificationContent
13 | guard let bestAttemptContent = bestAttemptContent else { return }
14 | FIRMessagingExtensionHelper().populateNotificationContent(
15 | bestAttemptContent,
16 | withContentHandler: contentHandler)
17 | }
18 |
19 | override func serviceExtensionTimeWillExpire() {
20 | // Called just before the extension will be terminated by the system.
21 | // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
22 | if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
23 | contentHandler(bestAttemptContent)
24 | }
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | $FirebaseAnalyticsWithoutAdIdSupport = true
2 | # Uncomment this line to define a global platform for your project
3 | platform :ios, '13.0'
4 |
5 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
6 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
7 |
8 | project 'Runner', {
9 | 'Debug' => :debug,
10 | 'Profile' => :release,
11 | 'Release' => :release,
12 | }
13 |
14 | def flutter_root
15 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
16 | unless File.exist?(generated_xcode_build_settings_path)
17 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
18 | end
19 |
20 | File.foreach(generated_xcode_build_settings_path) do |line|
21 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
22 | return matches[1].strip if matches
23 | end
24 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
25 | end
26 |
27 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
28 |
29 | flutter_ios_podfile_setup
30 |
31 | target 'Runner' do
32 | use_frameworks!
33 | use_modular_headers!
34 |
35 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
36 | end
37 |
38 | post_install do |installer|
39 | installer.pods_project.targets.each do |target|
40 | flutter_additional_ios_build_settings(target)
41 | target.build_configurations.each do |config|
42 | config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
43 |
44 | end
45 | end
46 | end
47 |
--------------------------------------------------------------------------------
/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 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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 |
3 | import Flutter
4 |
5 | @UIApplicationMain
6 | @objc class AppDelegate: FlutterAppDelegate {
7 | override func application(
8 | _ application: UIApplication,
9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
10 | ) -> Bool {
11 | GeneratedPluginRegistrant.register(with: self)
12 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sbis04/codewords_FF/d54b817018bca86437b2c1dfc409dac21d9363d6/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/GeneratedPluginRegistrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GeneratedPluginRegistrant_h
8 | #define GeneratedPluginRegistrant_h
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface GeneratedPluginRegistrant : NSObject
15 | + (void)registerWithRegistry:(NSObject*)registry;
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 | #endif /* GeneratedPluginRegistrant_h */
20 |
--------------------------------------------------------------------------------
/ios/Runner/GeneratedPluginRegistrant.m:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #import "GeneratedPluginRegistrant.h"
8 |
9 | #if __has_include()
10 | #import
11 | #else
12 | @import cloud_firestore;
13 | #endif
14 |
15 | #if __has_include()
16 | #import
17 | #else
18 | @import cloud_functions;
19 | #endif
20 |
21 | #if __has_include()
22 | #import
23 | #else
24 | @import firebase_analytics;
25 | #endif
26 |
27 | #if __has_include()
28 | #import
29 | #else
30 | @import firebase_auth;
31 | #endif
32 |
33 | #if __has_include()
34 | #import
35 | #else
36 | @import firebase_core;
37 | #endif
38 |
39 | #if __has_include()
40 | #import
41 | #else
42 | @import google_sign_in_ios;
43 | #endif
44 |
45 | #if __has_include()
46 | #import
47 | #else
48 | @import path_provider_foundation;
49 | #endif
50 |
51 | #if __has_include()
52 | #import
53 | #else
54 | @import shared_preferences_ios;
55 | #endif
56 |
57 | #if __has_include()
58 | #import
59 | #else
60 | @import sign_in_with_apple;
61 | #endif
62 |
63 | #if __has_include()
64 | #import
65 | #else
66 | @import sqflite;
67 | #endif
68 |
69 | #if __has_include()
70 | #import
71 | #else
72 | @import url_launcher_ios;
73 | #endif
74 |
75 | @implementation GeneratedPluginRegistrant
76 |
77 | + (void)registerWithRegistry:(NSObject*)registry {
78 | [FLTFirebaseFirestorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseFirestorePlugin"]];
79 | [FLTFirebaseFunctionsPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseFunctionsPlugin"]];
80 | [FLTFirebaseAnalyticsPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAnalyticsPlugin"]];
81 | [FLTFirebaseAuthPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAuthPlugin"]];
82 | [FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]];
83 | [FLTGoogleSignInPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTGoogleSignInPlugin"]];
84 | [PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]];
85 | [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];
86 | [SignInWithApplePlugin registerWithRegistrar:[registry registrarForPlugin:@"SignInWithApplePlugin"]];
87 | [SqflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"SqflitePlugin"]];
88 | [FLTURLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTURLLauncherPlugin"]];
89 | }
90 |
91 | @end
92 |
--------------------------------------------------------------------------------
/ios/Runner/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 82596644495-811s84aecqhpvrc12livlarnr5u43ce3.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.82596644495-811s84aecqhpvrc12livlarnr5u43ce3
9 | ANDROID_CLIENT_ID
10 | 82596644495-ff8flnqmaofrkdkloeore6mktccf5ega.apps.googleusercontent.com
11 | API_KEY
12 | AIzaSyBCavNfJRoE1i0UxqNsD2OFy7pqg729tfE
13 | GCM_SENDER_ID
14 | 82596644495
15 | PLIST_VERSION
16 | 1
17 | BUNDLE_ID
18 | io.flutterflow.codewords
19 | PROJECT_ID
20 | codewords-82f6e
21 | STORAGE_BUCKET
22 | codewords-82f6e.appspot.com
23 | IS_ADS_ENABLED
24 |
25 | IS_ANALYTICS_ENABLED
26 |
27 | IS_APPINVITE_ENABLED
28 |
29 | IS_GCM_ENABLED
30 |
31 | IS_SIGNIN_ENABLED
32 |
33 | GOOGLE_APP_ID
34 | 1:82596644495:ios:7ea8fe80727224a16f92fa
35 |
36 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Codewords
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | Codewords
17 | CFBundlePackageType
18 | APPL
19 |
20 | CFBundleShortVersionString
21 | $(FLUTTER_BUILD_NAME)
22 | CFBundleSignature
23 | ????
24 | CFBundleURLTypes
25 |
26 |
27 | CFBundleTypeRole
28 | Editor
29 | CFBundleURLSchemes
30 |
31 | com.googleusercontent.apps.82596644495-811s84aecqhpvrc12livlarnr5u43ce3
32 |
33 |
34 |
35 |
36 |
37 | CFBundleTypeRole
38 | Editor
39 | CFBundleURLName
40 | codewords.com
41 | CFBundleURLSchemes
42 |
43 | codewords
44 |
45 |
46 |
47 | FlutterDeepLinkingEnabled
48 |
49 |
50 |
51 | CFBundleVersion
52 | $(FLUTTER_BUILD_NUMBER)
53 | LSRequiresIPhoneOS
54 |
55 |
56 |
57 |
58 |
59 |
60 | UILaunchStoryboardName
61 | LaunchScreen
62 | UIMainStoryboardFile
63 | Main
64 | UISupportedInterfaceOrientations
65 |
66 | UIInterfaceOrientationPortrait
67 | UIInterfaceOrientationLandscapeLeft
68 | UIInterfaceOrientationLandscapeRight
69 |
70 | UISupportedInterfaceOrientations~ipad
71 |
72 | UIInterfaceOrientationPortrait
73 | UIInterfaceOrientationPortraitUpsideDown
74 | UIInterfaceOrientationLandscapeLeft
75 | UIInterfaceOrientationLandscapeRight
76 |
77 | UIViewControllerBasedStatusBarAppearance
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/lib/app_state.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '/backend/backend.dart';
3 | import '/backend/schema/structs/index.dart';
4 | import 'backend/api_requests/api_manager.dart';
5 | import 'package:shared_preferences/shared_preferences.dart';
6 | import 'flutter_flow/flutter_flow_util.dart';
7 |
8 | class FFAppState extends ChangeNotifier {
9 | static final FFAppState _instance = FFAppState._internal();
10 |
11 | factory FFAppState() {
12 | return _instance;
13 | }
14 |
15 | FFAppState._internal();
16 |
17 | Future initializePersistedState() async {}
18 |
19 | void update(VoidCallback callback) {
20 | callback();
21 | notifyListeners();
22 | }
23 |
24 | List _words = [];
25 | List get words => _words;
26 | set words(List _value) {
27 | _words = _value;
28 | }
29 |
30 | void addToWords(String _value) {
31 | _words.add(_value);
32 | }
33 |
34 | void removeFromWords(String _value) {
35 | _words.remove(_value);
36 | }
37 |
38 | void removeAtIndexFromWords(int _index) {
39 | _words.removeAt(_index);
40 | }
41 |
42 | void updateWordsAtIndex(
43 | int _index,
44 | Function(String) updateFn,
45 | ) {
46 | updateFn(_words[_index]);
47 | }
48 |
49 | bool _isVerifyPressed = false;
50 | bool get isVerifyPressed => _isVerifyPressed;
51 | set isVerifyPressed(bool _value) {
52 | _isVerifyPressed = _value;
53 | }
54 |
55 | bool _isJoinning = false;
56 | bool get isJoinning => _isJoinning;
57 | set isJoinning(bool _value) {
58 | _isJoinning = _value;
59 | }
60 |
61 | String _apiKey = 'YOUR_OPENAI_KEY_HERE';
62 | String get apiKey => _apiKey;
63 | set apiKey(String _value) {
64 | _apiKey = _value;
65 | }
66 |
67 | String _modelName = 'gpt-4';
68 | String get modelName => _modelName;
69 | set modelName(String _value) {
70 | _modelName = _value;
71 | }
72 | }
73 |
74 | LatLng? _latLngFromString(String? val) {
75 | if (val == null) {
76 | return null;
77 | }
78 | final split = val.split(',');
79 | final lat = double.parse(split.first);
80 | final lng = double.parse(split.last);
81 | return LatLng(lat, lng);
82 | }
83 |
84 | void _safeInit(Function() initializeField) {
85 | try {
86 | initializeField();
87 | } catch (_) {}
88 | }
89 |
90 | Future _safeInitAsync(Function() initializeField) async {
91 | try {
92 | await initializeField();
93 | } catch (_) {}
94 | }
95 |
--------------------------------------------------------------------------------
/lib/auth/auth_manager.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'base_auth_user_provider.dart';
4 |
5 | abstract class AuthManager {
6 | Future signOut();
7 | Future deleteUser(BuildContext context);
8 | Future resetPassword({required String email, required BuildContext context});
9 | Future sendEmailVerification() async => currentUser?.sendEmailVerification();
10 | }
11 |
12 | mixin EmailSignInManager on AuthManager {
13 | Future signInWithEmail(
14 | BuildContext context,
15 | String email,
16 | String password,
17 | );
18 |
19 | Future createAccountWithEmail(
20 | BuildContext context,
21 | String email,
22 | String password,
23 | );
24 | }
25 |
26 | mixin AnonymousSignInManager on AuthManager {
27 | Future signInAnonymously(BuildContext context);
28 | }
29 |
30 | mixin AppleSignInManager on AuthManager {
31 | Future signInWithApple(BuildContext context);
32 | }
33 |
34 | mixin GoogleSignInManager on AuthManager {
35 | Future signInWithGoogle(BuildContext context);
36 | }
37 |
38 | mixin JwtSignInManager on AuthManager {
39 | Future signInWithJwtToken(
40 | BuildContext context,
41 | String jwtToken,
42 | );
43 | }
44 |
45 | mixin PhoneSignInManager on AuthManager {
46 | Future beginPhoneAuth({
47 | required BuildContext context,
48 | required String phoneNumber,
49 | required void Function(BuildContext) onCodeSent,
50 | });
51 |
52 | Future verifySmsCode({
53 | required BuildContext context,
54 | required String smsCode,
55 | });
56 | }
57 |
58 | mixin FacebookSignInManager on AuthManager {
59 | Future signInWithFacebook(BuildContext context);
60 | }
61 |
62 | mixin MicrosoftSignInManager on AuthManager {
63 | Future signInWithMicrosoft(
64 | BuildContext context,
65 | List scopes,
66 | String tenantId,
67 | );
68 | }
69 |
--------------------------------------------------------------------------------
/lib/auth/base_auth_user_provider.dart:
--------------------------------------------------------------------------------
1 | class AuthUserInfo {
2 | const AuthUserInfo({
3 | this.uid,
4 | this.email,
5 | this.displayName,
6 | this.photoUrl,
7 | this.phoneNumber,
8 | });
9 |
10 | final String? uid;
11 | final String? email;
12 | final String? displayName;
13 | final String? photoUrl;
14 | final String? phoneNumber;
15 | }
16 |
17 | abstract class BaseAuthUser {
18 | bool get loggedIn;
19 | bool get emailVerified;
20 |
21 | AuthUserInfo get authUserInfo;
22 |
23 | Future? delete();
24 | Future? sendEmailVerification();
25 |
26 | String? get uid => authUserInfo.uid;
27 | String? get email => authUserInfo.email;
28 | String? get displayName => authUserInfo.displayName;
29 | String? get photoUrl => authUserInfo.photoUrl;
30 | String? get phoneNumber => authUserInfo.phoneNumber;
31 | }
32 |
33 | BaseAuthUser? currentUser;
34 | bool get loggedIn => currentUser?.loggedIn ?? false;
35 |
--------------------------------------------------------------------------------
/lib/auth/firebase_auth/anonymous_auth.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 |
3 | Future anonymousSignInFunc() =>
4 | FirebaseAuth.instance.signInAnonymously();
5 |
--------------------------------------------------------------------------------
/lib/auth/firebase_auth/apple_auth.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:math';
3 |
4 | import 'package:crypto/crypto.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:flutter/foundation.dart';
7 | import 'package:sign_in_with_apple/sign_in_with_apple.dart';
8 |
9 | /// Generates a cryptographically secure random nonce, to be included in a
10 | /// credential request.
11 | String generateNonce([int length = 32]) {
12 | final charset =
13 | '0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._';
14 | final random = Random.secure();
15 | return List.generate(length, (_) => charset[random.nextInt(charset.length)])
16 | .join();
17 | }
18 |
19 | /// Returns the sha256 hash of [input] in hex notation.
20 | String sha256ofString(String input) {
21 | final bytes = utf8.encode(input);
22 | final digest = sha256.convert(bytes);
23 | return digest.toString();
24 | }
25 |
26 | Future appleSignIn() async {
27 | if (kIsWeb) {
28 | final provider = OAuthProvider("apple.com")
29 | ..addScope('email')
30 | ..addScope('name');
31 |
32 | // Sign in the user with Firebase.
33 | return await FirebaseAuth.instance.signInWithPopup(provider);
34 | }
35 | // To prevent replay attacks with the credential returned from Apple, we
36 | // include a nonce in the credential request. When signing in in with
37 | // Firebase, the nonce in the id token returned by Apple, is expected to
38 | // match the sha256 hash of `rawNonce`.
39 | final rawNonce = generateNonce();
40 | final nonce = sha256ofString(rawNonce);
41 |
42 | // Request credential for the currently signed in Apple account.
43 | final appleCredential = await SignInWithApple.getAppleIDCredential(
44 | scopes: [
45 | AppleIDAuthorizationScopes.email,
46 | AppleIDAuthorizationScopes.fullName,
47 | ],
48 | nonce: nonce,
49 | );
50 |
51 | // Create an `OAuthCredential` from the credential returned by Apple.
52 | final oauthCredential = OAuthProvider("apple.com").credential(
53 | idToken: appleCredential.identityToken,
54 | rawNonce: rawNonce,
55 | );
56 |
57 | // Sign in the user with Firebase. If the nonce we generated earlier does
58 | // not match the nonce in `appleCredential.identityToken`, sign in will fail.
59 | return await FirebaseAuth.instance.signInWithCredential(oauthCredential);
60 | }
61 |
--------------------------------------------------------------------------------
/lib/auth/firebase_auth/auth_util.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/foundation.dart' show kIsWeb;
4 | import 'package:firebase_auth/firebase_auth.dart';
5 | import 'package:flutter/material.dart';
6 | import '../auth_manager.dart';
7 | import '../base_auth_user_provider.dart';
8 | import '../../flutter_flow/flutter_flow_util.dart';
9 |
10 | import '/backend/backend.dart';
11 | import 'package:cloud_firestore/cloud_firestore.dart';
12 | import 'package:stream_transform/stream_transform.dart';
13 | import 'firebase_auth_manager.dart';
14 |
15 | export 'firebase_auth_manager.dart';
16 |
17 | final _authManager = FirebaseAuthManager();
18 | FirebaseAuthManager get authManager => _authManager;
19 |
20 | String get currentUserEmail =>
21 | currentUserDocument?.email ?? currentUser?.email ?? '';
22 |
23 | String get currentUserUid => currentUser?.uid ?? '';
24 |
25 | String get currentUserDisplayName =>
26 | currentUserDocument?.displayName ?? currentUser?.displayName ?? '';
27 |
28 | String get currentUserPhoto =>
29 | currentUserDocument?.photoUrl ?? currentUser?.photoUrl ?? '';
30 |
31 | String get currentPhoneNumber =>
32 | currentUserDocument?.phoneNumber ?? currentUser?.phoneNumber ?? '';
33 |
34 | String get currentJwtToken => _currentJwtToken ?? '';
35 |
36 | bool get currentUserEmailVerified => currentUser?.emailVerified ?? false;
37 |
38 | /// Create a Stream that listens to the current user's JWT Token, since Firebase
39 | /// generates a new token every hour.
40 | String? _currentJwtToken;
41 | final jwtTokenStream = FirebaseAuth.instance
42 | .idTokenChanges()
43 | .map((user) async => _currentJwtToken = await user?.getIdToken())
44 | .asBroadcastStream();
45 |
46 | DocumentReference? get currentUserReference =>
47 | loggedIn ? UsersRecord.collection.doc(currentUser!.uid) : null;
48 |
49 | UsersRecord? currentUserDocument;
50 | final authenticatedUserStream = FirebaseAuth.instance
51 | .authStateChanges()
52 | .map((user) => user?.uid ?? '')
53 | .switchMap(
54 | (uid) => uid.isEmpty
55 | ? Stream.value(null)
56 | : UsersRecord.getDocument(UsersRecord.collection.doc(uid))
57 | .handleError((_) {}),
58 | )
59 | .map((user) => currentUserDocument = user)
60 | .asBroadcastStream();
61 |
62 | class AuthUserStreamWidget extends StatelessWidget {
63 | const AuthUserStreamWidget({Key? key, required this.builder})
64 | : super(key: key);
65 |
66 | final WidgetBuilder builder;
67 |
68 | @override
69 | Widget build(BuildContext context) => StreamBuilder(
70 | stream: authenticatedUserStream,
71 | builder: (context, _) => builder(context),
72 | );
73 | }
74 |
--------------------------------------------------------------------------------
/lib/auth/firebase_auth/email_auth.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 |
3 | Future emailSignInFunc(
4 | String email,
5 | String password,
6 | ) =>
7 | FirebaseAuth.instance
8 | .signInWithEmailAndPassword(email: email.trim(), password: password);
9 |
10 | Future emailCreateAccountFunc(
11 | String email,
12 | String password,
13 | ) =>
14 | FirebaseAuth.instance.createUserWithEmailAndPassword(
15 | email: email.trim(),
16 | password: password,
17 | );
18 |
--------------------------------------------------------------------------------
/lib/auth/firebase_auth/firebase_user_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:rxdart/rxdart.dart';
3 |
4 | import '../base_auth_user_provider.dart';
5 |
6 | export '../base_auth_user_provider.dart';
7 |
8 | class CodewordsFirebaseUser extends BaseAuthUser {
9 | CodewordsFirebaseUser(this.user);
10 | User? user;
11 | bool get loggedIn => user != null;
12 |
13 | @override
14 | AuthUserInfo get authUserInfo => AuthUserInfo(
15 | uid: user?.uid,
16 | email: user?.email,
17 | displayName: user?.displayName,
18 | photoUrl: user?.photoURL,
19 | phoneNumber: user?.phoneNumber,
20 | );
21 |
22 | @override
23 | Future? delete() => user?.delete();
24 |
25 | @override
26 | Future? sendEmailVerification() => user?.sendEmailVerification();
27 |
28 | @override
29 | bool get emailVerified {
30 | // Reloads the user when checking in order to get the most up to date
31 | // email verified status.
32 | if (loggedIn && !user!.emailVerified) {
33 | FirebaseAuth.instance.currentUser
34 | ?.reload()
35 | .then((_) => user = FirebaseAuth.instance.currentUser);
36 | }
37 | return user?.emailVerified ?? false;
38 | }
39 |
40 | static BaseAuthUser fromUserCredential(UserCredential userCredential) =>
41 | fromFirebaseUser(userCredential.user);
42 | static BaseAuthUser fromFirebaseUser(User? user) =>
43 | CodewordsFirebaseUser(user);
44 | }
45 |
46 | Stream codewordsFirebaseUserStream() => FirebaseAuth.instance
47 | .authStateChanges()
48 | .debounce((user) => user == null && !loggedIn
49 | ? TimerStream(true, const Duration(seconds: 1))
50 | : Stream.value(user))
51 | .map(
52 | (user) {
53 | currentUser = CodewordsFirebaseUser(user);
54 | return currentUser!;
55 | },
56 | );
57 |
--------------------------------------------------------------------------------
/lib/auth/firebase_auth/google_auth.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/foundation.dart';
3 | import 'package:google_sign_in/google_sign_in.dart';
4 |
5 | final _googleSignIn = GoogleSignIn();
6 |
7 | Future googleSignInFunc() async {
8 | if (kIsWeb) {
9 | // Once signed in, return the UserCredential
10 | return await FirebaseAuth.instance.signInWithPopup(GoogleAuthProvider());
11 | }
12 |
13 | await signOutWithGoogle().catchError((_) => null);
14 | final auth = await (await _googleSignIn.signIn())?.authentication;
15 | if (auth == null) {
16 | return null;
17 | }
18 | final credential = GoogleAuthProvider.credential(
19 | idToken: auth.idToken, accessToken: auth.accessToken);
20 | return FirebaseAuth.instance.signInWithCredential(credential);
21 | }
22 |
23 | Future signOutWithGoogle() => _googleSignIn.signOut();
24 |
--------------------------------------------------------------------------------
/lib/auth/firebase_auth/jwt_token_auth.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 |
3 | Future jwtTokenSignIn(String jwtToken) =>
4 | FirebaseAuth.instance.signInWithCustomToken(jwtToken);
5 |
--------------------------------------------------------------------------------
/lib/backend/api_requests/api_calls.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:typed_data';
3 |
4 | import '../../flutter_flow/flutter_flow_util.dart';
5 | import '../cloud_functions/cloud_functions.dart';
6 |
7 | import 'api_manager.dart';
8 |
9 | export 'api_manager.dart' show ApiCallResponse;
10 |
11 | const _kPrivateApiFunctionName = 'ffPrivateApiCall';
12 |
13 | /// Start AI Spymaster Group Code
14 |
15 | class AISpymasterGroup {
16 | static GetClueCall getClueCall = GetClueCall();
17 | }
18 |
19 | class GetClueCall {
20 | Future call({
21 | String? apiKey = '',
22 | String? systemPrompt = '',
23 | String? userPrompt = '',
24 | String? modelName = '',
25 | }) async {
26 | final response = await makeCloudCall(
27 | _kPrivateApiFunctionName,
28 | {
29 | 'callName': 'GetClueCall',
30 | 'variables': {
31 | 'apiKey': apiKey,
32 | 'systemPrompt': systemPrompt,
33 | 'userPrompt': userPrompt,
34 | 'modelName': modelName,
35 | },
36 | },
37 | );
38 | return ApiCallResponse.fromCloudCallResponse(response);
39 | }
40 |
41 | dynamic rawClue(dynamic response) => getJsonField(
42 | response,
43 | r'''$.choices[0].message.content''',
44 | );
45 | }
46 |
47 | /// End AI Spymaster Group Code
48 |
49 | class ApiPagingParams {
50 | int nextPageNumber = 0;
51 | int numItems = 0;
52 | dynamic lastResponse;
53 |
54 | ApiPagingParams({
55 | required this.nextPageNumber,
56 | required this.numItems,
57 | required this.lastResponse,
58 | });
59 |
60 | @override
61 | String toString() =>
62 | 'PagingParams(nextPageNumber: $nextPageNumber, numItems: $numItems, lastResponse: $lastResponse,)';
63 | }
64 |
65 | String _serializeList(List? list) {
66 | list ??= [];
67 | try {
68 | return json.encode(list);
69 | } catch (_) {
70 | return '[]';
71 | }
72 | }
73 |
74 | String _serializeJson(dynamic jsonVar) {
75 | jsonVar ??= {};
76 | try {
77 | return json.encode(jsonVar);
78 | } catch (_) {
79 | return '{}';
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/lib/backend/cloud_functions/cloud_functions.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_functions/cloud_functions.dart';
2 |
3 | Future