diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4df9538 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release + +#amplify-do-not-edit-begin +amplify/\#current-cloud-backend +amplify/.config/local-* +amplify/logs +amplify/mock-data +amplify/backend/amplify-meta.json +amplify/backend/.temp +build/ +dist/ +node_modules/ +aws-exports.js +awsconfiguration.json +amplifyconfiguration.json +amplifyconfiguration.dart +amplify-build-config.json +amplify-gradle-config.json +amplifytools.xcconfig +.secret-* +**.sample +#amplify-do-not-edit-end + diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..ab46fe2 --- /dev/null +++ b/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c + channel: stable + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c + base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c + - platform: android + create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c + base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c + - platform: ios + create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c + base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/README.md b/README.md new file mode 100644 index 0000000..6e8eef0 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# moviechitchat + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/amplify/.config/project-config.json b/amplify/.config/project-config.json new file mode 100644 index 0000000..25930e1 --- /dev/null +++ b/amplify/.config/project-config.json @@ -0,0 +1,13 @@ +{ + "providers": [ + "awscloudformation" + ], + "projectName": "MovieChitChat", + "version": "3.1", + "frontend": "flutter", + "flutter": { + "config": { + "ResDir": "./lib/" + } + } +} \ No newline at end of file diff --git a/amplify/cli.json b/amplify/cli.json new file mode 100644 index 0000000..710324f --- /dev/null +++ b/amplify/cli.json @@ -0,0 +1,60 @@ +{ + "features": { + "graphqltransformer": { + "addmissingownerfields": true, + "improvepluralization": false, + "validatetypenamereservedwords": true, + "useexperimentalpipelinedtransformer": true, + "enableiterativegsiupdates": true, + "secondarykeyasgsi": true, + "skipoverridemutationinputtypes": true, + "transformerversion": 2, + "suppressschemamigrationprompt": true, + "securityenhancementnotification": false, + "showfieldauthnotification": false, + "usesubusernamefordefaultidentityclaim": true, + "usefieldnameforprimarykeyconnectionfield": false, + "enableautoindexquerynames": false, + "respectprimarykeyattributesonconnectionfield": false, + "shoulddeepmergedirectiveconfigdefaults": false, + "populateownerfieldforstaticgroupauth": false + }, + "frontend-ios": { + "enablexcodeintegration": true + }, + "auth": { + "enablecaseinsensitivity": true, + "useinclusiveterminology": true, + "breakcirculardependency": true, + "forcealiasattributes": false, + "useenabledmfas": true + }, + "codegen": { + "useappsyncmodelgenplugin": true, + "usedocsgeneratorplugin": true, + "usetypesgeneratorplugin": true, + "cleangeneratedmodelsdirectory": true, + "retaincasestyle": true, + "addtimestampfields": true, + "handlelistnullabilitytransparently": true, + "emitauthprovider": true, + "generateindexrules": true, + "enabledartnullsafety": true + }, + "appsync": { + "generategraphqlpermissions": true + }, + "latestregionsupport": { + "pinpoint": 1, + "translate": 1, + "transcribe": 1, + "rekognition": 1, + "textract": 1, + "comprehend": 1 + }, + "project": { + "overrides": true + } + }, + "debug": {} +} \ No newline at end of file diff --git a/amplify/team-provider-info.json b/amplify/team-provider-info.json new file mode 100644 index 0000000..abe3601 --- /dev/null +++ b/amplify/team-provider-info.json @@ -0,0 +1,15 @@ +{ + "staging": { + "awscloudformation": { + "AuthRoleName": "amplify-moviechitchat-staging-143626-authRole", + "UnauthRoleArn": "arn:aws:iam::439309648562:role/amplify-moviechitchat-staging-143626-unauthRole", + "AuthRoleArn": "arn:aws:iam::439309648562:role/amplify-moviechitchat-staging-143626-authRole", + "Region": "ap-south-1", + "DeploymentBucketName": "amplify-moviechitchat-staging-143626-deployment", + "UnauthRoleName": "amplify-moviechitchat-staging-143626-unauthRole", + "StackName": "amplify-moviechitchat-staging-143626", + "StackId": "arn:aws:cloudformation:ap-south-1:439309648562:stack/amplify-moviechitchat-staging-143626/482c49f0-32a8-11ed-9637-06f672bdb2bc", + "AmplifyAppId": "d138uiicik64tl" + } + } +} \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..61b6c4d --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..e5bed91 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,71 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion localProperties.getProperty('flutter.compileSdkVersion').toInteger() + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.axat.moviechitchat" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger() + targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger() + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..9f651d1 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..42a3a41 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/axat/moviechitchat/MainActivity.kt b/android/app/src/main/kotlin/com/axat/moviechitchat/MainActivity.kt new file mode 100644 index 0000000..c1e9ecf --- /dev/null +++ b/android/app/src/main/kotlin/com/axat/moviechitchat/MainActivity.kt @@ -0,0 +1,6 @@ +package com.axat.moviechitchat + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/android/app/src/main/res/drawable-hdpi/android12splash.png b/android/app/src/main/res/drawable-hdpi/android12splash.png new file mode 100644 index 0000000..647569e Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/android12splash.png differ diff --git a/android/app/src/main/res/drawable-hdpi/splash.png b/android/app/src/main/res/drawable-hdpi/splash.png new file mode 100644 index 0000000..647569e Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-mdpi/android12splash.png b/android/app/src/main/res/drawable-mdpi/android12splash.png new file mode 100644 index 0000000..8c331f3 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/android12splash.png differ diff --git a/android/app/src/main/res/drawable-mdpi/splash.png b/android/app/src/main/res/drawable-mdpi/splash.png new file mode 100644 index 0000000..8c331f3 Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-v21/background.png b/android/app/src/main/res/drawable-v21/background.png new file mode 100644 index 0000000..a88be49 Binary files /dev/null and b/android/app/src/main/res/drawable-v21/background.png differ diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..3cc4948 --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/android/app/src/main/res/drawable-xhdpi/android12splash.png b/android/app/src/main/res/drawable-xhdpi/android12splash.png new file mode 100644 index 0000000..6599407 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/android12splash.png differ diff --git a/android/app/src/main/res/drawable-xhdpi/splash.png b/android/app/src/main/res/drawable-xhdpi/splash.png new file mode 100644 index 0000000..6599407 Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/android12splash.png b/android/app/src/main/res/drawable-xxhdpi/android12splash.png new file mode 100644 index 0000000..694fdca Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/android12splash.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/splash.png b/android/app/src/main/res/drawable-xxhdpi/splash.png new file mode 100644 index 0000000..694fdca Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/android12splash.png b/android/app/src/main/res/drawable-xxxhdpi/android12splash.png new file mode 100644 index 0000000..706200d Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/android12splash.png differ diff --git a/android/app/src/main/res/drawable-xxxhdpi/splash.png b/android/app/src/main/res/drawable-xxxhdpi/splash.png new file mode 100644 index 0000000..706200d Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/splash.png differ diff --git a/android/app/src/main/res/drawable/background.png b/android/app/src/main/res/drawable/background.png new file mode 100644 index 0000000..a88be49 Binary files /dev/null and b/android/app/src/main/res/drawable/background.png differ diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..3cc4948 --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..5b9373f Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..b747e9e Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..1e3b5b3 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..e3ce35e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..5391e8e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values-v31/styles.xml b/android/app/src/main/res/values-v31/styles.xml new file mode 100644 index 0000000..775e555 --- /dev/null +++ b/android/app/src/main/res/values-v31/styles.xml @@ -0,0 +1,20 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..50e66cc --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..9f651d1 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..83ae220 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.6.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.1.2' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..cb24abd --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/assets/icons/send_icon.png b/assets/icons/send_icon.png new file mode 100644 index 0000000..08681ef Binary files /dev/null and b/assets/icons/send_icon.png differ diff --git a/assets/images/appLogoMain.png b/assets/images/appLogoMain.png new file mode 100644 index 0000000..ca11b72 Binary files /dev/null and b/assets/images/appLogoMain.png differ diff --git a/assets/images/bottomLogin.png b/assets/images/bottomLogin.png new file mode 100644 index 0000000..fa79e37 Binary files /dev/null and b/assets/images/bottomLogin.png differ diff --git a/assets/images/bottomRegister.png b/assets/images/bottomRegister.png new file mode 100644 index 0000000..1921fbe Binary files /dev/null and b/assets/images/bottomRegister.png differ diff --git a/assets/images/hashnode.png b/assets/images/hashnode.png new file mode 100644 index 0000000..f073be6 Binary files /dev/null and b/assets/images/hashnode.png differ diff --git a/assets/images/splashLogo.png b/assets/images/splashLogo.png new file mode 100644 index 0000000..e6b72a2 Binary files /dev/null and b/assets/images/splashLogo.png differ diff --git a/assets/images/topLogin.png b/assets/images/topLogin.png new file mode 100644 index 0000000..2624819 Binary files /dev/null and b/assets/images/topLogin.png differ diff --git a/assets/images/topRegister.png b/assets/images/topRegister.png new file mode 100644 index 0000000..7d13572 Binary files /dev/null and b/assets/images/topRegister.png differ diff --git a/assets/images/welcomeBottom.png b/assets/images/welcomeBottom.png new file mode 100644 index 0000000..663b6b1 Binary files /dev/null and b/assets/images/welcomeBottom.png differ diff --git a/assets/images/welcomeImage.jpg b/assets/images/welcomeImage.jpg new file mode 100644 index 0000000..3c19f87 Binary files /dev/null and b/assets/images/welcomeImage.jpg differ diff --git a/assets/images/welcomeImage.png b/assets/images/welcomeImage.png new file mode 100644 index 0000000..6cf4991 Binary files /dev/null and b/assets/images/welcomeImage.png differ diff --git a/assets/images/welcomeTop.png b/assets/images/welcomeTop.png new file mode 100644 index 0000000..fece45e Binary files /dev/null and b/assets/images/welcomeTop.png differ diff --git a/flutter_native_splash.yaml b/flutter_native_splash.yaml new file mode 100644 index 0000000..1a11aa9 --- /dev/null +++ b/flutter_native_splash.yaml @@ -0,0 +1,101 @@ +flutter_native_splash: + + # This package generates native code to customize Flutter's default white native splash screen + # with background color and splash image. + # Customize the parameters below, and run the following command in the terminal: + # flutter pub run flutter_native_splash:create + # To restore Flutter's default white splash screen, run the following command in the terminal: + # flutter pub run flutter_native_splash:remove + + # color or background_image is the only required parameter. Use color to set the background + # of your splash screen to a solid color. Use background_image to set the background of your + # splash screen to a png image. This is useful for gradients. The image will be stretch to the + # size of the app. Only one parameter can be used, color and background_image cannot both be set. + color: "#1c2f47" + #background_image: "assets/splash/background.png" + + # Optional parameters are listed below. To enable a parameter, uncomment the line by removing + # the leading # character. + + # The image parameter allows you to specify an image used in the splash screen. It must be a + # png file and should be sized for 4x pixel density. + image: assets/images/splashLogo.png + + # The branding property allows you to specify an image used as branding in the splash screen. + # It must be a png file. Currently, it is only supported for Android < v12 and iOS. + #branding: assets/dart.png + + # To position the branding image at the bottom of the screen you can use bottom, bottomRight, + # and bottomLeft. The default values is bottom if not specified or specified something else. + #branding_mode: bottom + + # The color_dark, background_image_dark, image_dark, branding_dark are parameters that set the background + # and image when the device is in dark mode. If they are not specified, the app will use the + # parameters from above. If the image_dark parameter is specified, color_dark or + # background_image_dark must be specified. color_dark and background_image_dark cannot both be + # set. + #color_dark: "#042a49" + #background_image_dark: "assets/dark-background.png" + #image_dark: assets/splash-invert.png + #branding_dark: assets/dart_dark.png + + # Android 12 handles the splash screen differently than previous versions. Please visit + # https://developer.android.com/guide/topics/ui/splash-screen + # Following are Android 12 specific parameter. + android_12: + # The image parameter sets the splash screen icon image. If this parameter is not specified, + # the app's launcher icon will be used instead. + # Please note that the splash screen will be clipped to a circle on the center of the screen. + # App icon with an icon background: This should be 960×960 pixels, and fit within a circle + # 640 pixels in diameter. + # App icon without an icon background: This should be 1152×1152 pixels, and fit within a circle + # 768 pixels in diameter. + image: assets/images/splashLogo.png + + # App icon background color. + #icon_background_color: "#111111" + + # The image_dark parameter and icon_background_color_dark set the image and icon background + # color when the device is in dark mode. If they are not specified, the app will use the + # parameters from above. + #image_dark: assets/android12splash-invert.png + #icon_background_color_dark: "#eeeeee" + + # The android, ios and web parameters can be used to disable generating a splash screen on a given + # platform. + #android: false + #ios: false + web: false + + # The position of the splash image can be set with android_gravity, ios_content_mode, and + # web_image_mode parameters. All default to center. + # + # android_gravity can be one of the following Android Gravity (see + # https://developer.android.com/reference/android/view/Gravity): bottom, center, + # center_horizontal, center_vertical, clip_horizontal, clip_vertical, end, fill, fill_horizontal, + # fill_vertical, left, right, start, or top. + #android_gravity: center + # + # ios_content_mode can be one of the following iOS UIView.ContentMode (see + # https://developer.apple.com/documentation/uikit/uiview/contentmode): scaleToFill, + # scaleAspectFit, scaleAspectFill, center, top, bottom, left, right, topLeft, topRight, + # bottomLeft, or bottomRight. + #ios_content_mode: center + # + # web_image_mode can be one of the following modes: center, contain, stretch, and cover. + #web_image_mode: center + + # To hide the notification bar, use the fullscreen parameter. Has no effect in web since web + # has no notification bar. Defaults to false. + # NOTE: Unlike Android, iOS will not automatically show the notification bar when the app loads. + # To show the notification bar, add the following code to your Flutter app: + # WidgetsFlutterBinding.ensureInitialized(); + # SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]); + fullscreen: true + + # If you have changed the name(s) of your info.plist file(s), you can specify the filename(s) + # with the info_plist_files parameter. Remove only the # characters in the three lines below, + # do not remove any spaces: + #info_plist_files: + # - 'ios/Runner/Info-Debug.plist' + # - 'ios/Runner/Info-Release.plist' \ No newline at end of file diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..9625e10 --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 11.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..872e073 --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,481 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.axat.moviechitchat; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.axat.moviechitchat; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.axat.moviechitchat; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..c87d15a --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..e22f3a3 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..878de01 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..44f6359 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..c406ab3 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..f16f04d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..32ef843 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..55307cb Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..44f6359 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..36af23c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0795f8e Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 0000000..fef43ed Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 0000000..1eebb64 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 0000000..577e472 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 0000000..a74d582 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0795f8e Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..f5a1c98 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 0000000..5b9373f Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 0000000..e3ce35e Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..28f296d Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..46ff40e Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..4e5e333 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json new file mode 100644 index 0000000..9f447e1 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "background.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png new file mode 100644 index 0000000..a88be49 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..00cabce --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "LaunchImage.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "LaunchImage@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "LaunchImage@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..8c331f3 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..6599407 Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..694fdca Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +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. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..4a30e80 --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..caa5c7e --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,53 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Moviechitchat + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + moviechitchat + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + UIStatusBarHidden + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..ac39640 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,88 @@ +import 'package:amplify_api/amplify_api.dart'; +import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; +import 'package:amplify_datastore/amplify_datastore.dart'; +import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:moviechitchat/screens/welcome/WelcomeScreen.dart'; +import 'package:moviechitchat/viewmodels/MessageListViewModel.dart'; +import 'package:moviechitchat/viewmodels/MovieListViewModel.dart'; +import 'package:provider/provider.dart'; + +import 'amplifyconfiguration.dart'; +import 'models/ModelProvider.dart'; + +void main() { + SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + )); + runApp(MyApp()); +} + + +class MyApp extends StatefulWidget { + MyApp({Key? key}) : super(key: key); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + + Future hideStatusBar() => SystemChrome.setEnabledSystemUIOverlays([]); + + @override + initState() { + hideStatusBar(); + super.initState(); + if(!Amplify.isConfigured) { + _configureAmplify(); + setState(() {}); + return; + } + } + + + void _configureAmplify() async { + // Add Pinpoint and Cognito Plugins, or any other plugins you want to use + AmplifyAuthCognito authPlugin = AmplifyAuthCognito(); + AmplifyDataStore datastorePlugin = AmplifyDataStore(modelProvider: ModelProvider.instance); + await Amplify.addPlugins([authPlugin, datastorePlugin, AmplifyAPI()]); + + try { + await Amplify.configure(amplifyconfig); + debugPrint("Amplify Configured : >>>>>>>>>>>>>> ${Amplify.isConfigured.toString()}"); + } on AmplifyAlreadyConfiguredException { + debugPrint("Tried to reconfigure Amplify; this can occur when app restarts on Android."); + } + } + + + @override + Widget build(BuildContext context) { + + return MaterialApp( + debugShowCheckedModeBanner: false , + title: 'MovieChitChat', + theme: ThemeData( + primarySwatch: Colors.blue, + fontFamily: 'OpenSans', + ), + home: MultiProvider(providers: [ + ChangeNotifierProvider( + create: (_) => MovieListViewModel(), + ), + ChangeNotifierProvider( + create: (_) => MessageListViewModel(), + ), + ], + child: const WelcomeScreen(), + ), + ); + } + + + +} + + diff --git a/lib/models/Message.dart b/lib/models/Message.dart new file mode 100644 index 0000000..31cb9ed --- /dev/null +++ b/lib/models/Message.dart @@ -0,0 +1,224 @@ +/* +* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. +* +* Licensed under the Apache License, Version 2.0 (the "License"). +* You may not use this file except in compliance with the License. +* A copy of the License is located at +* +* http://aws.amazon.com/apache2.0 +* +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* express or implied. See the License for the specific language governing +* permissions and limitations under the License. +*/ + +// NOTE: This file is generated and may not follow lint rules defined in your app +// Generated files can be excluded from analysis in analysis_options.yaml +// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis + +// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously + +import 'package:amplify_core/amplify_core.dart'; +import 'package:flutter/foundation.dart'; + + +/** This is an auto generated class representing the Message type in your schema. */ +@immutable +class Message extends Model { + static const classType = const _MessageModelType(); + final String id; + final String? _fromUsername; + final String? _fromId; + final String? _movieId; + final String? _timestamp; + final String? _message; + final TemporalDateTime? _createdAt; + final TemporalDateTime? _updatedAt; + + @override + getInstanceType() => classType; + + @override + String getId() { + return id; + } + + String? get fromUsername { + return _fromUsername; + } + + String? get fromId { + return _fromId; + } + + String? get movieId { + return _movieId; + } + + String? get timestamp { + return _timestamp; + } + + String? get message { + return _message; + } + + TemporalDateTime? get createdAt { + return _createdAt; + } + + TemporalDateTime? get updatedAt { + return _updatedAt; + } + + const Message._internal({required this.id, fromUsername, fromId, movieId, timestamp, message, createdAt, updatedAt}): _fromUsername = fromUsername, _fromId = fromId, _movieId = movieId, _timestamp = timestamp, _message = message, _createdAt = createdAt, _updatedAt = updatedAt; + + factory Message({String? id, String? fromUsername, String? fromId, String? movieId, String? timestamp, String? message}) { + return Message._internal( + id: id == null ? UUID.getUUID() : id, + fromUsername: fromUsername, + fromId: fromId, + movieId: movieId, + timestamp: timestamp, + message: message); + } + + bool equals(Object other) { + return this == other; + } + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Message && + id == other.id && + _fromUsername == other._fromUsername && + _fromId == other._fromId && + _movieId == other._movieId && + _timestamp == other._timestamp && + _message == other._message; + } + + @override + int get hashCode => toString().hashCode; + + @override + String toString() { + var buffer = new StringBuffer(); + + buffer.write("Message {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("fromUsername=" + "$_fromUsername" + ", "); + buffer.write("fromId=" + "$_fromId" + ", "); + buffer.write("movieId=" + "$_movieId" + ", "); + buffer.write("timestamp=" + "$_timestamp" + ", "); + buffer.write("message=" + "$_message" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); + + return buffer.toString(); + } + + Message copyWith({String? id, String? fromUsername, String? fromId, String? movieId, String? timestamp, String? message}) { + return Message._internal( + id: id ?? this.id, + fromUsername: fromUsername ?? this.fromUsername, + fromId: fromId ?? this.fromId, + movieId: movieId ?? this.movieId, + timestamp: timestamp ?? this.timestamp, + message: message ?? this.message); + } + + Message.fromJson(Map json) + : id = json['id'], + _fromUsername = json['fromUsername'], + _fromId = json['fromId'], + _movieId = json['movieId'], + _timestamp = json['timestamp'], + _message = json['message'], + _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + + Map toJson() => { + 'id': id, 'fromUsername': _fromUsername, 'fromId': _fromId, 'movieId': _movieId, 'timestamp': _timestamp, 'message': _message, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() + }; + + static final QueryField ID = QueryField(fieldName: "id"); + static final QueryField FROMUSERNAME = QueryField(fieldName: "fromUsername"); + static final QueryField FROMID = QueryField(fieldName: "fromId"); + static final QueryField MOVIEID = QueryField(fieldName: "movieId"); + static final QueryField TIMESTAMP = QueryField(fieldName: "timestamp"); + static final QueryField MESSAGE = QueryField(fieldName: "message"); + static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + modelSchemaDefinition.name = "Message"; + modelSchemaDefinition.pluralName = "Messages"; + + modelSchemaDefinition.authRules = [ + AuthRule( + authStrategy: AuthStrategy.PUBLIC, + operations: [ + ModelOperation.CREATE, + ModelOperation.UPDATE, + ModelOperation.DELETE, + ModelOperation.READ + ]) + ]; + + modelSchemaDefinition.addField(ModelFieldDefinition.id()); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Message.FROMUSERNAME, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Message.FROMID, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Message.MOVIEID, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Message.TIMESTAMP, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Message.MESSAGE, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + fieldName: 'createdAt', + isRequired: false, + isReadOnly: true, + ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + fieldName: 'updatedAt', + isRequired: false, + isReadOnly: true, + ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + )); + }); +} + +class _MessageModelType extends ModelType { + const _MessageModelType(); + + @override + Message fromJson(Map jsonData) { + return Message.fromJson(jsonData); + } +} \ No newline at end of file diff --git a/lib/models/ModelProvider.dart b/lib/models/ModelProvider.dart new file mode 100644 index 0000000..daf331c --- /dev/null +++ b/lib/models/ModelProvider.dart @@ -0,0 +1,54 @@ +/* +* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. +* +* Licensed under the Apache License, Version 2.0 (the "License"). +* You may not use this file except in compliance with the License. +* A copy of the License is located at +* +* http://aws.amazon.com/apache2.0 +* +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* express or implied. See the License for the specific language governing +* permissions and limitations under the License. +*/ + +// NOTE: This file is generated and may not follow lint rules defined in your app +// Generated files can be excluded from analysis in analysis_options.yaml +// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis + +// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously + +import 'package:amplify_datastore_plugin_interface/amplify_datastore_plugin_interface.dart'; +import 'Message.dart'; +import 'Movie.dart'; +import 'User.dart'; + +export 'Message.dart'; +export 'Movie.dart'; +export 'User.dart'; + +class ModelProvider implements ModelProviderInterface { + @override + String version = "66c1cadac8b1b5228fabc66a01808ce8"; + @override + List modelSchemas = [Message.schema, Movie.schema, User.schema]; + static final ModelProvider _instance = ModelProvider(); + @override + List customTypeSchemas = []; + + static ModelProvider get instance => _instance; + + ModelType getModelTypeByModelName(String modelName) { + switch(modelName) { + case "Message": + return Message.classType; + case "Movie": + return Movie.classType; + case "User": + return User.classType; + default: + throw Exception("Failed to find model in model provider for model name: " + modelName); + } + } +} \ No newline at end of file diff --git a/lib/models/Movie.dart b/lib/models/Movie.dart new file mode 100644 index 0000000..4d1a7c0 --- /dev/null +++ b/lib/models/Movie.dart @@ -0,0 +1,241 @@ +/* +* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. +* +* Licensed under the Apache License, Version 2.0 (the "License"). +* You may not use this file except in compliance with the License. +* A copy of the License is located at +* +* http://aws.amazon.com/apache2.0 +* +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* express or implied. See the License for the specific language governing +* permissions and limitations under the License. +*/ + +// NOTE: This file is generated and may not follow lint rules defined in your app +// Generated files can be excluded from analysis in analysis_options.yaml +// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis + +// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously + +import 'package:amplify_core/amplify_core.dart'; +import 'package:flutter/foundation.dart'; + + +/** This is an auto generated class representing the Movie type in your schema. */ +@immutable +class Movie extends Model { + static const classType = const _MovieModelType(); + final String id; + final String? _img; + final String? _rating; + final String? _title; + final String? _overview; + final String? _recentMessage; + final String? _recentMessageTim; + final TemporalDateTime? _createdAt; + final TemporalDateTime? _updatedAt; + + @override + getInstanceType() => classType; + + @override + String getId() { + return id; + } + + String? get img { + return _img; + } + + String? get rating { + return _rating; + } + + String? get title { + return _title; + } + + String? get overview { + return _overview; + } + + String? get recentMessage { + return _recentMessage; + } + + String? get recentMessageTim { + return _recentMessageTim; + } + + TemporalDateTime? get createdAt { + return _createdAt; + } + + TemporalDateTime? get updatedAt { + return _updatedAt; + } + + const Movie._internal({required this.id, img, rating, title, overview, recentMessage, recentMessageTim, createdAt, updatedAt}): _img = img, _rating = rating, _title = title, _overview = overview, _recentMessage = recentMessage, _recentMessageTim = recentMessageTim, _createdAt = createdAt, _updatedAt = updatedAt; + + factory Movie({String? id, String? img, String? rating, String? title, String? overview, String? recentMessage, String? recentMessageTim}) { + return Movie._internal( + id: id == null ? UUID.getUUID() : id, + img: img, + rating: rating, + title: title, + overview: overview, + recentMessage: recentMessage, + recentMessageTim: recentMessageTim); + } + + bool equals(Object other) { + return this == other; + } + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is Movie && + id == other.id && + _img == other._img && + _rating == other._rating && + _title == other._title && + _overview == other._overview && + _recentMessage == other._recentMessage && + _recentMessageTim == other._recentMessageTim; + } + + @override + int get hashCode => toString().hashCode; + + @override + String toString() { + var buffer = new StringBuffer(); + + buffer.write("Movie {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("img=" + "$_img" + ", "); + buffer.write("rating=" + "$_rating" + ", "); + buffer.write("title=" + "$_title" + ", "); + buffer.write("overview=" + "$_overview" + ", "); + buffer.write("recentMessage=" + "$_recentMessage" + ", "); + buffer.write("recentMessageTim=" + "$_recentMessageTim" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); + + return buffer.toString(); + } + + Movie copyWith({String? id, String? img, String? rating, String? title, String? overview, String? recentMessage, String? recentMessageTim}) { + return Movie._internal( + id: id ?? this.id, + img: img ?? this.img, + rating: rating ?? this.rating, + title: title ?? this.title, + overview: overview ?? this.overview, + recentMessage: recentMessage ?? this.recentMessage, + recentMessageTim: recentMessageTim ?? this.recentMessageTim); + } + + Movie.fromJson(Map json) + : id = json['id'], + _img = json['img'], + _rating = json['rating'], + _title = json['title'], + _overview = json['overview'], + _recentMessage = json['recentMessage'], + _recentMessageTim = json['recentMessageTim'], + _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + + Map toJson() => { + 'id': id, 'img': _img, 'rating': _rating, 'title': _title, 'overview': _overview, 'recentMessage': _recentMessage, 'recentMessageTim': _recentMessageTim, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() + }; + + static final QueryField ID = QueryField(fieldName: "id"); + static final QueryField IMG = QueryField(fieldName: "img"); + static final QueryField RATING = QueryField(fieldName: "rating"); + static final QueryField TITLE = QueryField(fieldName: "title"); + static final QueryField OVERVIEW = QueryField(fieldName: "overview"); + static final QueryField RECENTMESSAGE = QueryField(fieldName: "recentMessage"); + static final QueryField RECENTMESSAGETIM = QueryField(fieldName: "recentMessageTim"); + static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + modelSchemaDefinition.name = "Movie"; + modelSchemaDefinition.pluralName = "Movies"; + + modelSchemaDefinition.authRules = [ + AuthRule( + authStrategy: AuthStrategy.PUBLIC, + operations: [ + ModelOperation.CREATE, + ModelOperation.UPDATE, + ModelOperation.DELETE, + ModelOperation.READ + ]) + ]; + + modelSchemaDefinition.addField(ModelFieldDefinition.id()); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Movie.IMG, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Movie.RATING, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Movie.TITLE, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Movie.OVERVIEW, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Movie.RECENTMESSAGE, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: Movie.RECENTMESSAGETIM, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + fieldName: 'createdAt', + isRequired: false, + isReadOnly: true, + ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + fieldName: 'updatedAt', + isRequired: false, + isReadOnly: true, + ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + )); + }); +} + +class _MovieModelType extends ModelType { + const _MovieModelType(); + + @override + Movie fromJson(Map jsonData) { + return Movie.fromJson(jsonData); + } +} \ No newline at end of file diff --git a/lib/models/User.dart b/lib/models/User.dart new file mode 100644 index 0000000..1bb6cd9 --- /dev/null +++ b/lib/models/User.dart @@ -0,0 +1,173 @@ +/* +* Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. +* +* Licensed under the Apache License, Version 2.0 (the "License"). +* You may not use this file except in compliance with the License. +* A copy of the License is located at +* +* http://aws.amazon.com/apache2.0 +* +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* express or implied. See the License for the specific language governing +* permissions and limitations under the License. +*/ + +// NOTE: This file is generated and may not follow lint rules defined in your app +// Generated files can be excluded from analysis in analysis_options.yaml +// For more info, see: https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis + +// ignore_for_file: public_member_api_docs, annotate_overrides, dead_code, dead_codepublic_member_api_docs, depend_on_referenced_packages, file_names, library_private_types_in_public_api, no_leading_underscores_for_library_prefixes, no_leading_underscores_for_local_identifiers, non_constant_identifier_names, null_check_on_nullable_type_parameter, prefer_adjacent_string_concatenation, prefer_const_constructors, prefer_if_null_operators, prefer_interpolation_to_compose_strings, slash_for_doc_comments, sort_child_properties_last, unnecessary_const, unnecessary_constructor_name, unnecessary_late, unnecessary_new, unnecessary_null_aware_assignments, unnecessary_nullable_for_final_variable_declarations, unnecessary_string_interpolations, use_build_context_synchronously + +import 'package:amplify_core/amplify_core.dart'; +import 'package:flutter/foundation.dart'; + + +/** This is an auto generated class representing the User type in your schema. */ +@immutable +class User extends Model { + static const classType = const _UserModelType(); + final String id; + final String? _email; + final String? _userName; + final TemporalDateTime? _createdAt; + final TemporalDateTime? _updatedAt; + + @override + getInstanceType() => classType; + + @override + String getId() { + return id; + } + + String? get email { + return _email; + } + + String? get userName { + return _userName; + } + + TemporalDateTime? get createdAt { + return _createdAt; + } + + TemporalDateTime? get updatedAt { + return _updatedAt; + } + + const User._internal({required this.id, email, userName, createdAt, updatedAt}): _email = email, _userName = userName, _createdAt = createdAt, _updatedAt = updatedAt; + + factory User({String? id, String? email, String? userName}) { + return User._internal( + id: id == null ? UUID.getUUID() : id, + email: email, + userName: userName); + } + + bool equals(Object other) { + return this == other; + } + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is User && + id == other.id && + _email == other._email && + _userName == other._userName; + } + + @override + int get hashCode => toString().hashCode; + + @override + String toString() { + var buffer = new StringBuffer(); + + buffer.write("User {"); + buffer.write("id=" + "$id" + ", "); + buffer.write("email=" + "$_email" + ", "); + buffer.write("userName=" + "$_userName" + ", "); + buffer.write("createdAt=" + (_createdAt != null ? _createdAt!.format() : "null") + ", "); + buffer.write("updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null")); + buffer.write("}"); + + return buffer.toString(); + } + + User copyWith({String? id, String? email, String? userName}) { + return User._internal( + id: id ?? this.id, + email: email ?? this.email, + userName: userName ?? this.userName); + } + + User.fromJson(Map json) + : id = json['id'], + _email = json['email'], + _userName = json['userName'], + _createdAt = json['createdAt'] != null ? TemporalDateTime.fromString(json['createdAt']) : null, + _updatedAt = json['updatedAt'] != null ? TemporalDateTime.fromString(json['updatedAt']) : null; + + Map toJson() => { + 'id': id, 'email': _email, 'userName': _userName, 'createdAt': _createdAt?.format(), 'updatedAt': _updatedAt?.format() + }; + + static final QueryField ID = QueryField(fieldName: "id"); + static final QueryField EMAIL = QueryField(fieldName: "email"); + static final QueryField USERNAME = QueryField(fieldName: "userName"); + static var schema = Model.defineSchema(define: (ModelSchemaDefinition modelSchemaDefinition) { + modelSchemaDefinition.name = "User"; + modelSchemaDefinition.pluralName = "Users"; + + modelSchemaDefinition.authRules = [ + AuthRule( + authStrategy: AuthStrategy.PUBLIC, + operations: [ + ModelOperation.CREATE, + ModelOperation.UPDATE, + ModelOperation.DELETE, + ModelOperation.READ + ]) + ]; + + modelSchemaDefinition.addField(ModelFieldDefinition.id()); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: User.EMAIL, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.field( + key: User.USERNAME, + isRequired: false, + ofType: ModelFieldType(ModelFieldTypeEnum.string) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + fieldName: 'createdAt', + isRequired: false, + isReadOnly: true, + ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + )); + + modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField( + fieldName: 'updatedAt', + isRequired: false, + isReadOnly: true, + ofType: ModelFieldType(ModelFieldTypeEnum.dateTime) + )); + }); +} + +class _UserModelType extends ModelType { + const _UserModelType(); + + @override + User fromJson(Map jsonData) { + return User.fromJson(jsonData); + } +} \ No newline at end of file diff --git a/lib/screens/chatlist/ChatListScreen.dart b/lib/screens/chatlist/ChatListScreen.dart new file mode 100644 index 0000000..f2e32b4 --- /dev/null +++ b/lib/screens/chatlist/ChatListScreen.dart @@ -0,0 +1,233 @@ +import 'package:amplify_datastore/amplify_datastore.dart'; +import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:moviechitchat/models/Message.dart'; +import 'package:moviechitchat/models/Movie.dart'; +import 'package:moviechitchat/screens/chatroom/ChatScreen.dart'; +import 'package:moviechitchat/screens/setting/SettingScreen.dart'; +import 'package:moviechitchat/screens/welcome/LoginScreen.dart'; +import 'package:moviechitchat/utils/CommonUtils.dart'; +import 'package:moviechitchat/utils/Constants.dart'; +import 'package:moviechitchat/viewmodels/MessageListViewModel.dart'; + +class ChatListScreen extends StatefulWidget { + + final Stream> movieQuery; + final String currentUserId; + final String username; + final MessageListViewModel messageListViewModel; + + var movies = []; + + ChatListScreen(this.currentUserId, this.movieQuery, this.messageListViewModel, this.username); + + + @override + _ChatListScreenState createState() => _ChatListScreenState(); +} + +class _ChatListScreenState extends State { + + + @override + void initState() { + super.initState(); + } + + + @override + Widget build(BuildContext context) { + + widget.movieQuery.listen((event) { + setState(() { + widget.movies = event.items; + }); + }); + + return WillPopScope( + onWillPop: () async { + final value = await showDialog( + context: context, + builder: (context) { + return AlertDialog( + content: const Text('Are you sure you want to exit?'), + actions: [ + ElevatedButton( + child: const Text('No'), + onPressed: () { + Navigator.of(context).pop(false); + }, + ), + ElevatedButton( + child: const Text('Yes, exit'), + onPressed: () { + Navigator.of(context).pop(true); + }, + ), + ], + ); + } + ); + return value == true; + }, + child: Scaffold( + backgroundColor: const Color(0xFF1c2f47), + body: SafeArea( + child: Center( + child: Column( + children: [ + const SizedBox(height: 15), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: const EdgeInsets.symmetric(horizontal: 15), + child: IconButton(color: Colors.white, + onPressed: () { + + showDialog( + context: context, + builder: (context) => AlertDialog( + title: const Text('Are you sure?'), + content: const Text('Do you want to Logout'), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: const Text('No'), + ), + TextButton( + onPressed: () => performLogout(), + child: const Text('Yes'), + ), + ], + ), + ); + + }, icon: const Icon(Icons.logout),) + ), + const Spacer(), + const Text("Chit-Chat", style: TextStyle(fontSize: 24, color: Colors.white, fontWeight: FontWeight.bold),), + const Spacer(), + Container( + margin: const EdgeInsets.symmetric(horizontal: 15), + child: IconButton(color: Colors.white, + onPressed: () { + Navigator.of(context).push(MaterialPageRoute(builder: (context) => const SettingScreen())); + }, icon: const Icon(Icons.settings),) + ), + ], + ), + const SizedBox(height: 15), + Expanded( + child: Container( + height: MediaQuery.of(context).size.height, + width: double.infinity, + padding: const EdgeInsets.only(top: 20), + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical( + top: Radius.circular(40), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Flexible( + child: ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: const ScrollPhysics(), + itemCount: widget.movies.length, + itemBuilder: (context, index) { + + var movie = widget.movies[index]; + var image = movie.img; + + return ListTile( + leading: Container( + padding: const EdgeInsets.all(1), + decoration: BoxDecoration( + color: Colors.white, + border: Border.all( + color: const Color(0xFF1c2f47), + width: 1, + ), + borderRadius: BorderRadius.circular(28), + ), + child: Container( + height: 50, + width: 50, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(25), + image: DecorationImage( + fit: BoxFit.fill, + image: NetworkImage(Constants.imgBaseUrl + image!), + ), + ), + ), + ), + title: Text(movie.title!), + subtitle: Text(getLatestMessage(movie)), + onTap: (){ + navigateToChatScreen(movie); + }, + ); + + + }), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + ); + } + + + + /* Recent Message */ + String getLatestMessage(Movie movie) { + return movie.recentMessage!.isNotEmpty ? "Recent Message: ${movie.recentMessage!.length <= 2 ? + movie.recentMessage!.substring(0, 2) : + movie.recentMessage!.substring(0, 5)}" : "Start Chit-Chat"; + } + + + /* Go to Chat Room */ + Future navigateToChatScreen(Movie movie) async { + Stream> messages = widget.messageListViewModel.observeMessages(movie.id); + Function sendMessage = widget.messageListViewModel.addMessage; + + Navigator.push(context, MaterialPageRoute( + builder: (BuildContext context) { + return ChatRoomScreen(movie, widget.currentUserId, messages, sendMessage, widget.username); + }, + )); + } + + + /* Logout User */ + Future performLogout() async { + try { + CommonUtils.showSnackBar("Logging Out", context); + await Amplify.Auth.signOut(); + Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) => + const LoginScreen()), (Route route) => false); + } on AuthException catch (e) { + CommonUtils.showSnackBar(e.message, context); + } + } + + + +} + + diff --git a/lib/screens/chatroom/ChatScreen.dart b/lib/screens/chatroom/ChatScreen.dart new file mode 100644 index 0000000..00c91a1 --- /dev/null +++ b/lib/screens/chatroom/ChatScreen.dart @@ -0,0 +1,45 @@ +import 'package:amplify_datastore/amplify_datastore.dart'; +import 'package:flutter/material.dart'; +import 'package:moviechitchat/models/Message.dart'; +import 'package:moviechitchat/models/Movie.dart'; +import 'package:moviechitchat/screens/chatroom/chatroomwidget/MessageBox.dart'; +import 'package:moviechitchat/screens/chatroom/chatroomwidget/MessageBubble.dart'; + +import 'chatroomwidget/MessageList.dart'; + + +class ChatRoomScreen extends StatelessWidget { + + + final Movie movieId; + final String currentUserId; + final String username; + final Stream> messageQuery; + final Function sendMessage; + var messages = []; + + ChatRoomScreen(this.movieId, this.currentUserId, this.messageQuery, this.sendMessage, this.username); + + + @override + Widget build(BuildContext context) { + + return Scaffold( + body: SafeArea( + child: MessageList( + currentUserId, + messageQuery, + sendMessage, + movieId.id, + username, + movieId + ), + ), + ); + } + + + + +} + diff --git a/lib/screens/chatroom/chatroomwidget/MessageBox.dart b/lib/screens/chatroom/chatroomwidget/MessageBox.dart new file mode 100644 index 0000000..daca3a3 --- /dev/null +++ b/lib/screens/chatroom/chatroomwidget/MessageBox.dart @@ -0,0 +1,169 @@ +import 'dart:io'; + +import 'package:emoji_picker_flutter/emoji_picker_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:moviechitchat/utils/CommonUtils.dart'; + +var message = ""; + +class MessageBox extends StatefulWidget { + + final Function sendMessage; + + MessageBox(this.sendMessage); + + @override + _MessageBox createState() => _MessageBox(); +} + +class _MessageBox extends State { + + + @override + void initState() { + super.initState(); + emojiShowing = false; + } + + bool emojiShowing = false; + + + TextEditingController controller = TextEditingController(); + + _onEmojiSelected(Emoji emoji) { + controller + ..text += emoji.emoji + ..selection = TextSelection.fromPosition( + TextPosition(offset: controller.text.length)); + } + + _onBackspacePressed() { + controller + ..text = controller.text.characters.skipLast(1).toString() + ..selection = TextSelection.fromPosition( + TextPosition(offset: controller.text.length)); + } + + + Future onBackPress() { + if (emojiShowing) { + setState(() { + emojiShowing = false; + }); + } else { + Navigator.pop(context); + } + return Future.value(false); + } + + + @override + Widget build(BuildContext context) { + var message = ""; + + controller.addListener(() { + if (controller.text.length > 1) { + message = controller.text.toString(); + } + }); + + controller.selection = TextSelection.fromPosition( + TextPosition(offset: controller.text.length)); + + void sendMessage() { + if(message.isEmpty){ + CommonUtils.showSnackBar("Message is empty", context); + return; + } + widget.sendMessage(message); + controller.clear(); + } + + return WillPopScope( + onWillPop: onBackPress, + child: Container( + color: const Color(0xFF1c2f47), + child: Column( + children: [ + Container( + height: 45, + margin: const EdgeInsets.only(left: 30, right: 30, bottom: 10, top: 10), + decoration: BoxDecoration( + color: const Color(0xff475873), + borderRadius: BorderRadius.circular(25.0), + ), + child: TextField( + autofocus: false, + keyboardType: TextInputType.multiline, + maxLines: null, + controller: controller, + onTap: () => {}, + style: const TextStyle(color: Colors.white), + decoration: InputDecoration( + contentPadding: const EdgeInsets.only(top: 0, bottom: 0, left: 10, right: 10), + hintText: "Say Something!", + hintStyle: const TextStyle(color: Colors.white), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(25.0), + borderSide: const BorderSide(color: Color(0xFF1c2f47),), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(25.0), + borderSide: const BorderSide(color: Colors.white), + ), + prefixIcon: IconButton( + icon: const Icon(Icons.face, color: Colors.white,), onPressed: () { + setState(() { + emojiShowing = !emojiShowing; + }); + }, + ), + suffixIcon: IconButton( + icon: Image.asset("assets/icons/send_icon.png", width: 20, height: 20, color: Colors.white,), onPressed: () { sendMessage(); }, + ), + ), + + ) + ), + + + Offstage( + offstage: !emojiShowing, + child: SizedBox( + height: 250, + child: EmojiPicker( + onEmojiSelected: (Category? category, Emoji emoji) { + _onEmojiSelected(emoji); + }, + onBackspacePressed: _onBackspacePressed, + config: Config( + columns: 7, + emojiSizeMax: 32 * (Platform.isIOS ? 1.30 : 1.0), + verticalSpacing: 0, + horizontalSpacing: 0, + initCategory: Category.RECENT, + bgColor: const Color(0xFFF2F2F2), + indicatorColor: Colors.blue, + iconColor: Colors.grey, + iconColorSelected: Colors.blue, + backspaceColor: Colors.blue, + skinToneDialogBgColor: Colors.white, + skinToneIndicatorColor: Colors.grey, + enableSkinTones: true, + showRecentsTab: true, + recentsLimit: 28, + tabIndicatorAnimDuration: kTabScrollDuration, + categoryIcons: const CategoryIcons(), + buttonMode: ButtonMode.MATERIAL)), + ), + ), + + ], + ), + ), + ); + } + + + +} \ No newline at end of file diff --git a/lib/screens/chatroom/chatroomwidget/MessageBubble.dart b/lib/screens/chatroom/chatroomwidget/MessageBubble.dart new file mode 100644 index 0000000..082f489 --- /dev/null +++ b/lib/screens/chatroom/chatroomwidget/MessageBubble.dart @@ -0,0 +1,81 @@ +import 'package:flutter/material.dart'; + +class MessageBubble extends StatelessWidget { + + final String text; + final String time; + final String username; + final bool isCurrentUser; + + MessageBubble({required this.text, required this.isCurrentUser, required this.time, required this.username}); + + @override + Widget build(BuildContext context) { + + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 2), + child: Align( + alignment: isCurrentUser ? Alignment.centerRight : Alignment.centerLeft, + child: Column( + mainAxisAlignment: isCurrentUser ? MainAxisAlignment.end : MainAxisAlignment.start, + crossAxisAlignment: isCurrentUser ? CrossAxisAlignment.end : CrossAxisAlignment.start, + children: [ + Container( + width: MediaQuery.of(context).size.width / 2, + child: DecoratedBox( + decoration: BoxDecoration( + color: isCurrentUser ? const Color(0xFF1c2f47) : const Color(0xFF475873), + borderRadius: isCurrentUser + ? const BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + bottomRight: Radius.circular(0), + bottomLeft: Radius.circular(20), + ) + : const BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + bottomRight: Radius.circular(20), + bottomLeft: Radius.circular(0), + ), + ), + child: Column( + crossAxisAlignment: isCurrentUser ? CrossAxisAlignment.end : CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 10, bottom: 5, right: 15, left: 15), + child: Text( + username.replaceAll("@gmail.com", ""), + style: TextStyle( + fontSize: 10, + color: isCurrentUser ? Colors.white : Colors.white), + ), + ), + Padding( + padding: const EdgeInsets.only(top: 0, bottom: 10, right: 15, left: 15), + child: Text( + text, + style: TextStyle( + fontSize: 14, + color: isCurrentUser ? Colors.white : Colors.white), + ), + ), + ]), + ), + ), + Padding( + padding: const EdgeInsets.only(top:6, right: 6, bottom: 6), + child: Text( + time, + textAlign: TextAlign.end, + style: const TextStyle( + fontSize: 12, + color: Colors.black), + ) + ) + ], + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/chatroom/chatroomwidget/MessageList.dart b/lib/screens/chatroom/chatroomwidget/MessageList.dart new file mode 100644 index 0000000..1083d71 --- /dev/null +++ b/lib/screens/chatroom/chatroomwidget/MessageList.dart @@ -0,0 +1,139 @@ +import 'package:amplify_datastore/amplify_datastore.dart'; +import 'package:flutter/material.dart'; +import 'package:moviechitchat/models/Message.dart'; +import 'package:moviechitchat/screens/chatroom/chatroomwidget/MessageBox.dart'; +import 'package:moviechitchat/screens/chatroom/chatroomwidget/MessageBubble.dart'; +import 'package:moviechitchat/screens/moviedetails/MovieDetailScreen.dart'; + +import '../../../models/Movie.dart'; + + +class MessageList extends StatefulWidget { + + final String movieId; + final String username; + final String currentUserId; + final Stream> messageQuery; + final Function sendMessage; + final Movie movieDetails; + var messages = []; + + MessageList(this.currentUserId, this.messageQuery, this.sendMessage, this.movieId, this.username, this.movieDetails); + + + @override + _MessageListState createState() => _MessageListState(); +} + +class _MessageListState extends State { + + ScrollController _scrollController = ScrollController(); + + _scrollToBottom() { + _scrollController.jumpTo(_scrollController.position.maxScrollExtent); + } + + + @override + void initState() { + super.initState(); + } + + + + @override + Widget build(BuildContext context) { + + + // scroll to bottom once chat list is built + WidgetsBinding.instance.addPostFrameCallback((_) => _scrollToBottom()); + + widget.messageQuery.listen((event) { + debugPrint("Items${event.items}"); + setState(() { + widget.messages = event.items; + }); + }); + + return Container( + color: const Color(0xFF1c2f47), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Container( + color: Colors.white, + child: Center( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: const EdgeInsets.symmetric(horizontal: 15), + child: IconButton( + color: Colors.black, + onPressed: () { + Navigator.of(context).pop(); + }, icon: const Icon(Icons.chevron_left, size: 30,),) + ), + Expanded( + child: SizedBox( + height: 20, + child: FittedBox( + child: Text(widget.movieDetails.title.toString(), style: TextStyle(fontSize: 20, color: Colors.black),)) + ) + ), + Container( + margin: const EdgeInsets.symmetric(horizontal: 15), + child: IconButton(color: Colors.black, + onPressed: () { + Navigator.of(context).push(MaterialPageRoute(builder: (context) => MovieDetailScreen(widget.movieDetails))); + }, icon: const Icon(Icons.more_vert),) + ), + ], + ), + ), + ), + Expanded( + child: Container( + height: MediaQuery.of(context).size.height, + width: double.infinity, + padding: const EdgeInsets.only(top: 20), + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical( + bottom: Radius.circular(35), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Flexible( + child: ListView.builder( + itemCount: widget.messages.length, + scrollDirection: Axis.vertical, + controller: _scrollController, + shrinkWrap: true, + itemBuilder: (context,index) { + Message message = widget.messages[index]; + bool isCurrentUser = message.fromId == widget.currentUserId; + return MessageBubble(text: message.message! , isCurrentUser: isCurrentUser, time: message.timestamp!, username: message.fromUsername!); + }, + ), + ), + ], + ), + ), + ), + Container( + margin: const EdgeInsets.symmetric(vertical: 5), + child: MessageBox((message) => { + setState(() { + widget.sendMessage(message, widget.currentUserId, widget.movieId , widget.username); + }) + },), + ) + ]), + ); + } +} \ No newline at end of file diff --git a/lib/screens/moviedetails/MovieDetailScreen.dart b/lib/screens/moviedetails/MovieDetailScreen.dart new file mode 100644 index 0000000..d5a5399 --- /dev/null +++ b/lib/screens/moviedetails/MovieDetailScreen.dart @@ -0,0 +1,234 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:moviechitchat/models/Movie.dart'; +import 'package:moviechitchat/screens/moviedetails/moviedetailswidget/CustomLoadingSpinKitRing.dart'; +import 'package:moviechitchat/utils/Constants.dart'; +import 'package:moviechitchat/utils/StarCalculator.dart' as starCalculator; + +class MovieDetailScreen extends StatefulWidget { + + final Movie movie; + + MovieDetailScreen(this.movie); + + @override + _MovieDetailScreenState createState() => _MovieDetailScreenState(); + +} + +class _MovieDetailScreenState extends State { + + List? stars; + bool isFavorite = false; + + @override + void initState() { + super.initState(); + () async { + List temp2 = starCalculator.getStars(rating: double.parse("${widget.movie.rating}"), starSize: 15); + setState(() { + stars = temp2; + }); + }(); + } + + + @override + Widget build(BuildContext context) { + return Scaffold( + body: (stars == null) + ? CustomLoadingSpinKitRing(loadingColor: Colors.blueAccent) + : SafeArea( + child: CustomScrollView( + slivers: [ + SliverAppBar( + shadowColor: Colors.transparent.withOpacity(0.1), + elevation: 0, + backgroundColor: Color(0xFF101010), + leading: Padding( + padding: EdgeInsets.only(left: 3), + child: IconButton( + icon: Icon(Icons.arrow_back_ios), + onPressed: () { + Navigator.pop(context); + }, + ), + ), + automaticallyImplyLeading: false, + pinned: true, + snap: false, + floating: false, + expandedHeight: 22, + actions: [ + Padding( + padding: EdgeInsets.only(right: 3), + child: IconButton( + onPressed: () { + setState(() { + + }); + }, + icon: Icon((isFavorite) + ? Icons.bookmark_sharp + : Icons.bookmark_border_sharp), + ), + ), + ], + flexibleSpace: FlexibleSpaceBar( + centerTitle: true, + title: Text("Overview"), + background: SafeArea( + child: CachedNetworkImage( + fit: BoxFit.cover, + placeholder: (context, url) => SafeArea( + child: Container( + height: 22, + child: CustomLoadingSpinKitRing( + loadingColor: Colors.blueAccent), + ), + ), + imageUrl: "https://cdn.wallpapersafari.com/38/2/1APX3s.jpg", + errorWidget: (context, url, error) => SafeArea( + child: Container( + height: 22, + child: CustomLoadingSpinKitRing( + loadingColor: Colors.blueAccent), + ), + ), + ), + ), + ), + ), + SliverFillRemaining( + child: Column( + children: [ + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 0), + child: Wrap( + children: [ + Center( + child: Container( + height: 300, + width: MediaQuery.of(context).size.width, + child: CachedNetworkImage( + fit: BoxFit.fill, + placeholder: (context, url) => SafeArea( + child: Container( + height: 22, + child: CustomLoadingSpinKitRing( + loadingColor: Colors.blueAccent), + ), + ), + imageUrl: Constants.imgBaseUrl + widget.movie.img!, + errorWidget: (context, url, error) => SafeArea( + child: Container( + height: 22, + child: CustomLoadingSpinKitRing( + loadingColor: Colors.blueAccent), + ), + ), + ), + ), + ), + ], + ), + ), + SizedBox( + height: 40, + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 20), + child: Wrap( + children: [ + Row( + children: [ + Text("Moive: ", style: TextStyle( + fontSize: 20, + color: Colors.black + ), + ), + Text( + "${widget.movie.title} ", + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.black + ), + ), + ], + ), + ], + ), + ), + SizedBox(height: 10), + Row( + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 20), + child: Text("Rating: "), + ), + Text("${widget.movie.rating}"), + Padding( + padding: EdgeInsets.symmetric(horizontal: 10), + child: Row(children: stars!), + ), + ], + ), + SizedBox(height: 10), + ], + ), + ), + if (widget.movie.overview != "") + Expanded( + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: 3, vertical: 3), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + right: 20, + left: 20, + top: 20, + bottom: 0), + child: Container( + child: Text("Storyline", + style: TextStyle(fontSize: 18)), + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.only( + right: 20, + left: 20, + top: 10, + bottom: 20), + child: Text( + widget.movie.overview!, + style: TextStyle( + fontSize: 16, + color: Colors.black), + ), + ), + ), + ], + ), + ), + ), + ], + ), + ) + ], + ), + ), + ); + } +} + + diff --git a/lib/screens/moviedetails/moviedetailswidget/CustomLoadingSpinKitRing.dart b/lib/screens/moviedetails/moviedetailswidget/CustomLoadingSpinKitRing.dart new file mode 100644 index 0000000..de438d2 --- /dev/null +++ b/lib/screens/moviedetails/moviedetailswidget/CustomLoadingSpinKitRing.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_spinkit/flutter_spinkit.dart'; + +class CustomLoadingSpinKitRing extends StatelessWidget { + + final Color? loadingColor; + + CustomLoadingSpinKitRing({ + required this.loadingColor, + }); + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Center( + child: Icon( + Icons.videocam, + size: 20, + color: loadingColor ?? Colors.transparent, + ), + ), + SpinKitRing( + color: loadingColor ?? Colors.transparent, + size: 50, + lineWidth: 2, + ), + ], + ); + } +} \ No newline at end of file diff --git a/lib/screens/moviedetails/moviedetailswidget/StarIcon.dart b/lib/screens/moviedetails/moviedetailswidget/StarIcon.dart new file mode 100644 index 0000000..c5ad324 --- /dev/null +++ b/lib/screens/moviedetails/moviedetailswidget/StarIcon.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; + +class StarIcon extends StatelessWidget { + final IconData icon; + final double size; + + StarIcon({required this.icon, required this.size}); + @override + Widget build(BuildContext context) { + return Icon( + icon, + color: Colors.yellow, + size: size, + ); + } +} \ No newline at end of file diff --git a/lib/screens/setting/SettingScreen.dart b/lib/screens/setting/SettingScreen.dart new file mode 100644 index 0000000..7b75b0c --- /dev/null +++ b/lib/screens/setting/SettingScreen.dart @@ -0,0 +1,150 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SettingScreen extends StatefulWidget { + const SettingScreen({Key? key}) : super(key: key); + + @override + State createState() => _SettingScreenState(); +} + +class _SettingScreenState extends State { + + bool _switchValue = true; + + + @override + Widget build(BuildContext context) { + + return WillPopScope( + onWillPop: () async { + final value = await showDialog( + context: context, + builder: (context) { + return AlertDialog( + content: const Text('Are you sure you want to exit?'), + actions: [ + ElevatedButton( + child: const Text('No'), + onPressed: () { + Navigator.of(context).pop(false); + }, + ), + ElevatedButton( + child: const Text('Yes, exit'), + onPressed: () { + Navigator.of(context).pop(true); + }, + ), + ], + ); + } + ); + return value == true; + }, + child: Scaffold( + backgroundColor: const Color(0xFF1c2f47), + body: SafeArea( + child: Center( + child: Column( + children: [ + const SizedBox(height: 15), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: const EdgeInsets.symmetric(horizontal: 15), + child: IconButton(color: Colors.white, + onPressed: () { + Navigator.of(context).pop(); + }, icon: const Icon(Icons.arrow_back_ios_new),) + ), + const Spacer(), + const Text("Settings", style: TextStyle(fontSize: 24, color: Colors.white, fontWeight: FontWeight.bold),), + const Spacer(), + Container( + margin: const EdgeInsets.symmetric(horizontal: 15), + child: IconButton(color: Colors.white, + onPressed: () {}, icon: const Icon(Icons.settings, color: Color(0xFF1c2f47),),) + ), + ], + ), + const SizedBox(height: 15), + Expanded( + child: Container( + height: MediaQuery.of(context).size.height, + width: double.infinity, + padding: const EdgeInsets.only(top: 40), + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.vertical( + top: Radius.circular(40), + ), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + + Flexible( + child: Column( + children: [ + + Container( + padding: const EdgeInsets.symmetric(horizontal: 25), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const Text("Night Mode", style: TextStyle(fontSize: 18, color: Colors.black),), + const Spacer(), + Transform.scale( + scale: 0.8, + child: CupertinoSwitch( + value: _switchValue, + activeColor: const Color(0xFF1c2f47), + onChanged: (bool value) { + setState(() { + _switchValue = value; + }); + }, + ), + ), + ], + ), + ), + const SizedBox(height: 30,), + Container( + padding: const EdgeInsets.symmetric(horizontal: 25), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const Text("About us", style: TextStyle(fontSize: 18, color: Colors.black),), + const Spacer(), + Container( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: const Icon(Icons.arrow_forward_ios_rounded, size: 25,) + ), + ], + ), + ), + + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + ), + ), + ); + } + + +} diff --git a/lib/screens/welcome/LoginScreen.dart b/lib/screens/welcome/LoginScreen.dart new file mode 100644 index 0000000..955d026 --- /dev/null +++ b/lib/screens/welcome/LoginScreen.dart @@ -0,0 +1,201 @@ +import 'dart:async'; + +import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; +import 'package:amplify_datastore/amplify_datastore.dart'; +import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:moviechitchat/main.dart'; +import 'package:moviechitchat/models/Movie.dart'; +import 'package:moviechitchat/screens/welcome/RegisterScreen.dart'; +import 'package:moviechitchat/screens/welcome/WelcomeScreen.dart'; +import 'package:moviechitchat/screens/welcome/welcomewidgets/LoginRegisterBG.dart'; +import 'package:moviechitchat/utils/CommonUtils.dart'; +import 'package:moviechitchat/viewmodels/MessageListViewModel.dart'; +import 'package:moviechitchat/viewmodels/MovieListViewModel.dart'; +import 'package:provider/provider.dart'; + +import '../chatlist/ChatListScreen.dart'; + +class LoginScreen extends StatefulWidget { + const LoginScreen({Key? key}) : super(key: key); + + @override + State createState() => _LoginScreenState(); +} + +class _LoginScreenState extends State { + + + TextEditingController emailController = TextEditingController(); + TextEditingController passwordController = TextEditingController(); + + + Future login(BuildContext context) async { + CommonUtils.showSnackBar("Logging In", context); + + try { + SignInResult res = await Amplify.Auth.signIn( + username: emailController.text.trim(), + password: passwordController.text.trim(), + ); + + setState(() { + Timer(const Duration(seconds: 2), (){ + if (res.isSignedIn) { + Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute(builder: (context) => + MyApp()), (Route route) => false); + } + }); + + }); + } on AuthException catch (e) { + CommonUtils.showSnackBar(e.message.toString(), context); + } + } + + void register() { + Navigator.push(context, MaterialPageRoute( + builder: (BuildContext context) { + return RegisterScreen(); + }, + )); + } + + @override + void initState() { + super.initState(); + } + + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + + + return WillPopScope( + onWillPop: () async { + return false; + }, + child: Scaffold( + body: Background( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.symmetric(horizontal: 40), + child: const Text( + "LOGIN", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Color(0xFF2661FA), + fontSize: 36 + ), + textAlign: TextAlign.left, + ), + ), + + SizedBox(height: size.height * 0.03), + + Container( + alignment: Alignment.center, + margin: const EdgeInsets.symmetric(horizontal: 40), + child: TextField( + controller: emailController, + decoration: const InputDecoration( + labelText: "Email" + ), + ), + ), + + SizedBox(height: size.height * 0.03), + + Container( + alignment: Alignment.center, + margin: const EdgeInsets.symmetric(horizontal: 40), + child: TextField( + controller: passwordController, + decoration: const InputDecoration( + labelText: "Password" + ), + obscureText: true, + ), + ), + + Container( + alignment: Alignment.centerRight, + margin: const EdgeInsets.symmetric(horizontal: 40, vertical: 10), + child: const Text( + "Forgot your password?", + style: TextStyle( + fontSize: 12, + color: Color(0XFF2661FA) + ), + ), + ), + + SizedBox(height: size.height * 0.05), + + Container( + alignment: Alignment.centerRight, + margin: const EdgeInsets.symmetric(horizontal: 40, vertical: 10), + child: ElevatedButton( + onPressed: () { + login(context); + }, + style: ElevatedButton.styleFrom( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(80.0)), + elevation: 0, + textStyle: const TextStyle(color: Colors.white), + padding: const EdgeInsets.all(0), + ), + child: Container( + alignment: Alignment.center, + height: 50.0, + width: size.width * 0.5, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(80.0), + gradient: const LinearGradient( + colors: [ + Color.fromARGB(255, 255, 136, 34), + Color.fromARGB(255, 255, 177, 41) + ] + ) + ), + padding: const EdgeInsets.all(0), + child: const Text( + "LOGIN", + textAlign: TextAlign.center, + style: TextStyle( + fontWeight: FontWeight.bold + ), + ), + ), + ), + ), + + Container( + alignment: Alignment.centerRight, + margin: const EdgeInsets.symmetric(horizontal: 40, vertical: 10), + child: GestureDetector( + onTap: () => { + Navigator.push(context, MaterialPageRoute(builder: (context) => RegisterScreen())) + }, + child: const Text( + "Don't Have an Account? Sign up", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Color(0xFF2661FA) + ), + ), + ), + ) + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/welcome/RegisterScreen.dart b/lib/screens/welcome/RegisterScreen.dart new file mode 100644 index 0000000..1740c27 --- /dev/null +++ b/lib/screens/welcome/RegisterScreen.dart @@ -0,0 +1,265 @@ +import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; +import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:moviechitchat/screens/welcome/LoginScreen.dart'; +import 'package:moviechitchat/screens/welcome/welcomewidgets/LoginRegisterBG.dart'; +import 'package:moviechitchat/utils/CommonUtils.dart'; + +class RegisterScreen extends StatefulWidget { + + bool isSignUpComplete = false; + String email = ""; + RegisterScreen({Key? key}) : super(key: key); + + @override + State createState() => _RegisterScreenState(); +} + +class _RegisterScreenState extends State { + + var email = ""; + var password = ""; + var code = ""; + + TextEditingController passwordController = TextEditingController(); + TextEditingController emailController = TextEditingController(); + TextEditingController confirmationCodeController = TextEditingController(); + + Future registerUser(String email, String password) async { + if (email.isEmpty || password.isEmpty) { + CommonUtils.showSnackBar("Please provide a email and password", context); + return; + } + + try { + SignUpResult res = await Amplify.Auth.signUp( + username: email, + password: password, + ); + setState(() { + if (res.isSignUpComplete) { + widget.email = email; + widget.isSignUpComplete = true; + CommonUtils.showSnackBar("Please provide verification code from email", context); + } + }); + } on AuthException catch (e) { + CommonUtils.showSnackBar(e.message, context); + } + } + + Future verifyCode(String code, String username) async { + try { + SignUpResult res = await Amplify.Auth.confirmSignUp( + username: username, + confirmationCode: code + ); + setState(() { + if(res.isSignUpComplete) { + CommonUtils.showSnackBar("Registered", context); + navigateToLogin(); + } + }); + } on AuthException catch (e) { + CommonUtils.showSnackBar(e.message, context); + } + } + + void navigateToLogin() { + Navigator.push(context, MaterialPageRoute( + builder: (BuildContext context) { + return LoginScreen(); + }, + )); + } + + @override + void initState() { + debugPrint(">>>>>>>>>>>>>>${Amplify.isConfigured.toString()}"); + super.initState(); + } + + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + + + passwordController.addListener(() { + if (passwordController.text.length > 1) { + password = passwordController.text.toString(); + } + }); + + emailController.addListener(() { + if (emailController.text.length > 1) { + email = emailController.text.toString(); + } + }); + + confirmationCodeController.addListener(() { + if (confirmationCodeController.text.length > 1) { + code = confirmationCodeController.text.toString(); + } + }); + + + return WillPopScope( + onWillPop: () async { + Navigator.push(context, MaterialPageRoute(builder: (context) => LoginScreen())); + return false; + }, + child: Scaffold( + body: Background( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + + widget.isSignUpComplete ? + + Column( + children: [ + + Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.symmetric(horizontal: 40), + child: const Text( + "CODE", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Color(0xFF2661FA), + fontSize: 36 + ), + textAlign: TextAlign.left, + ), + ), + + SizedBox(height: size.height * 0.03), + + Container( + alignment: Alignment.center, + margin: const EdgeInsets.symmetric(horizontal: 40), + child: TextField( + controller: confirmationCodeController, + keyboardType: TextInputType.emailAddress, + decoration: const InputDecoration( + labelText: "Code" + ), + ), + ), + + SizedBox(height: size.height * 0.05), + + ], + ) + : + + Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.symmetric(horizontal: 40), + child: const Text( + "REGISTER", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Color(0xFF2661FA), + fontSize: 36 + ), + textAlign: TextAlign.left, + ), + ), + + SizedBox(height: size.height * 0.03), + + Container( + alignment: Alignment.center, + margin: const EdgeInsets.symmetric(horizontal: 40), + child: TextField( + controller: emailController, + keyboardType: TextInputType.emailAddress, + decoration: const InputDecoration( + labelText: "Email" + ), + ), + ), + + SizedBox(height: size.height * 0.03), + + Container( + alignment: Alignment.center, + margin: const EdgeInsets.symmetric(horizontal: 40), + child: TextField( + controller: passwordController, + decoration: const InputDecoration( + labelText: "Password" + ), + obscureText: true, + ), + ), + + SizedBox(height: size.height * 0.05), + + Container( + alignment: Alignment.centerRight, + margin: const EdgeInsets.symmetric(horizontal: 40, vertical: 10), + child: ElevatedButton( + onPressed: () { + widget.isSignUpComplete + ? verifyCode(code, widget.email) + : registerUser(email, password); + }, + style: ElevatedButton.styleFrom( + elevation: 0, + padding: const EdgeInsets.all(0), + textStyle: const TextStyle(color: Colors.white), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(80.0)) + ), + child: Container( + alignment: Alignment.center, + height: 50.0, + width: size.width * 0.5, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(80.0), + gradient: const LinearGradient( + colors: [ + Color.fromARGB(255, 255, 136, 34), + Color.fromARGB(255, 255, 177, 41) + ] + ) + ), + padding: const EdgeInsets.all(0), + child: Text( + widget.isSignUpComplete ? "CONFIRM" : "SIGNUP", + textAlign: TextAlign.center, + style: const TextStyle( + fontWeight: FontWeight.bold + ), + ), + ), + ), + ), + + Container( + alignment: Alignment.centerRight, + margin: const EdgeInsets.symmetric(horizontal: 40, vertical: 10), + child: GestureDetector( + onTap: () => { + Navigator.push(context, MaterialPageRoute(builder: (context) => const LoginScreen())) + }, + child: const Text( + "Already Have an Account? Sign in", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Color(0xFF2661FA) + ), + ), + ), + ) + + ], + ), + ), + ), + ); + } +} diff --git a/lib/screens/welcome/WelcomeScreen.dart b/lib/screens/welcome/WelcomeScreen.dart new file mode 100644 index 0000000..08b3612 --- /dev/null +++ b/lib/screens/welcome/WelcomeScreen.dart @@ -0,0 +1,132 @@ +import 'dart:async'; + +import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; +import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_native_splash/flutter_native_splash.dart'; +import 'package:moviechitchat/models/Movie.dart'; +import 'package:moviechitchat/screens/welcome/welcomewidgets/WelcomeBackground.dart'; +import 'package:moviechitchat/screens/welcome/welcomewidgets/WelcomeButtons.dart'; +import 'package:moviechitchat/screens/welcome/welcomewidgets/WelcomeResponsive.dart'; +import 'package:moviechitchat/screens/welcome/welcomewidgets/WelcomeWidget.dart'; +import 'package:moviechitchat/viewmodels/MovieListViewModel.dart'; +import 'package:provider/provider.dart'; + +import '../../viewmodels/MessageListViewModel.dart'; +import '../chatlist/ChatListScreen.dart'; + + +class WelcomeScreen extends StatefulWidget { + const WelcomeScreen({Key? key}) : super(key: key); + + @override + State createState() => _WelcomeScreenState(); +} + +class _WelcomeScreenState extends State { + + double value = 0; + + @override + void initState() { + WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); + FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding); + + Timer(const Duration(seconds: 2), (){ + checkCurrentUser(context); + }); + + super.initState(); + } + + + + Future checkCurrentUser(BuildContext context) async { + try { + AuthUser awsUser = await Amplify.Auth.getCurrentUser(); + navigationToChatScreen(awsUser.userId, awsUser.username, context); + FlutterNativeSplash.remove(); + setState(() { + value = 1; + }); + } on AuthException catch (e) { + setState(() { + value = 1; + }); + FlutterNativeSplash.remove(); + } + } + + + Future navigationToChatScreen(String userId, String username, BuildContext context) async { + var movieViewModel = Provider.of(context, listen: false); + var messageViewModel = Provider.of(context, listen: false); + + Stream> movies = movieViewModel.observeMovies(); + + Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute( + builder: (BuildContext context) { + return ChangeNotifierProvider( + create: (_) => MessageListViewModel(), + child: ChatListScreen(userId, movies, messageViewModel, username), + ); + }, + ), (Route route) => false); + } + + + @override + Widget build(BuildContext context) { + + return WelcomeBackground( + child: SingleChildScrollView( + child: SafeArea( + child: value == 0 ? + const Center( + child: CircularProgressIndicator(), + ) + : + Responsive( + desktop: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + const Expanded( + child: WelcomeImage(), + ), + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: const [ + SizedBox( + width: 450, + child: LoginAndSignupBtn(), + ), + ], + ), + ), + ], + ), + mobile: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const WelcomeImage(), + Row( + children: const [ + Spacer(), + Expanded( + flex: 8, + child: LoginAndSignupBtn(), + ), + Spacer(), + ], + ), + ], + ), + ), + ), + ), + ); + } + + +} diff --git a/lib/screens/welcome/welcomewidgets/LoginRegisterBG.dart b/lib/screens/welcome/welcomewidgets/LoginRegisterBG.dart new file mode 100644 index 0000000..731c24d --- /dev/null +++ b/lib/screens/welcome/welcomewidgets/LoginRegisterBG.dart @@ -0,0 +1,66 @@ +import 'package:flutter/material.dart'; + +class Background extends StatelessWidget { + final Widget child; + + const Background({ + Key? key, + required this.child, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + + return SizedBox( + width: double.infinity, + height: size.height, + child: Stack( + alignment: Alignment.center, + children: [ + Positioned( + top: 0, + right: 0, + child: Image.asset( + "assets/images/topLogin.png", + width: size.width + ), + ), + Positioned( + top: 0, + right: 0, + child: Image.asset( + "assets/images/topRegister.png", + width: size.width + ), + ), + Positioned( + top: 40, + right: 30, + child: Image.asset( + "assets/images/hashnode.png", + width: size.width * 0.25 + ), + ), + Positioned( + bottom: 0, + right: 0, + child: Image.asset( + "assets/images/bottomLogin.png", + width: size.width + ), + ), + Positioned( + bottom: 0, + right: 0, + child: Image.asset( + "assets/images/bottomRegister.png", + width: size.width + ), + ), + child + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/welcome/welcomewidgets/WelcomeBackground.dart b/lib/screens/welcome/welcomewidgets/WelcomeBackground.dart new file mode 100644 index 0000000..9ab1471 --- /dev/null +++ b/lib/screens/welcome/welcomewidgets/WelcomeBackground.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; + +class WelcomeBackground extends StatelessWidget { + final Widget child; + const WelcomeBackground({ + Key? key, + required this.child, + this.topImage = "assets/images/welcomeTop.png", + this.bottomImage = "assets/images/welcomeBottom.png", + }) : super(key: key); + + final String topImage, bottomImage; + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + body: Container( + width: double.infinity, + height: MediaQuery.of(context).size.height, + child: Stack( + alignment: Alignment.center, + children: [ + Positioned( + top: 0, + left: 0, + child: Image.asset( + topImage, + width: 120, + ), + ), + SafeArea(child: child), + ], + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/screens/welcome/welcomewidgets/WelcomeButtons.dart b/lib/screens/welcome/welcomewidgets/WelcomeButtons.dart new file mode 100644 index 0000000..e5f5432 --- /dev/null +++ b/lib/screens/welcome/welcomewidgets/WelcomeButtons.dart @@ -0,0 +1,68 @@ +import 'package:flutter/material.dart'; +import 'package:moviechitchat/screens/welcome/LoginScreen.dart'; +import 'package:moviechitchat/screens/welcome/RegisterScreen.dart'; + + + +class LoginAndSignupBtn extends StatelessWidget { + const LoginAndSignupBtn({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + SizedBox( + width: MediaQuery.of(context).size.width / 1.7, + child: Hero( + tag: "login_btn", + child: ElevatedButton( + style: ElevatedButton.styleFrom( + shape: const StadiumBorder(), + ), + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) { + return const LoginScreen(); + }, + ), + ); + }, + child: Text( + "Login".toUpperCase(), + ), + ), + ), + ), + const SizedBox(height: 16), + SizedBox( + width: MediaQuery.of(context).size.width / 1.7, + child: ElevatedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) { + return RegisterScreen(); + }, + ), + ); + }, + style: ElevatedButton.styleFrom( + primary: const Color(0xFFF1E6FF), + elevation: 0, + shape: const StadiumBorder(), + ), + child: Text( + "Sign Up".toUpperCase(), + style: const TextStyle(color: Colors.black), + ), + ), + ), + ], + ); + } +} diff --git a/lib/screens/welcome/welcomewidgets/WelcomeResponsive.dart b/lib/screens/welcome/welcomewidgets/WelcomeResponsive.dart new file mode 100644 index 0000000..b400304 --- /dev/null +++ b/lib/screens/welcome/welcomewidgets/WelcomeResponsive.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; + +class Responsive extends StatelessWidget { + final Widget mobile; + final Widget? tablet; + final Widget desktop; + + const Responsive({ + Key? key, + required this.mobile, + this.tablet, + required this.desktop, + }) : super(key: key); + + static bool isMobile(BuildContext context) => + MediaQuery.of(context).size.width < 576; + + static bool isTablet(BuildContext context) => + MediaQuery.of(context).size.width >= 576 && + MediaQuery.of(context).size.width <= 992; + + static bool isDesktop(BuildContext context) => + MediaQuery.of(context).size.width > 992; + + @override + Widget build(BuildContext context) { + final Size size = MediaQuery.of(context).size; + if (size.width > 992) { + return desktop; + } else if (size.width >= 576 && tablet != null) { + return tablet!; + } else { + return mobile; + } + } +} diff --git a/lib/screens/welcome/welcomewidgets/WelcomeWidget.dart b/lib/screens/welcome/welcomewidgets/WelcomeWidget.dart new file mode 100644 index 0000000..0eb3989 --- /dev/null +++ b/lib/screens/welcome/welcomewidgets/WelcomeWidget.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; + +class WelcomeImage extends StatelessWidget { + const WelcomeImage({ + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + const Text( + "Welcome To Movie Chit-Chat", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18), + ), + const SizedBox(height: 16.0 * 2), + Row( + children: [ + const Spacer(), + Expanded( + flex: 8, + child: Image.asset( + "assets/images/welcomeImage.png", + ), + ), + const Spacer(), + ], + ), + const SizedBox(height: 16.0 * 2), + ], + ); + } +} \ No newline at end of file diff --git a/lib/utils/CommonUtils.dart b/lib/utils/CommonUtils.dart new file mode 100644 index 0000000..53d96fa --- /dev/null +++ b/lib/utils/CommonUtils.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; + +class CommonUtils { + + /* Toast/SnackBar */ + static void showSnackBar(String message, BuildContext context) { + final snackBar = SnackBar( + content: Text(message), + backgroundColor: Colors.blueAccent, + behavior: SnackBarBehavior.floating, + margin: const EdgeInsets.all(50), + elevation: 30, + ); + ScaffoldMessenger.of(context).showSnackBar(snackBar); + } + + /* Getting Current time in hours and min */ + static String getCurrentTime(){ + return "${DateFormat.jm().format(DateTime.now())}"; + } + +} \ No newline at end of file diff --git a/lib/utils/Constants.dart b/lib/utils/Constants.dart new file mode 100644 index 0000000..b2dd723 --- /dev/null +++ b/lib/utils/Constants.dart @@ -0,0 +1,5 @@ +class Constants { + + static const imgBaseUrl = "https://image.tmdb.org/t/p/w500"; + +} \ No newline at end of file diff --git a/lib/utils/StarCalculator.dart b/lib/utils/StarCalculator.dart new file mode 100644 index 0000000..bb11459 --- /dev/null +++ b/lib/utils/StarCalculator.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'package:moviechitchat/screens/moviedetails/moviedetailswidget/StarIcon.dart'; + +List getStars({required double? rating, required double starSize}) { + List temp = []; + if (rating != null) { + for (var i = 0; i < rating ~/ 2; i++) { + //(rating/2).toInt() == rating ~/ 2 + temp.add(StarIcon( + icon: Icons.star, + size: starSize, + )); + } + if (rating > 0 && rating % 2 != 0) { + temp.add(StarIcon( + icon: Icons.star_half, + size: starSize, + )); + } + while (temp.length < 5) { + temp.add(StarIcon( + icon: Icons.star_border, + size: starSize, + )); + } + } + return temp; +} \ No newline at end of file diff --git a/lib/viewmodels/MessageListViewModel.dart b/lib/viewmodels/MessageListViewModel.dart new file mode 100644 index 0000000..90ea084 --- /dev/null +++ b/lib/viewmodels/MessageListViewModel.dart @@ -0,0 +1,34 @@ +import 'package:amplify_datastore/amplify_datastore.dart'; +import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:moviechitchat/models/Movie.dart'; +import 'package:moviechitchat/utils/CommonUtils.dart'; + +import '../models/Message.dart'; + +class MessageListViewModel with ChangeNotifier{ + + + Stream> observeMessages(String movieId){ + return Amplify.DataStore.observeQuery(Message.classType, where: Message.MOVIEID.eq(movieId)); + } + + /* Adding Message */ + Future addMessage(String message, String fromId, String movieId, String fromName) async { + String time = CommonUtils.getCurrentTime(); + Message messageToSave = Message(message: message, fromId: fromId, movieId: movieId, timestamp: CommonUtils.getCurrentTime(), fromUsername: fromName); + await Amplify.DataStore.save(messageToSave); + await updateMovieLatestMessage(movieId, message, time); + notifyListeners(); + } + + /* Recent Message on home */ + Future updateMovieLatestMessage(String movieId, String message, String time) async { + // To get the movie + Movie movie = (await Amplify.DataStore.query(Movie.classType, where: Movie.ID.eq(movieId)))[0]; + // To update the movie + Movie updatedMovie = movie.copyWith(id: movie.id, recentMessage: message, recentMessageTim: time); + // To save the movie + await Amplify.DataStore.save(updatedMovie); + } +} \ No newline at end of file diff --git a/lib/viewmodels/MovieListViewModel.dart b/lib/viewmodels/MovieListViewModel.dart new file mode 100644 index 0000000..3189d28 --- /dev/null +++ b/lib/viewmodels/MovieListViewModel.dart @@ -0,0 +1,12 @@ +import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:flutter/material.dart'; + +import '../models/Movie.dart'; + +class MovieListViewModel with ChangeNotifier{ + + Stream> observeMovies(){ + return Amplify.DataStore.observeQuery(Movie.classType); + } + +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..418d551 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,698 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + amplify_analytics_pinpoint: + dependency: "direct main" + description: + name: amplify_analytics_pinpoint + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_analytics_pinpoint_android: + dependency: transitive + description: + name: amplify_analytics_pinpoint_android + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_analytics_pinpoint_ios: + dependency: transitive + description: + name: amplify_analytics_pinpoint_ios + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_api: + dependency: "direct main" + description: + name: amplify_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_api_android: + dependency: transitive + description: + name: amplify_api_android + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_api_ios: + dependency: transitive + description: + name: amplify_api_ios + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_auth_cognito: + dependency: "direct main" + description: + name: amplify_auth_cognito + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_auth_cognito_android: + dependency: transitive + description: + name: amplify_auth_cognito_android + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_auth_cognito_ios: + dependency: transitive + description: + name: amplify_auth_cognito_ios + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_core: + dependency: transitive + description: + name: amplify_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_datastore: + dependency: "direct main" + description: + name: amplify_datastore + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_datastore_plugin_interface: + dependency: transitive + description: + name: amplify_datastore_plugin_interface + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_flutter: + dependency: "direct main" + description: + name: amplify_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_flutter_android: + dependency: transitive + description: + name: amplify_flutter_android + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + amplify_flutter_ios: + dependency: transitive + description: + name: amplify_flutter_ios + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.8" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.1" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.9.0" + aws_common: + dependency: transitive + description: + name: aws_common + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.2" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.5" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.16.0" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.2" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + emoji_picker_flutter: + dependency: "direct main" + description: + name: emoji_picker_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_blurhash: + dependency: transitive + description: + name: flutter_blurhash + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.0" + flutter_launcher_icons: + dependency: "direct main" + description: + name: flutter_launcher_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + flutter_native_splash: + dependency: "direct main" + description: + name: flutter_native_splash + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.10+1" + flutter_spinkit: + dependency: "direct main" + description: + name: flutter_spinkit + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + get: + dependency: "direct main" + description: + name: get + url: "https://pub.dartlang.org" + source: hosted + version: "4.6.5" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.15.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.5" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.1" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.4" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "4.7.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + octo_image: + dependency: transitive + description: + name: octo_image + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.2" + path_provider: + dependency: "direct main" + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.20" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.7" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.4" + provider: + dependency: "direct main" + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.3" + rxdart: + dependency: transitive + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.27.5" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.15" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + shared_preferences_macos: + dependency: transitive + description: + name: shared_preferences_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.0" + sqflite: + dependency: transitive + description: + name: sqflite + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + synchronized: + dependency: transitive + description: + name: synchronized + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0+3" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.12" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + universal_io: + dependency: transitive + description: + name: universal_io + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.4" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + win32: + dependency: transitive + description: + name: win32 + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0+2" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" +sdks: + dart: ">=2.18.0 <3.0.0" + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..0c7f8be --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,113 @@ +name: moviechitchat +description: A new Flutter project. + +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=2.18.0 <3.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + get: ^4.6.5 + flutter_native_splash: ^2.2.9 + flutter_spinkit: ^5.1.0 + cached_network_image: ^3.2.2 + path_provider: ^2.0.11 + provider: ^6.0.3 + amplify_flutter: ^0.6.7 + amplify_auth_cognito: ^0.6.7 + amplify_analytics_pinpoint: ^0.6.7 + amplify_datastore: ^0.6.7 + amplify_api: ^0.6.7 + emoji_picker_flutter: ^1.3.1 + intl: ^0.17.0 + flutter_launcher_icons: ^0.10.0 + + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + assets: + - assets/icons/ + - assets/images/ + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages + +flutter_icons: + image_path: "assets/images/splashLogo.png" + android: true + ios: true + # optionally, as transparency is not allowed on app store + # remove_alpha_ios: true \ No newline at end of file diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..e65062d --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:moviechitchat/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +}