diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fa6b67 --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# 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/ + +# Web related +lib/generated_plugin_registrant.dart + +# 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 diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..0f055bf --- /dev/null +++ b/.metadata @@ -0,0 +1,10 @@ +# 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 and should not be manually edited. + +version: + revision: ffb2ecea5223acdd139a5039be2f9c796962833d + channel: stable + +project_type: app diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cf5270f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "dart.flutterRunAdditionalArgs": [ + "--no-sound-null-safety" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b0c6f3d --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# skillshare + +A the social media app to showcase your skills + +## 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://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. + +Technologies Used: + +
+
+Framework : Flutter
+Database : Firebase
+
+
+ + Features : + +1. User can login through App with email and password. +2. User can create account with gmail and login with gmail account also. +3. User can share images with other and upload a post with caption. + + Upcoming Features : + +1. User can chat with ther users. +2. User can like, comment and Give rewards to other's Post. +3. User can share videos, pdfs, links and more. + +Screenshots : + +1. Welcome Screen + ![alt text](https://github.com/codewithmitesh/shareSKILLS/blob/main/Screenshots/WelcomeScreen.jpeg) + +2. Login Screen: + ![alt text](https://github.com/codewithmitesh/shareSKILLS/blob/main/Screenshots/LoginSS.jpeg) +3. Create Account: + ![alt text](https://github.com/codewithmitesh/shareSKILLS/blob/main/Screenshots/CreateAccountSS.jpeg) +4. Feed + ![alt text](https://github.com/codewithmitesh/shareSKILLS/blob/main/Screenshots/Feed.jpeg) +5. User Profile: + ![alt text](https://github.com/codewithmitesh/shareSKILLS/blob/main/Screenshots/UserProfile.jpeg) +6. Upload Post: + ![alt text](https://github.com/codewithmitesh/shareSKILLS/blob/main/Screenshots/UploadPost.jpeg) +7. Add Caption: + ![alt text](https://github.com/codewithmitesh/shareSKILLS/blob/main/Screenshots/CaptionShare.jpeg) +8. Logout: + ![alt text](https://github.com/codewithmitesh/shareSKILLS/blob/main/Screenshots/LogoutPopup.jpeg) diff --git a/Screenshots/CaptionShare.jpeg b/Screenshots/CaptionShare.jpeg new file mode 100644 index 0000000..8f85c4d Binary files /dev/null and b/Screenshots/CaptionShare.jpeg differ diff --git a/Screenshots/CreateAccountSS.jpeg b/Screenshots/CreateAccountSS.jpeg new file mode 100644 index 0000000..abd124a Binary files /dev/null and b/Screenshots/CreateAccountSS.jpeg differ diff --git a/Screenshots/Feed.jpeg b/Screenshots/Feed.jpeg new file mode 100644 index 0000000..6637350 Binary files /dev/null and b/Screenshots/Feed.jpeg differ diff --git a/Screenshots/LoginSS.jpeg b/Screenshots/LoginSS.jpeg new file mode 100644 index 0000000..b48fe33 Binary files /dev/null and b/Screenshots/LoginSS.jpeg differ diff --git a/Screenshots/LogoutPopup.jpeg b/Screenshots/LogoutPopup.jpeg new file mode 100644 index 0000000..2d040a8 Binary files /dev/null and b/Screenshots/LogoutPopup.jpeg differ diff --git a/Screenshots/UploadPost.jpeg b/Screenshots/UploadPost.jpeg new file mode 100644 index 0000000..7129692 Binary files /dev/null and b/Screenshots/UploadPost.jpeg differ diff --git a/Screenshots/UserProfile.jpeg b/Screenshots/UserProfile.jpeg new file mode 100644 index 0000000..76acc3f Binary files /dev/null and b/Screenshots/UserProfile.jpeg differ diff --git a/Screenshots/WelcomeScreen.jpeg b/Screenshots/WelcomeScreen.jpeg new file mode 100644 index 0000000..2dd55e0 Binary files /dev/null and b/Screenshots/WelcomeScreen.jpeg differ 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..ae1896b --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,73 @@ +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" +apply plugin: 'com.google.gms.google-services' + + + +android { + compileSdkVersion 31 + + 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.example.skillshare" + minSdkVersion 19 // before 21 + targetSdkVersion 30 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + multiDexEnabled true + } + + 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" + implementation 'com.android.support:multidex:1.0.3' +} \ No newline at end of file diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..2c39151 --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,39 @@ +{ + "project_info": { + "project_number": "909663152017", + "project_id": "skillshare-56173", + "storage_bucket": "skillshare-56173.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:909663152017:android:c399fa8cde3c9c5e951c30", + "android_client_info": { + "package_name": "com.example.skillshare" + } + }, + "oauth_client": [ + { + "client_id": "909663152017-u581ofhj1lvvi8ukpuk069kliia65vcp.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyCzLXcBtOowEnjrW69xnh-ltWA0dkGKDZc" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "909663152017-u581ofhj1lvvi8ukpuk069kliia65vcp.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..36dbcd5 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..40422f9 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/skillshare/MainActivity.kt b/android/app/src/main/kotlin/com/example/skillshare/MainActivity.kt new file mode 100644 index 0000000..60c2c04 --- /dev/null +++ b/android/app/src/main/kotlin/com/example/skillshare/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.skillshare + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} 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..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + 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..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + 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..db77bb4 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..17987b7 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..09d4391 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..d5f1c8d 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..4d6372e 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..449a9f9 --- /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/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..d74aa35 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..db113fb --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..e0529d1 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,30 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.1.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" + classpath 'com.google.gms:google-services:4.3.8' + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" + 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..84d1f85 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists 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/Fonts/Poppins-Regular.ttf b/assets/Fonts/Poppins-Regular.ttf new file mode 100644 index 0000000..9f0c71b Binary files /dev/null and b/assets/Fonts/Poppins-Regular.ttf differ diff --git a/assets/Images/2020.png b/assets/Images/2020.png new file mode 100644 index 0000000..25019f3 Binary files /dev/null and b/assets/Images/2020.png differ diff --git a/assets/Images/SignUpImage.png b/assets/Images/SignUpImage.png new file mode 100644 index 0000000..ae1f49c Binary files /dev/null and b/assets/Images/SignUpImage.png differ diff --git a/assets/Images/Snowman.png b/assets/Images/Snowman.png new file mode 100644 index 0000000..b14f8f8 Binary files /dev/null and b/assets/Images/Snowman.png differ diff --git a/assets/Images/background.png b/assets/Images/background.png new file mode 100644 index 0000000..a67b6e5 Binary files /dev/null and b/assets/Images/background.png differ diff --git a/assets/Images/connected.png b/assets/Images/connected.png new file mode 100644 index 0000000..419d26c Binary files /dev/null and b/assets/Images/connected.png differ diff --git a/assets/Images/shareSKILLS.png b/assets/Images/shareSKILLS.png new file mode 100644 index 0000000..92f09b2 Binary files /dev/null and b/assets/Images/shareSKILLS.png differ diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..151026b --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,33 @@ +*.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..8d4492f --- /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 + 9.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..7ee453b --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,471 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 = 1020; + 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 = 9.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.example.skillshare; + 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 = 9.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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + 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.example.skillshare; + 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.example.skillshare; + 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 */; +} 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..a28140c --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..dc9ada4 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..28c6bf0 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..2ccbfd9 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..f091b6b 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..4cde121 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..d0ef06e 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..dcdc230 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..2ccbfd9 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..c8f9ed8 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..a6d6b86 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-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 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..75b2d16 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-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d 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..6a84f41 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..d0e1f58 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/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} 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..9da19ea 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..9da19ea 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..9da19ea 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..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..d7f38c1 --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + skillshare + 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 + + + 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/Authenticate/create_account.dart b/lib/Authenticate/create_account.dart new file mode 100644 index 0000000..3119e42 --- /dev/null +++ b/lib/Authenticate/create_account.dart @@ -0,0 +1,183 @@ +// ignore_for_file: avoid_unnecessary_containers, prefer_const_constructors_in_immutables, implementation_imports, prefer_const_literals_to_create_immutables, avoid_print + +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:provider/src/provider.dart'; +import 'package:skillshare/Controlls/control_utils.dart'; +import 'package:skillshare/Screens/home.dart'; +import '../Controlls/control_services.dart'; +import '../Services/auth.dart'; +import '../Services/firebase_operations.dart'; +import '../Widgets/imagepicker.dart'; + +// ignore_for_file: prefer_const_constructors +// ignore_for_file: lowercase_with_underscore +class SignUpPage extends StatefulWidget { + SignUpPage({Key? key}) : super(key: key); + + @override + State createState() => _SignUpPageState(); +} + +class _SignUpPageState extends State with ChangeNotifier { + final TextEditingController emailController = TextEditingController(); + final TextEditingController nameController = TextEditingController(); + final TextEditingController passController = TextEditingController(); + + var pickUserAV = new ControlUtils(); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: + //* Logic of Email And Pass Field Complete + Padding( + padding: const EdgeInsets.all(10.0), + child: ListView( + // mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.only(top: 75, bottom: 0, left: 15), + child: GestureDetector( + onTap: () { + pickUserAV + .pickUserAvatar(context, ImageSource.gallery) + .whenComplete(() { + Navigator.pop(context); + Provider.of(context, listen: false) + .showUserAvatar(context); + }); + }, + child: CircleAvatar( + backgroundColor: Colors.black, + backgroundImage: FileImage( + Provider.of(context, listen: false) + .getUserAvatar), + radius: 60, + ), + ), + ), + const SizedBox( + height: 30, + ), + Container( + width: 360, + child: TextField( + controller: nameController, + decoration: const InputDecoration( + icon: Icon(Icons.person), + border: OutlineInputBorder(), + labelText: 'Name', + hintText: 'Enter your name', + ), + ), + ), + const SizedBox( + height: 10, + ), + Container( + width: 360, + child: TextField( + controller: emailController, + decoration: const InputDecoration( + icon: Icon(Icons.email), + border: OutlineInputBorder(), + labelText: 'Email', + hintText: 'Enter Email', + ), + ), + ), + const SizedBox( + height: 10, + ), + Container( + width: 360, + child: TextField( + obscureText: true, + controller: passController, + decoration: const InputDecoration( + icon: Icon(Icons.password), + border: OutlineInputBorder(), + labelText: 'Password', + hintText: 'Enter Password', + ), + ), + ), + SizedBox( + height: 15, + ), + Container( + child: Row( + children: [ + Text('Already have an account?'), + SizedBox( + width: 90, + child: TextButton( + // textColor: Colors.blue, + child: const Text( + 'Login', + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.bold, + ), + ), + onPressed: () { + Navigator.pop(context); + }, + ), + ), + ], + mainAxisAlignment: MainAxisAlignment.center, + ), + ), + Container( + height: 50, + width: 380, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + child: ElevatedButton( + // textColor: Colors.white, + // color: Colors.grey, + child: Text( + 'Sign Up', + style: TextStyle(fontWeight: FontWeight.w900), + ), + onPressed: () { + if (emailController.text.isNotEmpty) { + Provider.of(context, listen: false) + .createAccount( + emailController.text, passController.text) + .whenComplete(() => { + print("Creating Collection"), + Provider.of(context, + listen: false) + .createUserCollections(context, { + 'userId': Provider.of(context, + listen: false) + .getUserUid, + 'userName': nameController.text, + 'userEmail': emailController.text, + 'userImage': Provider.of(context, + listen: false) + .getUserAvatarUrl, + }) + }) + .whenComplete(() { + Navigator.pushReplacement( + context, + PageTransition( + child: HomeProfile(), + type: PageTransitionType.bottomToTop)); + }); + } else { + print("Please Provide the proper email address !!!"); + } + }, + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/Authenticate/landing_helper.dart b/lib/Authenticate/landing_helper.dart new file mode 100644 index 0000000..78cca55 --- /dev/null +++ b/lib/Authenticate/landing_helper.dart @@ -0,0 +1,6 @@ +import 'package:flutter/material.dart'; + +class LandingHelpers with ChangeNotifier { + + +} \ No newline at end of file diff --git a/lib/Authenticate/login_page.dart b/lib/Authenticate/login_page.dart new file mode 100644 index 0000000..5301fcf --- /dev/null +++ b/lib/Authenticate/login_page.dart @@ -0,0 +1,152 @@ +// ignore_for_file: avoid_unnecessary_containers, prefer_const_constructors_in_immutables, implementation_imports, avoid_print + +import 'package:flutter/material.dart'; +import 'package:flutter_signin_button/button_view.dart'; +import 'package:flutter_signin_button/flutter_signin_button.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:provider/src/provider.dart'; +import 'package:skillshare/Authenticate/create_account.dart'; +import 'package:skillshare/Screens/home.dart'; +import 'create_account.dart'; +import '../Services/auth.dart'; +// ignore_for_file: prefer_const_constructors +// ignore_for_file: lowercase_with_underscore + +//Login page Statefull Widget +class LoginPage extends StatefulWidget { + LoginPage(BuildContext context, {Key? key}) : super(key: key); + + @override + State createState() => _LoginPageState(); +} + +class _LoginPageState extends State with ChangeNotifier { + // final Authentication _auth = new Authentication(); + + final TextEditingController emailControllerForLogin = TextEditingController(); + final TextEditingController passControllerForLogin = TextEditingController(); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Padding( + padding: EdgeInsets.all(10), + child: ListView( + children: [ + Container( + alignment: Alignment.center, + padding: + const EdgeInsets.symmetric(horizontal: 100, vertical: 30), + child: Image.asset('assets/Images/shareSKILLS.png'), + ), + Container( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + SizedBox( + height: 10, + ), + TextField( + controller: emailControllerForLogin, + decoration: const InputDecoration( + icon: Icon(Icons.person), + border: OutlineInputBorder(), + labelText: 'Email', + hintText: 'Enter Email', + ), + ), + const SizedBox(height: 10), + TextField( + obscureText: true, + controller: passControllerForLogin, + decoration: const InputDecoration( + icon: Icon(Icons.password), + border: OutlineInputBorder(), + labelText: 'Password', + hintText: 'Enter Password', + ), + ), + ], + ), + ), + TextButton( + onPressed: () { + //forgot password screen + }, + child: Text('Forgot Password'), + ), + Container( + height: 50, + padding: EdgeInsets.fromLTRB(10, 0, 10, 0), + child: ElevatedButton( + // style: , + // color: Colors.grey, + child: Text( + 'Login', + style: TextStyle(fontWeight: FontWeight.bold), + ), + onPressed: () { + if (emailControllerForLogin.text.isNotEmpty) { + Provider.of(context, listen: false) + .logIntoAccount(emailControllerForLogin.text, + passControllerForLogin.text) + .whenComplete(() => { + Navigator.pushReplacement( + context, + PageTransition( + child: HomeProfile(), + type: PageTransitionType.leftToRight, + )) + }); + } else { + print('Please Provide Proper Emails'); + } + }, + ), + ), + Container( + child: Row( + children: [ + Text('Dont have an account?'), + TextButton( + // textColor: Colors.blue, + child: Text( + 'Create Account', + style: TextStyle(fontSize: 15), + ), + onPressed: () { + Navigator.push( + context, + PageTransition( + child: SignUpPage(), + type: PageTransitionType.rightToLeft), + ); + }, + ), + ], + mainAxisAlignment: MainAxisAlignment.center, + ), + ), + SignInButton( + Buttons.Google, + onPressed: () { + Provider.of(context, listen: false) + .signInWithGoogle() + .whenComplete(() { + Navigator.pushReplacement( + context, + PageTransition( + child: HomeProfile(), + type: PageTransitionType.leftToRight)); + }); + }, + ), + Image.asset('assets/Images/connected.png'), + ], + ), + ), + ); + } +} +// * Beware ful whichever widget we use Provider we need to add ' with changeNotifier ' + diff --git a/lib/Controlls/UploadPost.dart b/lib/Controlls/UploadPost.dart new file mode 100644 index 0000000..d3523a7 --- /dev/null +++ b/lib/Controlls/UploadPost.dart @@ -0,0 +1,306 @@ +// ignore_for_file: prefer_const_literals_to_create_immutables, prefer_const_constructors, avoid_print, avoid_unnecessary_containers + +// import 'dart:io'; +import 'dart:io'; +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_storage/firebase_storage.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Services/firebase_operations.dart'; + +import '../Services/auth.dart'; + +class UploadPost with ChangeNotifier { + TextEditingController captionController = TextEditingController(); + + PostScreen(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: Container( + child: Column( + children: [ + SizedBox( + height: MediaQuery.of(context).size.height * 0.35, + ), + Text( + "Please Select Your Image ", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.bold, + fontSize: 25, + ), + ), + Center( + child: ElevatedButton( + child: Icon(Icons.image), + onPressed: () { + pickUploadPostImage(context, ImageSource.gallery); + // Provider.of(context, listen: false) + // .pickUploadPostImage(context, ImageSource.gallery) + // .whenComplete(() { + // initialImage = + // Provider.of(context, listen: false) + // .uploadPostImage; + // }); + }), + ), + CircleAvatar( + backgroundColor: Colors.green, + radius: 80.0, + backgroundImage: FileImage(uploadPostImage), + ), + ElevatedButton( + child: Icon(Icons.upload), + onPressed: () { + // Navigator.push( + // context, + // PageTransition( + // child: editPostSheet(context), + // type: PageTransitionType.bottomToTop)); + + // Original Code + uploadPostImagetoFIrebase().whenComplete(() { + Navigator.push( + context, + PageTransition( + child: editPostSheet(context), + type: PageTransitionType.bottomToTop)); + + print("Image Uploaded Successfully!!"); + }); + }), + ElevatedButton( + child: Icon(Icons.backspace_outlined), + onPressed: () { + Navigator.pop(context); + }, + ) + ], + ), + ), + ); + } + + selectPostImageType(BuildContext context) { + return showModalBottomSheet( + context: context, + builder: (context) { + return Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 150), + child: Divider( + thickness: 4.0, + color: Colors.yellow, + ), + ), + Row( + children: [ + ElevatedButton( + child: Text("Gallery"), + onPressed: () {}, + ), + ElevatedButton(child: Text("Camera"), onPressed: () {}) + ], + ), + ], + ), + height: MediaQuery.of(context).size.height * 0.1, + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + color: Colors.blueAccent, + borderRadius: BorderRadius.circular(12.0), + ), + ); + }, + ); + } +// upload task Code for uploading thw task + + File uploadPostImage = File(""); + File get getUploadPostImage => uploadPostImage; + String uploadPostImageUrl = ""; + String get getUploadPostImageUrl => uploadPostImageUrl; + late UploadTask imagePostUploadTask; + + final picker = ImagePicker(); + + Future pickUploadPostImage(BuildContext context, ImageSource source) async { + final uploadPostImageVal = await picker.pickImage(source: source); + + if (uploadPostImageVal == null) { + print("Please Select the user avatar"); + return; + } else { + uploadPostImage = File(uploadPostImageVal.path); + } + print(uploadPostImageVal.path); + if (uploadPostImage != null) { + } else { + print("Image Upload Error!!!"); + } + notifyListeners(); + } + + Future uploadPostImagetoFIrebase() async { + Reference imageReference = FirebaseStorage.instance + .ref() + .child('posts/${uploadPostImage.path}/${TimeOfDay.now()}'); + + imagePostUploadTask = imageReference.putFile(uploadPostImage); + await imagePostUploadTask.whenComplete(() { + print("Post Image Uploaded Successfully to firsestore"); + }); + + imageReference.getDownloadURL().then((imageUrl) { + uploadPostImageUrl = imageUrl; + print(uploadPostImageUrl); + }); + notifyListeners(); + } + + editPostSheet(BuildContext context) { + return Scaffold( + body: Container( + child: SingleChildScrollView( + child: Column(children: [ + Padding( + padding: const EdgeInsets.only(left: 150, right: 150, top: 100), + child: Divider( + thickness: 4.0, + color: Colors.grey, + ), + ), + Container( + child: Row(children: [ + SizedBox( + height: 200, + width: 50, + ), + Container( + height: 190.0, + width: 300.0, + child: Image.file(uploadPostImage, fit: BoxFit.contain), + ) + ]), + ), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 30, + width: 30, + ), + Container( + height: 110, + width: 5.0, + color: Colors.grey, + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Container( + height: 120, + width: 330.0, + child: TextField( + maxLines: 5, + textCapitalization: TextCapitalization.words, + inputFormatters: [ + LengthLimitingTextInputFormatter(100) + ], + maxLengthEnforcement: MaxLengthEnforcement.enforced, + maxLength: 100, + controller: captionController, + style: TextStyle( + color: Colors.white, + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + decoration: InputDecoration( + hintText: 'Add Caption... ', + hintStyle: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ), + ], + ), + ), + MaterialButton( + onPressed: () async { + Provider.of(context, listen: false) + .uploadPostData(captionController.text, { + 'PostImage': getUploadPostImageUrl, + 'caption': captionController.text, + 'username': + Provider.of(context, listen: false) + .initUserName, + 'userImage': + Provider.of(context, listen: false) + .initUserImage, + 'userUid': Provider.of(context, listen: false) + .getUserUid, + 'time': Timestamp.now(), + 'useremail': + Provider.of(context, listen: false) + .initUserEmail, + }).whenComplete(() { + Navigator.pop(context); + }); + }, + child: Text("Share"), + color: Colors.deepOrange, + ), + ]), + ), + height: MediaQuery.of(context).size.height, + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), + ), + ), + ); + } +} + + // return showBottomSheet( + // context: context, + // builder: (context) { + // return Container( + // height: MediaQuery.of(context).size.height * 0.1, + // width: MediaQuery.of(context).size.width, + // decoration: BoxDecoration( + // color: Colors.yellowAccent, + // borderRadius: BorderRadius.circular(12), + // ), + // child: Column(children: [ + // Padding( + // padding: const EdgeInsets.symmetric(horizontal: 150.0), + // child: Divider( + // thickness: 4.0, + // color: Colors.white70, + // ), + // ), + // Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ + // MaterialButton( + // child: Text('Gallery'), + // onPressed: null, + // ), + // MaterialButton( + // child: Text('Camera'), + // onPressed: null, + // ) + // ]), + // ]), + // ); + // }, + // ); \ No newline at end of file diff --git a/lib/Controlls/control_services.dart b/lib/Controlls/control_services.dart new file mode 100644 index 0000000..e1d6937 --- /dev/null +++ b/lib/Controlls/control_services.dart @@ -0,0 +1,73 @@ +// ignore_for_file: prefer_const_literals_to_create_immutables, avoid_unnecessary_containers, prefer_const_constructors + +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Services/firebase_operations.dart'; + +import 'control_utils.dart'; + +class ControlServices with ChangeNotifier { + showUserAvatar(BuildContext context) { + return showModalBottomSheet( + context: context, + builder: (context) { + return Container( + height: MediaQuery.of(context).size.height * 0.30, + width: MediaQuery.of(context).size.width, + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 150), + child: Divider( + thickness: 4.0, + color: Colors.yellow, + ), + ), + CircleAvatar( + radius: 65, + backgroundColor: Colors.purpleAccent[700], + backgroundImage: FileImage( + Provider.of(context, listen: false) + .userAvatar, + ), + ), + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + ElevatedButton( + child: Text("Reselect"), + onPressed: () { + Provider.of(context, listen: false) + .pickUserAvatar(context, ImageSource.gallery); + }, + ), + ElevatedButton( + child: Text("Confirm"), + onPressed: () { + Provider.of(context, + listen: false) + .uploadUserAvatar(context) + .whenComplete(() { + // print( + // "The USer Avatar Image url => ${Provider.of(context, listen: false).userAvatarUrl}"); + Navigator.pop(context); + }); + }, + ) + ], + ), + ) + ], + ), + decoration: BoxDecoration( + color: Colors.blueGrey, + borderRadius: BorderRadius.circular(15.0), + ), + ); + }); + } + + notifyListeners(); +} diff --git a/lib/Controlls/control_utils.dart b/lib/Controlls/control_utils.dart new file mode 100644 index 0000000..f77feef --- /dev/null +++ b/lib/Controlls/control_utils.dart @@ -0,0 +1,96 @@ +// Controll_Utills is Landing Utills +// ignore_for_file: avoid_print +//! Notify Lister always comes after all Future Methods + +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Controlls/control_services.dart'; +import 'package:skillshare/Services/firebase_operations.dart'; + +class ControlUtils with ChangeNotifier { + final picker = ImagePicker(); + File userAvatar = File(""); + File get getUserAvatar => userAvatar; + String userAvatarUrl = ""; + String get getUserAvatarUrl => userAvatarUrl; + + // Noe Declaring Future For Picking the Image from file system + Future pickUserAvatar(BuildContext context, ImageSource source) async { + final pickedUserAvatar = await picker.pickImage(source: source); + if (pickedUserAvatar == null) { + print("Please Select the user avatar"); + return; + } else { + userAvatar = File(pickedUserAvatar.path); + } + + if (userAvatar != null) { + Provider.of(context, listen: false) + .showUserAvatar(context); + } else { + print("Image Upload Error!!!"); + } + + print(userAvatar.path); + + notifyListeners(); + } + + Future selectAvatarOptionSheet(BuildContext context) async { + return showBottomSheet( + context: context, + builder: (context) { + return Container( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 150), + child: Divider( + thickness: 4.0, + color: Colors.yellow, + ), + ), + Row( + children: [ + ElevatedButton( + child: Text("Gallery"), + onPressed: () { + pickUserAvatar(context, ImageSource.gallery) + .whenComplete(() { + Navigator.pop(context); + Provider.of(context, listen: false) + .showUserAvatar(context); + }); + }, + ), + ElevatedButton( + child: Text("Camera"), + onPressed: () { + pickUserAvatar(context, ImageSource.camera) + .whenComplete( + () { + Navigator.pop(context); + Provider.of(context, listen: false) + .showUserAvatar(context); + }, + ); + }) + ], + ), + ], + ), + height: MediaQuery.of(context).size.height * 0.1, + width: MediaQuery.of(context).size.width, + decoration: BoxDecoration( + color: Colors.blueAccent, + borderRadius: BorderRadius.circular(12.0), + ), + ); + }, + ); + } +} diff --git a/lib/OnboardingScreen/onboarding_screen.dart b/lib/OnboardingScreen/onboarding_screen.dart new file mode 100644 index 0000000..0fc4d19 --- /dev/null +++ b/lib/OnboardingScreen/onboarding_screen.dart @@ -0,0 +1,64 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:flutter/material.dart'; +import 'package:introduction_screen/introduction_screen.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:skillshare/Authenticate/login_page.dart'; + +class IntroScreen extends StatefulWidget { + const IntroScreen({Key? key}) : super(key: key); + + @override + State createState() => _IntroScreenState(); +} + +class _IntroScreenState extends State { + void _onIntroEnd(context) { + Navigator.of(context).push( + MaterialPageRoute(builder: (_) => LoginPage(context)), + ); + } + + List getpages() { + return [ + PageViewModel( + image: Image.network('https://picsum.photos/200'), + title: 'Welcome to Skill share', + body: 'Please Rate us On Playstore', + footer: Text("@copywrite 2022 | codewithmitesh"), + ), + PageViewModel( + image: Image.network('https://picsum.photos/200'), + title: 'Welcome to Skill share Again', + body: 'Please Rate us On Playstore', + footer: const Text("@copywrite 2022 | codewithmitesh"), + ), + PageViewModel( + image: Image.network('https://picsum.photos/200'), + title: 'Share your Skills', + body: 'Social media App to Showcase your skills', + footer: Text("@copywrite 2022 | codewithmitesh"), + ) + ]; + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: IntroductionScreen( + done: Text( + "Done", + style: TextStyle(color: Colors.black), + ), + onDone: () => _onIntroEnd(context), + // onDone: () { + // PageTransition( + // child: LoginPage(context), type: PageTransitionType.leftToRight); + // }, + pages: getpages(), + globalBackgroundColor: Colors.blue[50], + showNextButton: false, + ), + ); + } +} diff --git a/lib/Screens/chatroom.dart b/lib/Screens/chatroom.dart new file mode 100644 index 0000000..ec26955 --- /dev/null +++ b/lib/Screens/chatroom.dart @@ -0,0 +1,10 @@ +import 'package:flutter/material.dart'; + +class ChatRoom extends StatelessWidget { + const ChatRoom({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold(); + } +} diff --git a/lib/Screens/feed.dart b/lib/Screens/feed.dart new file mode 100644 index 0000000..ad8af5f --- /dev/null +++ b/lib/Screens/feed.dart @@ -0,0 +1,69 @@ +// ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables, non_constant_identifier_names, prefer_final_fields + +import 'package:flutter/material.dart'; +import 'package:like_button/like_button.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Screens/feedHelpers.dart'; +import 'package:skillshare/Screens/profile.dart'; + +import '../Controlls/UploadPost.dart'; + +// Tried with stateless widget +// class FeedPage2 extends StatelessWidget { +// const FeedPage2({Key? key}) : super(key: key); + +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// appBar: PreferredSize( +// preferredSize: const Size.fromHeight(100), +// child: Provider.of(context, listen: false).appBar(context), +// )); +// } +// } + +class SocialMedia extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: FeedPage(), + ); + } +} + +class FeedPage extends StatefulWidget { + @override + _FeedPageState createState() => _FeedPageState(); +} + +class _FeedPageState extends State { + int _selectedItemIndex = 0; + @override + Widget build(BuildContext context) { + return Scaffold( + drawer: Drawer(), + appBar: PreferredSize( + preferredSize: const Size.fromHeight(100), + child: + Provider.of(context, listen: false).appBar(context), + ), + body: + Provider.of(context, listen: false).FeedBody(context)); + } + + // // Story avatar widget + // Container buildStoryAvatar(String url) { + // return Container( + // margin: EdgeInsets.only(left: 18), + // height: 60, + // width: 60, + // padding: EdgeInsets.all(3), + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(30), color: Colors.red), + // child: CircleAvatar( + // radius: 18, + // backgroundImage: NetworkImage(url), + // ), + // ); + // } +} diff --git a/lib/Screens/feedHelpers.dart b/lib/Screens/feedHelpers.dart new file mode 100644 index 0000000..cd4462e --- /dev/null +++ b/lib/Screens/feedHelpers.dart @@ -0,0 +1,234 @@ +// ignore_for_file: prefer_const_literals_to_create_immutables, prefer_const_constructors, unnecessary_new + +// import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_storage/firebase_storage.dart'; +// import 'package:firebase/firestore.dart'; +import 'package:flutter/material.dart'; +import 'package:like_button/like_button.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Screens/post_screen.dart'; +import 'package:skillshare/Screens/profile.dart'; + +import '../Controlls/UploadPost.dart'; + +class FeedHelper with ChangeNotifier { + Widget appBar(BuildContext context) { + return Container( + padding: EdgeInsets.only(top: 30, left: 30), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "shareSKILLS", + style: TextStyle( + fontSize: 28, + fontWeight: FontWeight.bold, + color: Color.fromARGB(255, 68, 5, 73)), + ), + MaterialButton( + child: Icon(Icons.camera_alt), + // onPressed: null, + onPressed: () { + Navigator.push( + context, + PageTransition( + child: Provider.of(context, listen: false) + .PostScreen(context), + type: PageTransitionType.bottomToTop)); + } + // onPressed: + //(){ + // + // + // + //Provider.of(context, listen: false) + // .selectPostImageType(context), + // } + ) + ], + ), + ); + } + + Widget FeedBody(BuildContext context) { + return Container( + child: StreamBuilder( + stream: FirebaseFirestore.instance.collection('posts').snapshots(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return Center( + child: CircularProgressIndicator(), + ); + } else { + return buildPostSection(context, snapshot); + } + // }).toList() as List, + }), + ); + } + + // padding: EdgeInsets.only(left: 10, right: 10, top: 45), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Container( + // height: 2, + // color: Colors.grey[300], + // margin: EdgeInsets.symmetric(horizontal: 10), + // ), + // SizedBox(height: 20), + // Text( + // "Photography", + // style: TextStyle( + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Color.fromARGB(255, 97, 93, 93)), + // ), + // Expanded( + // child: ListView( + // padding: EdgeInsets.only(top: 8), + // children: [ + // // buildPostSection( + // // "https://www.haqseengineer.com/wp-content/uploads/2019/07/campus3-1.jpg", + // // "https://media-exp1.licdn.com/dms/image/C4D03AQFTg2cGxVuocQ/profile-displayphoto-shrink_200_200/0/1623771179828?e=1652313600&v=beta&t=BiOegBDA8jR6N0rFnniGeqvwGGzSuqRe45N9r5BSxIY", + // // context), + // // buildPostSection( + // // "https://images.unsplash.com/photo-1433162653888-a571db5ccccf?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80", + // // "https://images.pexels.com/photos/1222271/pexels-photo-1222271.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=100&w=640", + // // context), + // // buildPostSection( + // // "https://images.pexels.com/photos/1212600/pexels-photo-1212600.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=200&w=1260", + // // "https://images.pexels.com/photos/1239291/pexels-photo-1239291.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=100&w=640", + // // context), + // ], + // ), + // ) + // ], + + // Post Section Widget + Widget buildPostSection( + BuildContext context, AsyncSnapshot snapshot) { + return ListView( + children: snapshot.data?.docs.map((DocumentSnapshot documentSnapshot) { + return Container( + margin: EdgeInsets.only(bottom: 8), + padding: EdgeInsets.symmetric(horizontal: 18, vertical: 10), + decoration: BoxDecoration( + color: Colors.grey.withOpacity(0.1), + borderRadius: BorderRadius.circular(30), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + buildPostFirstRow((documentSnapshot.data() as Map)['userImage'], + (documentSnapshot.data() as Map)['username'], context), + SizedBox( + height: 10, + ), + buildPostPicture( + (documentSnapshot.data() as Map)['PostImage'], context), + SizedBox( + height: 5, + ), + Text( + (documentSnapshot.data() as Map)['caption'], + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.bold, + color: Colors.grey[800]), + ), + SizedBox( + height: 8, + ), + ], + ), + ); + }).toList() as List); + } + + // post row widget + Row buildPostFirstRow( + String urlProfilePhoto, String userName, BuildContext context) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + GestureDetector( + onTap: () { + Navigator.of(context).push(MaterialPageRoute( + builder: (BuildContext context) => + ProfilPage(url: urlProfilePhoto))); + }, + child: Hero( + tag: urlProfilePhoto, + child: CircleAvatar( + radius: 12, + backgroundImage: NetworkImage(urlProfilePhoto), + ), + ), + ), + SizedBox( + width: 5, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + userName != null ? userName : 'Default user name', + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ), + // Text( + // "MITAOE, Alandi, Pune", + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.bold, + // color: Colors.grey[500]), + // ), + ], + ) + ], + ), + Icon(Icons.more_vert) + ], + ); + } + + // postPicture widget + Stack buildPostPicture(String urlPost, BuildContext context) { + return Stack( + children: [ + Container( + height: MediaQuery.of(context).size.width - 70, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.3), + spreadRadius: 2, + blurRadius: 20, + offset: Offset(0, 10), + ), + ], + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage(urlPost), + )), + ), + Positioned( + bottom: 20, + right: 20, + child: LikeButton(size: 35), + ) + ], + ); + } + + notifyListeners(); +} diff --git a/lib/Screens/home.dart b/lib/Screens/home.dart new file mode 100644 index 0000000..2ca3239 --- /dev/null +++ b/lib/Screens/home.dart @@ -0,0 +1,53 @@ +// ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables + +import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Authenticate/login_page.dart'; +import 'package:skillshare/Screens/chatroom.dart'; +import 'package:skillshare/Screens/feed.dart'; +import 'package:skillshare/Screens/profile.dart'; +import 'package:skillshare/Services/auth.dart'; +import 'package:skillshare/Services/firebase_operations.dart'; + +import 'homepagehelpers.dart'; + +class HomeProfile extends StatefulWidget { + const HomeProfile({Key? key}) : super(key: key); + + @override + State createState() => _HomeProfileState(); +} + +class _HomeProfileState extends State with ChangeNotifier { + @override + void initState() { + Provider.of(context, listen: false) + .initUserData(context); + + super.initState(); + } + + final PageController homepageController = PageController(); + int pageIndex = 0; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[300], + body: PageView( + controller: homepageController, + children: [FeedPage(), ChatRoom(), ProfilPage(url: "@")], + physics: NeverScrollableScrollPhysics(), + onPageChanged: (page) { + setState(() { + pageIndex = page; + }); + }, + ), + bottomNavigationBar: + Provider.of(context, listen: false) + .bottomNavBar(pageIndex, homepageController)); + } +} diff --git a/lib/Screens/homepagehelpers.dart b/lib/Screens/homepagehelpers.dart new file mode 100644 index 0000000..2ed4506 --- /dev/null +++ b/lib/Screens/homepagehelpers.dart @@ -0,0 +1,75 @@ +import 'package:custom_navigation_bar/custom_navigation_bar.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/material.dart'; + +class HomePageHelpers with ChangeNotifier { + Widget bottomNavBar(int index, PageController pageController) { + return CustomNavigationBar( + currentIndex: index, + bubbleCurve: Curves.bounceIn, + scaleCurve: Curves.decelerate, + selectedColor: Colors.black, + strokeColor: Colors.blue, + unSelectedColor: Colors.grey[300], + scaleFactor: 0.5, + iconSize: 30, + backgroundColor: Colors.white, + onTap: (val) { + index = val; + pageController.jumpToPage(val); + notifyListeners(); + }, + items: [ + CustomNavigationBarItem(icon: Icon(EvaIcons.home)), + CustomNavigationBarItem(icon: Icon(EvaIcons.messageSquare)), + // CustomNavigationBarItem(icon: Icon(EvaIcons.search)), + CustomNavigationBarItem(icon: Icon(EvaIcons.person)), + ], + ); + } +} +/* +bottomNavBar( + int index, PageController pageController, BuildContext context) { + return Container( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 1, + ) + ], + color: Colors.grey.withOpacity(0.2), + borderRadius: BorderRadius.circular(15)), + child: Row( + children: [ + buildNavBarItem(Icons.home, 0, pageController, context), + buildNavBarItem(Icons.search, 1, pageController, context), + // buildNavBarItem(null, -1), + buildNavBarItem(Icons.notifications, 2, pageController, context), + buildNavBarItem(Icons.person, 3, pageController, context), + ], + ), + ); + Widget buildNavBarItem(IconData icon, int index, + PageController pageController, BuildContext context) { + return GestureDetector( + onTap: () { + pageController.jumpToPage(index); + notifyListeners(); + }, + child: Container( + width: MediaQuery.of(context).size.width / 4, + // width: 64, + height: 45, + child: icon != null + ? Icon( + icon, + size: 25, + color: index == index ? Colors.black : Colors.grey[700], + ) + : Container(), + ), + ); + } + */ \ No newline at end of file diff --git a/lib/Screens/post_screen.dart b/lib/Screens/post_screen.dart new file mode 100644 index 0000000..bcb369f --- /dev/null +++ b/lib/Screens/post_screen.dart @@ -0,0 +1,87 @@ +// ignore_for_file: prefer_const_constructors + +// import 'dart:htm'; + +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:provider/provider.dart'; + +import '../Controlls/UploadPost.dart'; + +class PostSelection extends StatefulWidget { + @override + State createState() => _PostSelectionState(); +} + +class _PostSelectionState extends State { + // const PostSelection({Key? key}) : super(key: key); + File initialImage = File(""); + // @override + // void initState() { + // initialImage = + // Provider.of(context, listen: false).uploadPostImage; + + // super.initState(); + // } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: Container( + child: Column( + children: [ + SizedBox( + height: MediaQuery.of(context).size.height * 0.35, + ), + Text( + "Please Select Your Image ", + style: TextStyle( + color: Colors.blue, + fontWeight: FontWeight.bold, + fontSize: 25, + ), + ), + Center( + child: ElevatedButton( + child: Icon(Icons.image), + onPressed: () { + Provider.of(context, listen: false) + .pickUploadPostImage(context, ImageSource.gallery) + .whenComplete(() { + initialImage = + Provider.of(context, listen: false) + .uploadPostImage; + }); + }), + ), + CircleAvatar( + backgroundColor: Colors.green, + radius: 80.0, + backgroundImage: FileImage( + Provider.of(context, listen: false) + .uploadPostImage), + ), + ElevatedButton( + child: Icon(Icons.upload), + onPressed: () { + Provider.of(context, listen: false) + .uploadPostImagetoFIrebase() + .whenComplete(() { + print('Image Uploaded'); + }); + }), + ElevatedButton( + child: Icon(Icons.backspace_outlined), + onPressed: () { + Navigator.pop(context); + }, + ) + ], + ), + ), + ); + } +} diff --git a/lib/Screens/profile.dart b/lib/Screens/profile.dart new file mode 100644 index 0000000..4d0ae62 --- /dev/null +++ b/lib/Screens/profile.dart @@ -0,0 +1,145 @@ +// ignore_for_file: prefer_const_constructors, unnecessary_new + +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Authenticate/login_page.dart'; +import '../Services/auth.dart'; +import 'profilehelper.dart'; + +class ProfilPage extends StatefulWidget { + final String url; + + ProfilPage({required this.url}); + + @override + _ProfilPageState createState() => _ProfilPageState(); +} + +class _ProfilPageState extends State { + // int _selectedItemIndex = 0; + @override + Widget build(BuildContext context) { + return Scaffold( + // bottomNavigationBar: , + body: SingleChildScrollView( + // controller: , + child: Container( + height: MediaQuery.of(context).size.height, // *5 + + // height: MediaQuery.of(context).size.height * 5, + + width: MediaQuery.of(context).size.width, + child: StreamBuilder( + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return Center( + child: CircularProgressIndicator(), + ); + } else { + return new Column( + children: [ + Container( + margin: EdgeInsets.only(top: 35), + padding: EdgeInsets.symmetric(horizontal: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Icon(Icons.arrow_back_ios)), + IconButton( + icon: Icon(EvaIcons.logOut), + onPressed: () { + Provider.of(context, listen: false) + .LogOutDiaglog(context); + }, + ) + ], + ), + ), + Provider.of(context, listen: false) + .HeaderProfile(context, snapshot), + Provider.of(context, listen: false) + .FooterProfile(context, snapshot), + ], + ); + } + }, + stream: FirebaseFirestore.instance + .collection('user') + .doc(Provider.of(context, listen: false) + .getUserUid) + .snapshots(), + ), + decoration: BoxDecoration(), + ), + ), + ); + } +} + +// Widget buildNavBarItem(IconData icon, int index) { +// return GestureDetector( +// onTap: () { +// setState(() { +// _selectedItemIndex = index; +// }); +// }, +// child: Container( +// // width: MediaQuery.of(context).size.width / 5, +// height: 45, +// child: icon != null +// ? Icon( +// icon, +// size: 25, +// color: index == _selectedItemIndex +// ? Colors.black +// : Colors.grey[700], +// ) +// : Container(), +// ), +// ); +// } + +// Card buildPictureCard(String url) { +// return Card( +// elevation: 10, +// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)), +// child: Container( +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(30), +// image: DecorationImage( +// fit: BoxFit.cover, +// image: NetworkImage(url), +// )), +// ), +// ); +// } + +// Column buildStatColumn(String value, String title) { +// return Column( +// children: [ +// Text( +// value, +// style: TextStyle( +// fontSize: 18, +// fontWeight: FontWeight.bold, +// ), +// ), +// Text( +// title, +// style: TextStyle( +// fontSize: 12, +// fontWeight: FontWeight.bold, +// color: Colors.grey[400], +// ), +// ), +// ], +// ); +// } +// } diff --git a/lib/Screens/profilehelper.dart b/lib/Screens/profilehelper.dart new file mode 100644 index 0000000..af00c81 --- /dev/null +++ b/lib/Screens/profilehelper.dart @@ -0,0 +1,205 @@ +// ignore_for_file: prefer_const_constructors + +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/material.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:provider/provider.dart'; + +import '../Authenticate/login_page.dart'; +import '../Services/auth.dart'; + +class ProfileHelper with ChangeNotifier { + Widget HeaderProfile(BuildContext context, dynamic snapshot) { + return Column( + children: [ + // height: MediaQuery.of(context).size.height, + // width: MediaQuery.of(context).size.width, + Container( + margin: EdgeInsets.only(top: 35), + height: 80, + width: 80, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(40), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.2), + spreadRadius: 5, + blurRadius: 20, + ) + ], + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage(snapshot.data.data()['userImage'].toString()), + //snapshot.data.data()['userImage'] + ), + ), + ), + SizedBox( + height: 10, + ), + Text( + snapshot.data.data()['userName'], + // "me", + // snapshot.data.data()['userName'] + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(EvaIcons.emailOutline), + //snapshot.data.data()['userEmail'] + Text( + snapshot.data.data()['userEmail'], + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.grey[400], + ), + ), + ], + ), + SizedBox( + height: 20, + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + buildStatColumn("53", "skills shared"), + buildStatColumn("223k", "Followers"), + buildStatColumn("117", "Following"), + ], + ), + ], + ); + } + + Widget FooterProfile(BuildContext context, dynamic snapshot) { + return Expanded( + child: Container( + margin: EdgeInsets.only(left: 8, right: 8, top: 8), + decoration: BoxDecoration( + color: Colors.grey.withOpacity(0.15), + borderRadius: BorderRadius.vertical(top: Radius.circular(25))), + child: GridView.count( + padding: EdgeInsets.symmetric(horizontal: 5, vertical: 8), + crossAxisCount: 2, + crossAxisSpacing: 5, + mainAxisSpacing: 5, + childAspectRatio: 5 / 6, + children: [ + buildPictureCard( + "https://www.haqseengineer.com/wp-content/uploads/2019/07/campus3-1.jpg"), + buildPictureCard( + "https://images.pexels.com/photos/132037/pexels-photo-132037.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=200&w=1260"), + buildPictureCard( + "https://images.pexels.com/photos/733475/pexels-photo-733475.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=200&w=1260 "), + buildPictureCard( + "https://images.pexels.com/photos/268533/pexels-photo-268533.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=200&w=1260"), + buildPictureCard( + "https://images.pexels.com/photos/268533/pexels-photo-268533.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=200&w=1260"), + buildPictureCard( + "https://images.pexels.com/photos/268533/pexels-photo-268533.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=200&w=1260"), + ], + ), + ), + ); + } + + LogOutDiaglog(BuildContext context) { + return showDialog( + context: context, + builder: (context) { + return AlertDialog( + title: Text( + 'Log Out?', + style: TextStyle( + color: Colors.black, + fontSize: 16.0, + fontWeight: FontWeight.bold, + ), + ), + actions: [ + MaterialButton( + child: Text( + 'No', + style: TextStyle( + color: Colors.black, + fontSize: 18.0, + fontWeight: FontWeight.bold, + decoration: TextDecoration.underline, + decorationColor: Colors.grey, + ), + ), + onPressed: () { + Navigator.pop(context); + }), + MaterialButton( + color: Colors.red, + child: Text( + 'Yes', + style: TextStyle( + color: Colors.black, + fontSize: 18.0, + fontWeight: FontWeight.bold, + decoration: TextDecoration.underline, + decorationColor: Colors.grey, + ), + ), + onPressed: () { + Provider.of(context, listen: false) + .logOutEmail() + .whenComplete(() { + Navigator.pushReplacement( + context, + PageTransition( + child: LoginPage(context), + type: PageTransitionType.bottomToTop)); + }); + }) + ], + ); + }); + } + + Card buildPictureCard(String url) { + return Card( + elevation: 10, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30), + image: DecorationImage( + fit: BoxFit.cover, + image: NetworkImage(url), + )), + ), + ); + } + + Column buildStatColumn(String value, String title) { + return Column( + children: [ + Text( + value, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ), + Text( + title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Colors.grey[400], + ), + ), + ], + ); + } +} diff --git a/lib/Services/auth.dart b/lib/Services/auth.dart new file mode 100644 index 0000000..1dfeac7 --- /dev/null +++ b/lib/Services/auth.dart @@ -0,0 +1,58 @@ +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:google_sign_in/google_sign_in.dart'; + +class Authentication with ChangeNotifier { + final FirebaseAuth firebaseAuth = FirebaseAuth.instance; + final GoogleSignIn googleSignIn = GoogleSignIn(); + + String? userUid; + String? get getUserUid => userUid; + + Future logIntoAccount(String email, String password) async { + UserCredential userCredential = await firebaseAuth + .signInWithEmailAndPassword(email: email, password: password); + User? user = userCredential.user; + userUid = user!.uid; + print("Logged In to the account is with user ID -> $userUid"); + notifyListeners(); + } + + Future createAccount(String email, String password) async { + UserCredential userCredential = await firebaseAuth + .createUserWithEmailAndPassword(email: email, password: password); + User? user = userCredential.user; + userUid = user!.uid; + print("User Id of the account is -> $userUid"); + notifyListeners(); + } + + Future logOutEmail() { + return firebaseAuth.signOut(); + } + + Future signInWithGoogle() async { + final GoogleSignInAccount? googleSignInAccount = + await googleSignIn.signIn(); + + final GoogleSignInAuthentication googleSignInAuthentication = + await googleSignInAccount!.authentication; + + final AuthCredential authCredential = GoogleAuthProvider.credential( + accessToken: googleSignInAuthentication.accessToken, + idToken: googleSignInAuthentication.idToken); + + final UserCredential userCredential = + await firebaseAuth.signInWithCredential(authCredential); + + final User? user = userCredential.user; + assert(user!.uid != null); + userUid = user!.uid; + print('google User UID => $userUid'); + notifyListeners(); + } + + Future signOutWithGoogle() async { + return googleSignIn.signOut(); + } +} diff --git a/lib/Services/firebase_operations.dart b/lib/Services/firebase_operations.dart new file mode 100644 index 0000000..3524219 --- /dev/null +++ b/lib/Services/firebase_operations.dart @@ -0,0 +1,73 @@ +// ignore_for_file: avoid_print + +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_storage/firebase_storage.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Controlls/control_utils.dart'; + +import 'auth.dart'; + +class FirebaseOperations with ChangeNotifier { + late UploadTask imageUploadTask; + late String initUserEmail, initUserName = "", initUserImage; + + Future uploadUserAvatar(BuildContext context) async { + Reference imageReference = FirebaseStorage.instance.ref().child( + 'userProfileAvatar/${Provider.of(context, listen: false).getUserAvatar.path}/${TimeOfDay.now()}'); + imageUploadTask = imageReference.putFile( + Provider.of(context, listen: false).getUserAvatar); + await imageUploadTask.whenComplete(() { + print("Image Uploaded!!"); + }); + // var userImageUrl = await (await imageUploadTask.onComplete().imageReference.); + + // var imageUrl = await imageReference.getDownloadURL().then((url) { + // Provider.of(context, listen: false).userAvatarUrl = + // url.toString(); + var imageUrl = await imageReference.getDownloadURL(); + + print("Image Referenced URL => ${imageUrl}"); + Provider.of(context, listen: false).userAvatarUrl = + imageUrl.toString(); + print( + "Image URL to string stored in userAvatarUrl => ${Provider.of(context, listen: false).userAvatarUrl}"); + + // imageReference.getDownloadURL().then((url) { + // Provider.of(context, listen: false).userAvatarUrl = + // url.toString(); + // print( + // "The USer Avatar Image url => ${Provider.of(context, listen: false).userAvatarUrl}"); + notifyListeners(); + } + +//* Creating a Collection or data in databse as sooon as user creates the account + Future createUserCollections(BuildContext context, dynamic data) async { + return FirebaseFirestore.instance + .collection('user') + .doc(Provider.of(context, listen: false).getUserUid) + .set(data); + } + + //* Method to fetch the inital data from the Firebase + Future initUserData(BuildContext context) async { + return await FirebaseFirestore.instance + .collection('user') + .doc(Provider.of(context, listen: false).getUserUid) + .get() + .then((doc) { + print("Fetching User Data"); + initUserName = doc.data()!['userName']; // userName + initUserEmail = doc.data()!['userEmail']; + initUserImage = doc.data()!['userImage']; + print('user Email is - > ${initUserEmail}'); + print('user Image is - > ${initUserImage}'); + print('user Name is - > ${initUserName}'); + notifyListeners(); + }); + } + + Future uploadPostData(String postId, dynamic data) async { + return FirebaseFirestore.instance.collection('posts').doc(postId).set(data); + } +} diff --git a/lib/Services/google_login.dart b/lib/Services/google_login.dart new file mode 100644 index 0000000..b91d556 --- /dev/null +++ b/lib/Services/google_login.dart @@ -0,0 +1 @@ +class Google_signIn {} diff --git a/lib/Widgets/imagepicker.dart b/lib/Widgets/imagepicker.dart new file mode 100644 index 0000000..c596781 --- /dev/null +++ b/lib/Widgets/imagepicker.dart @@ -0,0 +1,123 @@ +import 'package:flutter/material.dart'; +import 'package:image_picker/image_picker.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:provider/src/provider.dart'; + +import '../Controlls/control_services.dart'; + +class ImagePickerSheet extends StatefulWidget { + ImagePickerSheet({Key? key}) : super(key: key); + + @override + State createState() => _ImagePickerSheetState(); +} + +class _ImagePickerSheetState extends State { + @override + Widget build(BuildContext context) { + return Container(); + // context: context, + // builder: (context) { + // return Container( + // child: Column( + // children: [ + // Padding( + // padding: const EdgeInsets.symmetric(horizontal: 150), + // child: Divider( + // thickness: 4.0, + // color: Colors.yellow, + // ), + // ), + // Row( + // children: [ + // ElevatedButton( + // child: Text("Gallery"), + // onPressed: () { + // pickUserAvatar(context, ImageSource.gallery) + // .whenComplete(() { + // Navigator.pop(context); + // Provider.of(context, listen: false) + // .showUserAvatar(context); + // }); + // }, + // ), + // ElevatedButton( + // child: Text("Camera"), + // onPressed: () { + // pickUserAvatar(context, ImageSource.camera) + // .whenComplete( + // () { + // Navigator.pop(context); + // Provider.of(context, listen: false) + // .showUserAvatar(context); + // }, + // ); + // }) + // ], + // ), + // ], + // ), + // height: MediaQuery.of(context).size.height * 0.1, + // width: MediaQuery.of(context).size.width, + // decoration: BoxDecoration( + // color: Colors.blueAccent, + // borderRadius: BorderRadius.circular(12.0), + // ), + // ); + // }, + // } + } +} + +// Future selectAvatarOptionSheet(BuildContext context) async { +// return showBottomSheet( +// context: context, +// builder: (context) { +// return Container( +// child: Column( +// children: [ +// Padding( +// padding: const EdgeInsets.symmetric(horizontal: 150), +// child: Divider( +// thickness: 4.0, +// color: Colors.yellow, +// ), +// ), +// Row( +// children: [ +// ElevatedButton( +// child: Text("Gallery"), +// onPressed: () { +// pickUserAvatar(context, ImageSource.gallery) +// .whenComplete(() { +// Navigator.pop(context); +// Provider.of(context, listen: false) +// .showUserAvatar(context); +// }); +// }, +// ), +// ElevatedButton( +// child: Text("Camera"), +// onPressed: () { +// pickUserAvatar(context, ImageSource.camera).whenComplete( +// () { +// Navigator.pop(context); +// Provider.of(context, listen: false) +// .showUserAvatar(context); +// }, +// ); +// }) +// ], +// ), +// ], +// ), +// height: MediaQuery.of(context).size.height * 0.1, +// width: MediaQuery.of(context).size.width, +// decoration: BoxDecoration( +// color: Colors.blueAccent, +// borderRadius: BorderRadius.circular(12.0), +// ), +// ); +// }, +// ); +// } diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..3b689b2 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,76 @@ +// ignore_for_file: prefer_const_constructors, camel_case_types, prefer_const_constructors_in_immutables +import 'package:firebase_core/firebase_core.dart'; +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:skillshare/Controlls/UploadPost.dart'; +import 'package:skillshare/Screens/feedHelpers.dart'; +import 'package:skillshare/Screens/homepagehelpers.dart'; +import 'package:skillshare/Services/firebase_operations.dart'; +import './Authenticate/login_page.dart'; +import 'Authenticate/landing_helper.dart'; +import 'Controlls/control_services.dart'; +import 'Controlls/control_utils.dart'; +import 'Screens/feed.dart'; +import 'Screens/home.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:skillshare/Services/auth.dart'; +import 'OnboardingScreen/onboarding_screen.dart'; +import 'Screens/profile.dart'; +import 'Screens/profilehelper.dart'; +import 'wrapper.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(); + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({Key? key}) : super(key: key); + + // This widget is the root of your application. + + @override + Widget build(BuildContext context) { + return MultiProvider( + providers: [ + ChangeNotifierProvider(create: (_) => FirebaseOperations()), + ChangeNotifierProvider(create: (_) => UploadPost()), + ChangeNotifierProvider(create: (_) => ControlUtils()), + ChangeNotifierProvider(create: (_) => LandingHelpers()), + ChangeNotifierProvider(create: (_) => Authentication()), + ChangeNotifierProvider(create: (_) => ControlServices()), + ChangeNotifierProvider(create: (_) => ProfileHelper()), + ChangeNotifierProvider(create: (_) => FeedHelper()), + ChangeNotifierProvider(create: (_) => HomePageHelpers()), + ], + child: MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Flutter Demo', + theme: ThemeData(primarySwatch: Colors.blue, fontFamily: 'Poppins'), + home: wrapper(), + ), + ); + } +} + +class wrapper extends StatefulWidget { + wrapper({Key? key}) : super(key: key); + + @override + State createState() => _wrapperState(); +} + +class _wrapperState extends State { + @override + Widget build(BuildContext context) { + // TODO: Here We need Maintain the Already login Situation and here Login Screen will be Floated + // return LoginPage() + +//! Uncomment this to show again Introscreen and Everything + return IntroScreen(); + // return HomeProfile(); + + // return ProfilPage(url: "http://#"); + } +} diff --git a/lib/wrapper.dart b/lib/wrapper.dart new file mode 100644 index 0000000..6f01b12 --- /dev/null +++ b/lib/wrapper.dart @@ -0,0 +1,4 @@ +//Authentication Wrapper + +import 'package:flutter/material.dart'; +import './Authenticate/login_page.dart'; diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..467701d --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,460 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.11" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.9.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + cloud_firestore: + dependency: "direct main" + description: + name: cloud_firestore + url: "https://pub.dartlang.org" + source: hosted + version: "4.3.0" + cloud_firestore_platform_interface: + dependency: transitive + description: + name: cloud_firestore_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "5.10.0" + cloud_firestore_web: + dependency: transitive + description: + name: cloud_firestore_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.16.0" + cross_file: + dependency: transitive + description: + name: cross_file + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.3+2" + custom_navigation_bar: + dependency: "direct main" + description: + name: custom_navigation_bar + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.2" + dots_indicator: + dependency: transitive + description: + name: dots_indicator + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + eva_icons_flutter: + dependency: "direct main" + description: + name: eva_icons_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + firebase: + dependency: "direct main" + description: + name: firebase + url: "https://pub.dartlang.org" + source: hosted + version: "9.0.3" + firebase_auth: + dependency: "direct main" + description: + name: firebase_auth + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.3" + firebase_auth_platform_interface: + dependency: transitive + description: + name: firebase_auth_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "6.11.6" + firebase_auth_web: + dependency: transitive + description: + name: firebase_auth_web + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.3" + firebase_core: + dependency: "direct main" + description: + name: firebase_core + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.2" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + firebase_storage: + dependency: "direct main" + description: + name: firebase_storage + url: "https://pub.dartlang.org" + source: hosted + version: "11.0.9" + firebase_storage_platform_interface: + dependency: transitive + description: + name: firebase_storage_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.25" + firebase_storage_web: + dependency: transitive + description: + name: firebase_storage_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.18" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.7" + flutter_signin_button: + dependency: "direct main" + description: + name: flutter_signin_button + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.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" + font_awesome_flutter: + dependency: "direct main" + description: + name: font_awesome_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "9.2.0" + google_sign_in: + dependency: "direct main" + description: + name: google_sign_in + url: "https://pub.dartlang.org" + source: hosted + version: "5.4.2" + google_sign_in_android: + dependency: transitive + description: + name: google_sign_in_android + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" + google_sign_in_ios: + dependency: transitive + description: + name: google_sign_in_ios + url: "https://pub.dartlang.org" + source: hosted + version: "5.5.1" + google_sign_in_platform_interface: + dependency: transitive + description: + name: google_sign_in_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + google_sign_in_web: + dependency: transitive + description: + name: google_sign_in_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.2" + 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.2" + image_picker: + dependency: "direct main" + description: + name: image_picker + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.6" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.5+4" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.10" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.6+3" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.6.2" + intl: + dependency: transitive + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" + introduction_screen: + dependency: "direct main" + description: + name: introduction_screen + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.4" + like_button: + dependency: "direct main" + description: + name: like_button + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.5" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + 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" + page_transition: + dependency: "direct main" + description: + name: page_transition + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.9" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.2" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + provider: + dependency: "direct main" + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.5" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.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" + 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" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + 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" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" +sdks: + dart: ">=2.17.0 <3.0.0" + flutter: ">=2.10.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..95428e1 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,91 @@ +name: skillshare +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 used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.12.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: + cloud_firestore: ^4.3.0 + custom_navigation_bar: ^0.8.2 + eva_icons_flutter: ^3.0.2 + firebase: ^9.0.2 + firebase_auth: ^4.2.3 + firebase_core: ^2.4.0 + firebase_storage: ^11.0.9 + flutter: + sdk: flutter + font_awesome_flutter: ^9.2.0 + google_sign_in: ^5.2.3 + image_picker: ^0.8.4+9 + introduction_screen: ^3.1.1 + like_button: ^2.0.4 + page_transition: ^2.0.5 + provider: ^6.0.2 + flutter_signin_button: ^2.0.0 + +dev_dependencies: + flutter_lints: ^2.0.1 + flutter_test: + sdk: flutter + +# 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. +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/Images/2020.png + - assets/Images/Snowman.png + - assets/Images/background.png + - assets/Images/SignUpImage.png + - assets/Images/shareSKILLS.png + - assets/Images/connected.png + + # 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: Poppins + fonts: + - asset: assets/Fonts/Poppins-Regular.ttf + # - 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 diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..a689b28 --- /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 that Flutter provides. 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:skillshare/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const 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); + }); +} diff --git a/web/favicon.png b/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/web/icons/Icon-maskable-512.png differ diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..4b33cf3 --- /dev/null +++ b/web/index.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + skillshare + + + + + + + diff --git a/web/manifest.json b/web/manifest.json new file mode 100644 index 0000000..06d3f44 --- /dev/null +++ b/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "skillshare", + "short_name": "skillshare", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +}