├── android ├── settings_aar.gradle ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── coaching_app │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── google-services.json │ ├── build.gradle │ └── proguard-rules.pro ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── .gitattributes ├── assets └── images │ ├── email.png │ ├── logo.png │ ├── aboutUs.png │ ├── facebook.png │ ├── google.png │ ├── MaskGroup1.png │ ├── logIn.svg │ ├── logOut.svg │ └── signUp.svg ├── .metadata ├── lib ├── screens │ ├── main_screen.dart │ ├── meeting_screen.dart │ ├── create_meeting_screen.dart │ ├── auth │ │ ├── introduction_auth_screen.dart │ │ ├── navigate_auth_screen.dart │ │ ├── forget_password.dart │ │ ├── login.dart │ │ └── sign_up.dart │ ├── landingPage.dart │ ├── join_meeting_screen.dart │ └── user_info.dart ├── utilities │ ├── loading.dart │ ├── custom_toast.dart │ ├── universal_variables.dart │ └── loadingErrorWidget.dart ├── consts │ ├── my_icons.dart │ ├── colllections.dart │ ├── theme_data.dart │ ├── neuomorphic.dart │ ├── colors.dart │ └── constants.dart ├── models │ ├── announcementsModel.dart │ ├── meetingsModel.dart │ ├── appointmentsModel.dart │ └── users.dart ├── user_state.dart ├── services │ └── global_method.dart ├── database │ ├── local_database.dart │ └── database.dart ├── bottom_bar.dart └── main.dart ├── README.md ├── .vscode └── launch.json ├── .gitignore ├── test └── widget_test.dart ├── pubspec.yaml └── pubspec.lock /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /assets/images/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/assets/images/email.png -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/assets/images/logo.png -------------------------------------------------------------------------------- /assets/images/aboutUs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/assets/images/aboutUs.png -------------------------------------------------------------------------------- /assets/images/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/assets/images/facebook.png -------------------------------------------------------------------------------- /assets/images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/assets/images/google.png -------------------------------------------------------------------------------- /assets/images/MaskGroup1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/assets/images/MaskGroup1.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hassan-zafar/coaching_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/coaching_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.hassan.coaching_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: f4abaa0735eba4dfd8f33f73363911d63931fe03 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /lib/screens/main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../bottom_bar.dart'; 4 | 5 | class MainScreens extends StatelessWidget { 6 | static const routeName = '/MainScreen'; 7 | @override 8 | Widget build(BuildContext context) { 9 | return PageView( 10 | children: [BottomBarScreen(),], 11 | ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/utilities/loading.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class LoadingIndicator extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | final widget = (Platform.isAndroid) 10 | ? CircularProgressIndicator( 11 | backgroundColor: Colors.black, 12 | ) 13 | : CupertinoActivityIndicator(); 14 | return Container( 15 | alignment: Alignment.center, 16 | child: widget, 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # coaching_app 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /lib/utilities/custom_toast.dart: -------------------------------------------------------------------------------- 1 | import 'package:bot_toast/bot_toast.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | void successToast({ 5 | required String message, 6 | int duration = 3, 7 | }) { 8 | BotToast.showText( 9 | text: message, 10 | backgroundColor: Colors.green, 11 | ); 12 | } 13 | 14 | void showToast({ 15 | required String message, 16 | int duration = 3, 17 | }) { 18 | BotToast.showText( 19 | text: message, 20 | backgroundColor: Colors.green, 21 | ); 22 | } 23 | 24 | void errorToast({ 25 | required String message, 26 | int duration = 4, 27 | }) { 28 | BotToast.showText(text: message); 29 | } 30 | -------------------------------------------------------------------------------- /lib/consts/my_icons.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | class MyAppIcons { 5 | static IconData home = FontAwesomeIcons.home; 6 | static IconData rss = FontAwesomeIcons.rss; 7 | static IconData search = FontAwesomeIcons.search; 8 | static IconData user = FontAwesomeIcons.user; 9 | static IconData cart = FontAwesomeIcons.shoppingCart; 10 | static IconData bag = FontAwesomeIcons.shoppingBag; 11 | static IconData trash = FontAwesomeIcons.trash; 12 | static IconData wishlist = Icons.favorite_border_outlined; 13 | static IconData upload = FontAwesomeIcons.upload; 14 | } 15 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/ephemeral/ 22 | Flutter/app.flx 23 | Flutter/app.zip 24 | Flutter/flutter_assets/ 25 | Flutter/flutter_export_environment.sh 26 | ServiceDefinitions.json 27 | Runner/GeneratedPluginRegistrant.* 28 | 29 | # Exceptions to above rules. 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.pbxuser 33 | !default.perspectivev3 34 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.5.10' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.10' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /lib/utilities/universal_variables.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import "package:flutter/material.dart"; 3 | import 'package:google_fonts/google_fonts.dart'; 4 | 5 | TextStyle ralewayStyle(double size, 6 | [Color? color, FontWeight fontWeight = FontWeight.w700]) { 7 | return GoogleFonts.raleway( 8 | fontSize: size, 9 | color: color, 10 | fontWeight: fontWeight, 11 | ); 12 | } 13 | 14 | TextStyle montserratStyle(double size, 15 | [Color? color, FontWeight fontWeight = FontWeight.w700]) { 16 | return GoogleFonts.montserrat( 17 | fontSize: size, 18 | color: color, 19 | fontWeight: fontWeight, 20 | ); 21 | } 22 | 23 | CollectionReference userCollection = 24 | FirebaseFirestore.instance.collection("users"); 25 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "coaching_app", 9 | "request": "launch", 10 | "type": "dart" 11 | }, 12 | { 13 | "name": "coaching_app (profile mode)", 14 | "request": "launch", 15 | "type": "dart", 16 | "flutterMode": "profile" 17 | }, 18 | { 19 | "name": "coaching_app (release mode)", 20 | "request": "launch", 21 | "type": "dart", 22 | "flutterMode": "release" 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/models/announcementsModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | 3 | class AnnouncementsModel { 4 | final String? userId; 5 | final String? announcementId; 6 | final String? announcementTitle; 7 | final String? description; 8 | final Timestamp? timestamp; 9 | final String? token; 10 | final String? imageUrl; 11 | 12 | AnnouncementsModel({ 13 | this.userId, 14 | this.announcementId, 15 | this.announcementTitle, 16 | this.description, 17 | this.timestamp, 18 | this.token, 19 | this.imageUrl, 20 | }); 21 | 22 | Map toMap() { 23 | return {}; 24 | } 25 | 26 | factory AnnouncementsModel.fromDocument(doc) { 27 | return AnnouncementsModel( 28 | userId: doc.data()["userId"], 29 | announcementId: doc.data()["announcementId"], 30 | announcementTitle: doc.data()["announcementTitle"], 31 | description: doc.data()["description"], 32 | timestamp: doc.data()["timestamp"], 33 | token: doc.data()["token"], 34 | imageUrl: doc.data()["imageUrl"], 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:coaching_app/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "640167748698", 4 | "project_id": "coaching-app-3c851", 5 | "storage_bucket": "coaching-app-3c851.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:640167748698:android:cf5d7bdd69f3394ceb6463", 11 | "android_client_info": { 12 | "package_name": "com.hassan.coaching_app" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "640167748698-g7eb0a5tfoktvquvivtta7d5e56m43ph.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyAuzSREtNmq_kS3mL_bS7tPrNuyCELMNYM" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "640167748698-g7eb0a5tfoktvquvivtta7d5e56m43ph.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /lib/utilities/loadingErrorWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LocationErrorWidget extends StatelessWidget { 4 | final String? error; 5 | final Function? callback; 6 | 7 | const LocationErrorWidget({ this.error, this.callback}) 8 | ; 9 | 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | final box = SizedBox(height: 32); 14 | final errorColor = Color(0xffb00020); 15 | 16 | return Container( 17 | child: Center( 18 | child: Column( 19 | mainAxisSize: MainAxisSize.min, 20 | children: [ 21 | Icon( 22 | Icons.location_off, 23 | size: 150, 24 | color: errorColor, 25 | ), 26 | box, 27 | Text( 28 | "$error", 29 | style: TextStyle( 30 | color: errorColor, fontWeight: FontWeight.bold), 31 | ), 32 | box, 33 | RaisedButton( 34 | child: Text("Retry"), 35 | onPressed: () { 36 | // if (callback != null) callback(); 37 | }, 38 | ) 39 | ], 40 | ), 41 | ), 42 | ); 43 | } 44 | } -------------------------------------------------------------------------------- /lib/models/meetingsModel.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | 3 | class MeetingsModel { 4 | final String? meetingId; 5 | final String? meetingTitle; 6 | final Timestamp? startingTime; 7 | final Timestamp? endingTime; 8 | final bool? isAllDay; 9 | 10 | MeetingsModel({ 11 | this.meetingId, 12 | this.meetingTitle, 13 | this.startingTime, 14 | this.endingTime, 15 | this.isAllDay, 16 | }); 17 | 18 | Map toMap() { 19 | return { 20 | "meetingId": meetingId, 21 | "meetingTitle": meetingTitle, 22 | "startingTime": startingTime, 23 | "endingTime": endingTime, 24 | "isAllDay": isAllDay, 25 | }; 26 | } 27 | 28 | factory MeetingsModel.fromMap(Map map) { 29 | return MeetingsModel( 30 | meetingId: map["meetingId"], 31 | meetingTitle: map["meetingTitle"], 32 | startingTime: map["startingTime"], 33 | endingTime: map["endingTime"], 34 | isAllDay: map["isAllDay"], 35 | ); 36 | } 37 | 38 | factory MeetingsModel.fromDocument(doc) { 39 | return MeetingsModel( 40 | meetingId: doc.data()["meetingId"], 41 | meetingTitle: doc.data()["meetingTitle"], 42 | startingTime: doc.data()["startingTime"], 43 | endingTime: doc.data()["endingTime"], 44 | isAllDay: doc.data()["isAllDay"], 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/consts/colllections.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:coaching_app/models/users.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:firebase_storage/firebase_storage.dart'; 5 | 6 | final FirebaseAuth auth = FirebaseAuth.instance; 7 | // firebase_storage.FirebaseStorage storageRef = 8 | // firebase_storage.FirebaseStorage.instance; 9 | final userRef = FirebaseFirestore.instance.collection('users'); 10 | final Reference storageRef = FirebaseStorage.instance.ref(); 11 | final calenderRef = FirebaseFirestore.instance.collection('calenderMeetings'); 12 | final appointmentsRef = FirebaseFirestore.instance.collection('appointments'); 13 | final commentsRef = FirebaseFirestore.instance.collection('comments'); 14 | final chatRoomRef = FirebaseFirestore.instance.collection('chatRoom'); 15 | final chatListRef = FirebaseFirestore.instance.collection('chatLists'); 16 | final studentJournelRef = 17 | FirebaseFirestore.instance.collection('studentJournel'); 18 | final attendanceRef = FirebaseFirestore.instance.collection('attendanceRef'); 19 | final announcementsRef = FirebaseFirestore.instance.collection('announcements'); 20 | 21 | final feeRef = FirebaseFirestore.instance.collection('feeRef'); 22 | 23 | AppUserModel? currentUser; 24 | bool? isAdmin; 25 | bool? isTeacher; 26 | 27 | String dateTimeScript = 28 | "${DateTime.now().day} : ${DateTime.now().month} : ${DateTime.now().year}"; 29 | -------------------------------------------------------------------------------- /lib/user_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/screens/auth/introduction_auth_screen.dart'; 2 | import 'package:coaching_app/screens/landingPage.dart'; 3 | import 'package:coaching_app/screens/main_screen.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class UserState extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return StreamBuilder( 11 | stream: FirebaseAuth.instance.authStateChanges(), 12 | // ignore: missing_return 13 | builder: (context, userSnapshot) { 14 | if (userSnapshot.connectionState == ConnectionState.waiting) { 15 | return Center( 16 | child: CircularProgressIndicator(), 17 | ); 18 | } else if (userSnapshot.connectionState == ConnectionState.active) { 19 | if (userSnapshot.hasData) { 20 | print('The user is already logged in'); 21 | return MainScreens(); 22 | // MainScreens(); 23 | } else { 24 | print('The user didn\'t login yet'); 25 | return IntroductionAuthScreen(); 26 | // LandingPage(); 27 | } 28 | } else if (userSnapshot.hasError) { 29 | return Center( 30 | child: Text('Error occured'), 31 | ); 32 | } else { 33 | return Center( 34 | child: Text('Error occured'), 35 | ); 36 | } 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/consts/theme_data.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class Styles { 6 | static ThemeData themeData(bool isDarkTheme, BuildContext context) { 7 | return ThemeData( 8 | scaffoldBackgroundColor: 9 | isDarkTheme ? Colors.black : Colors.grey.shade300, 10 | primarySwatch: Colors.purple, 11 | primaryColor: isDarkTheme ? Colors.black : Colors.grey.shade300, 12 | accentColor: Colors.deepPurple, 13 | backgroundColor: isDarkTheme ? Colors.grey.shade700 : Colors.white, 14 | indicatorColor: isDarkTheme ? Color(0xff0E1D36) : Color(0xffCBDCF8), 15 | buttonColor: isDarkTheme ? Color(0xff3B3B3B) : Color(0xffF1F5FB), 16 | hintColor: isDarkTheme ? Colors.grey.shade300 : Colors.grey.shade800, 17 | // highlightColor: isDarkTheme ? Color(0xff372901) : Color(0xffFCE192), 18 | hoverColor: isDarkTheme ? Color(0xff3A3A3B) : Color(0xff4285F4), 19 | focusColor: isDarkTheme ? Color(0xff0B2512) : Color(0xffA8DAB5), 20 | disabledColor: Colors.grey, 21 | textSelectionColor: isDarkTheme ? Colors.white : Colors.black, 22 | cardColor: isDarkTheme ? Color(0xFF151515) : Colors.white, 23 | canvasColor: isDarkTheme ? Colors.black : Colors.grey[50], 24 | brightness: isDarkTheme ? Brightness.dark : Brightness.light, 25 | buttonTheme: Theme.of(context).buttonTheme.copyWith( 26 | colorScheme: isDarkTheme ? ColorScheme.dark() : ColorScheme.light()), 27 | appBarTheme: AppBarTheme( 28 | elevation: 0.0, 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/consts/neuomorphic.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:glassmorphism_ui/glassmorphism_ui.dart'; 3 | 4 | class EditedNeuomprphicContainer extends StatelessWidget { 5 | EditedNeuomprphicContainer({ 6 | this.icon, 7 | this.text, 8 | this.isIcon = true, 9 | }); 10 | final IconData? icon; 11 | final String? text; 12 | final bool? isIcon; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Padding( 17 | padding: const EdgeInsets.all(12.0), 18 | child: GlassContainer( 19 | borderRadius: BorderRadius.circular(20), 20 | width: isIcon! ? 120 : 100, 21 | blur: 8, 22 | height: isIcon! ? 120 : 100, 23 | opacity: 0.3, 24 | shadowStrength: 8, 25 | child: Center( 26 | child: Padding( 27 | padding: const EdgeInsets.all(8.0), 28 | child: Column( 29 | mainAxisAlignment: MainAxisAlignment.center, 30 | crossAxisAlignment: CrossAxisAlignment.center, 31 | children: [ 32 | // isIcon! 33 | // ? 34 | Icon(icon), 35 | // :Container(), 36 | Padding( 37 | padding: const EdgeInsets.all(4.0), 38 | child: Text( 39 | text!, 40 | textAlign: TextAlign.center, 41 | style: TextStyle(fontWeight: FontWeight.bold), 42 | ), 43 | ) 44 | ], 45 | ), 46 | ), 47 | ), 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/consts/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ColorsConsts { 4 | static Color black = Color(0xFF000000); 5 | static Color white = Color(0xFFFFFFFF); 6 | static Color title = Color(0xDD000000); 7 | static Color subTitle = Color(0x8A000000); 8 | static Color backgroundColor = Color(0xFFE0E0E0); //grey shade 300 9 | 10 | static Color favColor = Color(0xFFF44336); // red 500 11 | static Color favBadgeColor = Color(0xFFE57373); // red 300 12 | 13 | static Color cartColor = Color(0xFF5E35B1); //deep purple 600 14 | static Color cartBadgeColor = Color(0xFFBA68C8); //purple 300 15 | 16 | static Color gradiendFStart = Color(0xFF07A8B2); //purpleaccent 100 17 | static Color gradiendFEnd = Color(0xFFFFFFFF); //purple 100 18 | static Color endColor = Color(0xFFCE93D8); //purple 200 19 | static Color purple300 = Color(0xFFBA68C8); //purple 300 20 | static Color gradiendLEnd = Color(0xFFE91E63); //Pink 21 | static Color gradiendLStart = Color(0xFF9C27B0); //purple 500 22 | static Color starterColor = Color(0xFF8E24AA); //purple 600 23 | static Color purple800 = Color(0xFF6A1B9A); 24 | } 25 | 26 | BoxDecoration backgroundColorBoxDecoration() { 27 | return BoxDecoration( 28 | gradient: LinearGradient( 29 | colors: [ 30 | // Color(0xff387A53), 31 | // Color(0xff8BE78B), 32 | 33 | Colors.white, 34 | Color(0xFF07A8B2) 35 | // Color(0xffFED5E3), 36 | // Color(0xff96B7BF), 37 | 38 | // Colors.green[100], 39 | // Colors.blue[200], 40 | ], 41 | begin: Alignment.topLeft, 42 | end: Alignment.bottomLeft, 43 | ), 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | coaching_app 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /assets/images/logIn.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/images/logOut.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/screens/meeting_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/utilities/universal_variables.dart'; 2 | import "package:flutter/material.dart"; 3 | import 'create_meeting_screen.dart'; 4 | import 'join_meeting_screen.dart'; 5 | 6 | class MeetingScreen extends StatefulWidget { 7 | static const routeName = '/MeetingScreen'; 8 | 9 | @override 10 | _MeetingScreenState createState() => _MeetingScreenState(); 11 | } 12 | 13 | class _MeetingScreenState extends State 14 | with SingleTickerProviderStateMixin { 15 | TabController? tabController; 16 | tabBuilder(String name) { 17 | return Container( 18 | width: 150, 19 | height: 50, 20 | child: Card( 21 | child: Center( 22 | child: Text( 23 | name, 24 | style: ralewayStyle( 25 | 15, 26 | Colors.black, 27 | ), 28 | ), 29 | ), 30 | ), 31 | ); 32 | } 33 | 34 | @override 35 | void initState() { 36 | super.initState(); 37 | tabController = TabController(length: 2, vsync: this); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Scaffold( 43 | appBar: AppBar( 44 | title: Text( 45 | "Coaching App", 46 | style: ralewayStyle(20, Colors.white), 47 | ), 48 | centerTitle: true, 49 | backgroundColor: Color(0xFF07A8B2), 50 | bottom: TabBar( 51 | controller: tabController, 52 | tabs: [ 53 | tabBuilder("Join Meeting"), 54 | tabBuilder("Create Meeting"), 55 | ], 56 | ), 57 | ), 58 | body: TabBarView( 59 | controller: tabController, 60 | children: [ 61 | JoinMeetingScreen(), 62 | CreateMeeetingScreen(), 63 | ], 64 | ), 65 | ); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | apply plugin: 'com.google.gms.google-services' 28 | 29 | android { 30 | compileSdkVersion 31 31 | 32 | sourceSets { 33 | main.java.srcDirs += 'src/main/kotlin' 34 | } 35 | 36 | defaultConfig { 37 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 38 | applicationId "com.hassan.coaching_app" 39 | minSdkVersion 23 40 | targetSdkVersion 31 41 | versionCode flutterVersionCode.toInteger() 42 | versionName flutterVersionName 43 | } 44 | 45 | buildTypes { 46 | release { 47 | // TODO: Add your own signing config for the release build. 48 | // Signing with the debug keys for now, so `flutter run --release` works. 49 | signingConfig signingConfigs.debug 50 | minifyEnabled true 51 | useProguard false 52 | // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | implementation platform('com.google.firebase:firebase-bom:28.4.1') 65 | implementation 'com.google.firebase:firebase-analytics-ktx' 66 | 67 | 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/services/global_method.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GlobalMethods { 4 | Future showDialogg( 5 | String title, String subtitle, Function fct, BuildContext context) async { 6 | showDialog( 7 | context: context, 8 | builder: (BuildContext ctx) { 9 | return AlertDialog( 10 | title: Row( 11 | children: [ 12 | Padding( 13 | padding: const EdgeInsets.only(right: 6.0), 14 | child: Image.network( 15 | 'https://image.flaticon.com/icons/png/128/564/564619.png', 16 | height: 20, 17 | width: 20, 18 | ), 19 | ), 20 | Padding( 21 | padding: const EdgeInsets.all(8.0), 22 | child: Text(title), 23 | ), 24 | ], 25 | ), 26 | content: Text(subtitle), 27 | actions: [ 28 | TextButton( 29 | onPressed: () => Navigator.pop(context), 30 | child: Text('Cancel')), 31 | TextButton( 32 | onPressed: () { 33 | fct(); 34 | Navigator.pop(context); 35 | }, 36 | child: Text('ok')) 37 | ], 38 | ); 39 | }); 40 | } 41 | 42 | Future authErrorHandle(String subtitle, BuildContext context) async { 43 | showDialog( 44 | context: context, 45 | builder: (BuildContext ctx) { 46 | return AlertDialog( 47 | title: Row( 48 | children: [ 49 | Padding( 50 | padding: const EdgeInsets.only(right: 6.0), 51 | child: Image.network( 52 | 'https://image.flaticon.com/icons/png/128/564/564619.png', 53 | height: 20, 54 | width: 20, 55 | ), 56 | ), 57 | Padding( 58 | padding: const EdgeInsets.all(8.0), 59 | child: Text('Error occured'), 60 | ), 61 | ], 62 | ), 63 | content: Text(subtitle), 64 | actions: [ 65 | 66 | TextButton( 67 | onPressed: () { 68 | Navigator.pop(context); 69 | }, 70 | child: Text('Ok')) 71 | ], 72 | ); 73 | }); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /lib/database/local_database.dart: -------------------------------------------------------------------------------- 1 | import 'package:get_storage/get_storage.dart'; 2 | 3 | class UserLocalData { 4 | String s = 'sd'; 5 | final getStorageProference = GetStorage(); 6 | 7 | // Future init() async => _preferences = await SharedPreferences.getInstance(); 8 | 9 | // Future logOut() => _preferences.clear(); 10 | 11 | Future logOut() => getStorageProference.erase(); 12 | final _userModelString = 'USERMODELSTRING'; 13 | final _uidKey = 'UIDKEY'; 14 | final _isLoggedIn = "ISLOGGEDIN"; 15 | final _emailKey = 'EMAILKEY'; 16 | final _userNameKey = 'USERNAMEKEY'; 17 | // final _phoneNumberKey = 'PhoneNumber'; 18 | // final _imageUrlKey = 'IMAGEURLKEY'; 19 | // final _password = 'PASSWORD'; 20 | final _isAdmin = 'ISADMIN'; 21 | final _token = 'TOKEN'; 22 | final _branches = 'BRANCHES'; 23 | final _classes = 'CLASSES'; 24 | 25 | // 26 | // Setters 27 | // 28 | 29 | Future setUserModel(String userModel) async => 30 | getStorageProference.write(_userModelString, userModel); 31 | Future setUserEmail(String? email) async => 32 | getStorageProference.write(_emailKey, email); 33 | Future setUserName(String? userName) async => 34 | getStorageProference.write(_userNameKey, userName); 35 | Future setToken(String token) async => 36 | getStorageProference.write(_token, token); 37 | 38 | Future setBranches(String branches) async => 39 | getStorageProference.write(_branches, branches); 40 | Future setClasses(String classes) async => 41 | getStorageProference.write(_classes, classes); 42 | 43 | Future setIsAdmin(bool? isAdmin) async => 44 | getStorageProference.write(_isAdmin, isAdmin); 45 | 46 | Future setUserUID(String? uid) async => 47 | getStorageProference.write(_uidKey, uid); 48 | 49 | Future setNotLoggedIn() async => 50 | getStorageProference.write(_isLoggedIn, false); 51 | 52 | Future setLoggedIn(bool isLoggedIn) async => 53 | getStorageProference.write(_isLoggedIn, isLoggedIn); 54 | 55 | // 56 | // Getters 57 | // 58 | bool? getIsAdmin() => getStorageProference.read(_isAdmin); 59 | String getUserData() => getStorageProference.read(_userModelString) ?? ''; 60 | String getBranches() => getStorageProference.read(_branches) ?? ""; 61 | String getClasses() => getStorageProference.read(_classes) ?? ""; 62 | 63 | String getUserUIDGet() => getStorageProference.read(_uidKey) ?? ''; 64 | bool? isLoggedIn() => getStorageProference.read(_uidKey); 65 | String getUserEmail() => getStorageProference.read(_emailKey) ?? ''; 66 | String getUserName() => getStorageProference.read(_userNameKey) ?? ''; 67 | } 68 | -------------------------------------------------------------------------------- /lib/models/appointmentsModel.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:cloud_firestore/cloud_firestore.dart'; 3 | 4 | class AppointmentsModel { 5 | final String? appointmentId; 6 | final String? appointmentTitle; 7 | final String? description; 8 | final Timestamp? startingTime; 9 | final Timestamp? endingTime; 10 | final Timestamp? appointmentDate; 11 | 12 | AppointmentsModel({ 13 | this.appointmentId, 14 | this.appointmentTitle, 15 | this.description, 16 | this.startingTime, 17 | this.endingTime, 18 | this.appointmentDate, 19 | }); 20 | 21 | 22 | 23 | factory AppointmentsModel.fromDocument(doc) { 24 | return AppointmentsModel( 25 | appointmentId: doc.data()["appointmentId"], 26 | appointmentTitle: doc.data()["appointmentTitle"], 27 | startingTime: doc.data()["startingTime"], 28 | endingTime: doc.data()["endingTime"], 29 | appointmentDate: doc.data()["appointmentDate"], 30 | description: doc.data()["description"], 31 | ); 32 | } 33 | 34 | AppointmentsModel copyWith({ 35 | String? appointmentId, 36 | String? appointmentTitle, 37 | String? description, 38 | Timestamp? startingTime, 39 | Timestamp? endingTime, 40 | Timestamp? appointmentDate, 41 | }) { 42 | return AppointmentsModel( 43 | appointmentId: appointmentId ?? this.appointmentId, 44 | appointmentTitle: appointmentTitle ?? this.appointmentTitle, 45 | description: description ?? this.description, 46 | startingTime: startingTime ?? this.startingTime, 47 | endingTime: endingTime ?? this.endingTime, 48 | appointmentDate: appointmentDate ?? this.appointmentDate, 49 | ); 50 | } 51 | 52 | 53 | 54 | @override 55 | String toString() { 56 | return 'AppointmentsModel(appointmentId: $appointmentId, appointmentTitle: $appointmentTitle, description: $description, startingTime: $startingTime, endingTime: $endingTime, appointmentDate: $appointmentDate)'; 57 | } 58 | 59 | @override 60 | bool operator ==(Object other) { 61 | if (identical(this, other)) return true; 62 | 63 | return other is AppointmentsModel && 64 | other.appointmentId == appointmentId && 65 | other.appointmentTitle == appointmentTitle && 66 | other.description == description && 67 | other.startingTime == startingTime && 68 | other.endingTime == endingTime && 69 | other.appointmentDate == appointmentDate; 70 | } 71 | 72 | @override 73 | int get hashCode { 74 | return appointmentId.hashCode ^ 75 | appointmentTitle.hashCode ^ 76 | description.hashCode ^ 77 | startingTime.hashCode ^ 78 | endingTime.hashCode ^ 79 | appointmentDate.hashCode; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/screens/create_meeting_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/consts/colors.dart'; 2 | import 'package:coaching_app/utilities/universal_variables.dart'; 3 | import "package:flutter/material.dart"; 4 | import 'package:flutter_gradient_colors/flutter_gradient_colors.dart'; 5 | import 'package:uuid/uuid.dart'; 6 | 7 | class CreateMeeetingScreen extends StatefulWidget { 8 | @override 9 | _CreateMeeetingScreenState createState() => _CreateMeeetingScreenState(); 10 | } 11 | 12 | class _CreateMeeetingScreenState extends State { 13 | String code = ""; 14 | var isVis = false; 15 | 16 | generateMeetingCode() { 17 | setState(() { 18 | code = Uuid().v1().substring(0, 6); 19 | isVis = true; 20 | }); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Container( 26 | decoration: backgroundColorBoxDecoration(), 27 | child: Scaffold( 28 | backgroundColor: Colors.transparent, 29 | body: Column( 30 | mainAxisAlignment: MainAxisAlignment.center, 31 | children: [ 32 | Container( 33 | margin: EdgeInsets.only(top: 20), 34 | child: Text( 35 | "Create a code to create a meeting!", 36 | style: montserratStyle(20), 37 | textAlign: TextAlign.center, 38 | ), 39 | ), 40 | SizedBox( 41 | height: 40, 42 | ), 43 | isVis == true 44 | ? Row( 45 | mainAxisAlignment: MainAxisAlignment.center, 46 | children: [ 47 | Text( 48 | "Code: ", 49 | style: ralewayStyle(30), 50 | ), 51 | Text( 52 | code, 53 | style: montserratStyle(30, Colors.red, FontWeight.w700), 54 | ), 55 | ], 56 | ) 57 | : Container(), 58 | SizedBox( 59 | height: 20, 60 | ), 61 | InkWell( 62 | onTap: generateMeetingCode, 63 | child: Container( 64 | width: MediaQuery.of(context).size.width / 2, 65 | height: 50, 66 | decoration: BoxDecoration( 67 | gradient: LinearGradient( 68 | colors: GradientColors.facebookMessenger, 69 | ), 70 | ), 71 | child: Center( 72 | child: Text( 73 | "Create Code", 74 | style: montserratStyle(20, Colors.white), 75 | ), 76 | ), 77 | ), 78 | ), 79 | ], 80 | ), 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/screens/auth/introduction_auth_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/screens/auth/navigate_auth_screen.dart'; 2 | import 'package:coaching_app/utilities/universal_variables.dart'; 3 | import "package:flutter/material.dart"; 4 | import 'package:introduction_screen/introduction_screen.dart'; 5 | 6 | class IntroductionAuthScreen extends StatefulWidget { 7 | @override 8 | _IntroductionAuthScreenState createState() => _IntroductionAuthScreenState(); 9 | } 10 | 11 | class _IntroductionAuthScreenState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return IntroductionScreen( 15 | pages: [ 16 | PageViewModel( 17 | title: "Welcome", 18 | body: "Welcome to Coaching App", 19 | decoration: PageDecoration( 20 | bodyTextStyle: ralewayStyle(20, Colors.black), 21 | titleTextStyle: montserratStyle(20, Colors.black), 22 | ), 23 | image: Center( 24 | child: Image( 25 | image: NetworkImage( 26 | "https://static01.nyt.com/images/2020/03/25/business/25Techfix-illo/25Techfix-illo-mobileMasterAt3x.jpg", 27 | ), 28 | ), 29 | ), 30 | ), 31 | PageViewModel( 32 | title: "Create & Join Meetings", 33 | body: 34 | "Create Meeting codes and join meeting with codes with just a single click", 35 | decoration: PageDecoration( 36 | bodyTextStyle: ralewayStyle(20, Colors.black), 37 | titleTextStyle: montserratStyle(20, Colors.black), 38 | ), 39 | image: Center( 40 | child: Image( 41 | image: NetworkImage( 42 | "https://static01.nyt.com/images/2020/03/25/business/25Techfix-illo/25Techfix-illo-mobileMasterAt3x.jpg", 43 | ), 44 | ), 45 | ), 46 | ), 47 | PageViewModel( 48 | title: "Privacy", 49 | body: "We Respect your Privacy", 50 | decoration: PageDecoration( 51 | bodyTextStyle: ralewayStyle(20, Colors.black), 52 | titleTextStyle: montserratStyle(20, Colors.black), 53 | ), 54 | image: Center( 55 | child: Image( 56 | image: NetworkImage( 57 | "https://www.pngitem.com/pimgs/m/74-745197_cyber-security-png-png-download-computer-security-png.png", 58 | ), 59 | ), 60 | ), 61 | ), 62 | ], 63 | onDone: () { 64 | Navigator.of(context) 65 | .push(MaterialPageRoute(builder: (ctx) => NavigateAuthScreen())); 66 | }, 67 | onSkip: () {}, 68 | showSkipButton: true, 69 | skip: const Icon( 70 | Icons.skip_next, 71 | size: 45, 72 | ), 73 | next: const Icon(Icons.arrow_forward), 74 | done: Text( 75 | "DONE", 76 | style: ralewayStyle(20, Colors.black), 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 34 | 38 | 42 | 43 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 58 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/screens/landingPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/consts/colors.dart'; 2 | import 'package:coaching_app/consts/neuomorphic.dart'; 3 | import 'package:coaching_app/screens/user_info.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:url_launcher/url_launcher.dart'; 8 | 9 | import 'create_meeting_screen.dart'; 10 | import 'join_meeting_screen.dart'; 11 | 12 | class LandingPage extends StatefulWidget { 13 | static const routeName = '/LandingPage'; 14 | @override 15 | _LandingPageState createState() => _LandingPageState(); 16 | } 17 | 18 | class _LandingPageState extends State { 19 | bool _isLoading = false; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return SafeArea( 24 | child: Container( 25 | decoration: backgroundColorBoxDecoration(), 26 | child: Scaffold( 27 | backgroundColor: Colors.transparent, 28 | body: SingleChildScrollView( 29 | child: Center( 30 | child: Column( 31 | mainAxisAlignment: MainAxisAlignment.center, 32 | crossAxisAlignment: CrossAxisAlignment.center, 33 | children: [ 34 | SizedBox( 35 | height: MediaQuery.of(context).size.height * 0.08, 36 | ), 37 | SizedBox( 38 | height: MediaQuery.of(context).size.height * 0.08, 39 | ), 40 | GestureDetector( 41 | onTap: () { 42 | Navigator.of(context).push(MaterialPageRoute( 43 | builder: (context) => JoinMeetingScreen())); 44 | }, 45 | child: EditedNeuomprphicContainer( 46 | text: "Join Meeting", 47 | ), 48 | ), 49 | GestureDetector( 50 | onTap: () { 51 | Navigator.of(context).push(MaterialPageRoute( 52 | builder: (context) => CreateMeeetingScreen())); 53 | }, 54 | child: EditedNeuomprphicContainer( 55 | text: "Create Meeting", 56 | ), 57 | ), 58 | GestureDetector( 59 | onTap: () { 60 | Navigator.of(context).push(MaterialPageRoute( 61 | builder: (context) => ProfilePage())); 62 | }, 63 | child: EditedNeuomprphicContainer( 64 | text: "Check Profile", 65 | ), 66 | ), 67 | ], 68 | ), 69 | ), 70 | ), 71 | ), 72 | ), 73 | ); 74 | } 75 | 76 | Future _launchInBrowser(String url) async { 77 | if (await canLaunch(url)) { 78 | await launch( 79 | url, 80 | forceSafariVC: false, 81 | forceWebView: false, 82 | headers: {'my_header_key': 'my_header_value'}, 83 | ); 84 | } else { 85 | throw 'Could not launch $url'; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/consts/constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | String logo = "assets/images/logo.png"; 4 | String logoBackground = "assets/images/logoBackground.jpeg"; 5 | String loginIcon = "assets/images/logIn.svg"; 6 | String logOutIcon = "assets/images/logOut.svg"; 7 | String signUp = "assets/images/signUp.svg"; 8 | String googleLogo = "assets/images/google.png"; 9 | String facebookLogo = "assets/images/facebook.png"; 10 | String emailIcon = "assets/images/email.png"; 11 | String forgetPassPageIcon = "assets/images/MaskGroup1.png"; 12 | String appointmentLottie = "assets/lottie/appointment-booking.json"; 13 | String videoLottie = "assets/lottie/video-design.json"; 14 | String userDetailsLottie = "assets/lottie/userDetails.json"; 15 | String aboutUsIcon = "assets/images/aboutUs.png"; 16 | 17 | TextStyle titleTextStyle({double fontSize = 25, Color color = Colors.black}) { 18 | return TextStyle( 19 | fontSize: fontSize, 20 | fontWeight: FontWeight.w600, 21 | color: color, 22 | letterSpacing: 1.8); 23 | } 24 | 25 | TextStyle averageTextStyle({double fontSize = 18, Color color = Colors.black}) { 26 | return TextStyle( 27 | fontSize: fontSize, 28 | fontWeight: FontWeight.w300, 29 | color: color, 30 | letterSpacing: 1.8); 31 | } 32 | 33 | Color containerColor = Colors.blue; 34 | // Color(0xff96B7BF); 35 | 36 | // Colors.white; 37 | // Color(0xffFED5E3); 38 | BoxDecoration backgroundColorBoxDecorationLogo() { 39 | return BoxDecoration( 40 | image: DecorationImage( 41 | image: AssetImage(logo), 42 | colorFilter: ColorFilter.mode(Colors.white70, BlendMode.srcATop), 43 | alignment: Alignment.center, 44 | scale: 0.3), 45 | gradient: LinearGradient( 46 | colors: [ 47 | // Color(0xff387A53), 48 | // Color(0xff8BE78B), 49 | 50 | Colors.white, 51 | Color(0xff96B7BF), 52 | 53 | // Colors.green[100], 54 | // Colors.blue[200], 55 | ], 56 | begin: Alignment.topLeft, 57 | end: Alignment.bottomLeft, 58 | ), 59 | ); 60 | } 61 | 62 | BoxDecoration backgroundColorBoxDecoration() { 63 | return BoxDecoration( 64 | gradient: LinearGradient( 65 | colors: [ 66 | // Color(0xff387A53), 67 | // Color(0xff8BE78B), 68 | 69 | Colors.white, 70 | Colors.blue, 71 | // Color(0xffFED5E3), 72 | // Color(0xff96B7BF), 73 | 74 | // Colors.green[100], 75 | // Colors.blue[200], 76 | ], 77 | begin: Alignment.topLeft, 78 | end: Alignment.bottomLeft, 79 | ), 80 | ); 81 | } 82 | 83 | TextStyle customTextStyle( 84 | {FontWeight fontWeight = FontWeight.w300, 85 | double fontSize = 25, 86 | Color color = Colors.black}) { 87 | return TextStyle( 88 | fontSize: fontSize, 89 | fontWeight: fontWeight, 90 | color: color, 91 | letterSpacing: 3); 92 | } 93 | 94 | BoxDecoration drawerColorBoxDecoration() { 95 | return BoxDecoration( 96 | gradient: LinearGradient( 97 | colors: [ 98 | // Color(0xff8BE78B), 99 | Colors.black, 100 | Colors.green.shade100, 101 | ], 102 | begin: Alignment.bottomRight, 103 | end: Alignment.topLeft, 104 | ), 105 | ); 106 | } 107 | -------------------------------------------------------------------------------- /assets/images/signUp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 13 | 19 | 21 | 23 | 25 | 27 | 30 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: coaching_app 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | image_picker: 27 | uuid: 28 | wave: 29 | fluttertoast: 30 | provider: 31 | introduction_screen: 32 | flutter_gradient_colors: 33 | google_fonts: 34 | font_awesome_flutter: 35 | glassmorphism_ui: 36 | flutter_local_notifications: 37 | firebase_messaging: 38 | firebase_storage: 39 | cloud_firestore: 40 | firebase_auth: 41 | firebase_core: 42 | get_storage: 43 | animated_splash_screen: 44 | list_tile_switch: 45 | pin_code_fields: 46 | jitsi_meet: 47 | url_launcher: 48 | get: 49 | bot_toast: 50 | # The following adds the Cupertino Icons font to your application. 51 | # Use with the CupertinoIcons class for iOS style icons. 52 | cupertino_icons: ^1.0.2 53 | 54 | dev_dependencies: 55 | flutter_test: 56 | sdk: flutter 57 | 58 | # For information on the generic Dart part of this file, see the 59 | # following page: https://dart.dev/tools/pub/pubspec 60 | 61 | # The following section is specific to Flutter. 62 | flutter: 63 | 64 | # The following line ensures that the Material Icons font is 65 | # included with your application, so that you can use the icons in 66 | # the material Icons class. 67 | uses-material-design: true 68 | 69 | # To add assets to your application, add an assets section, like this: 70 | assets: 71 | - assets/ 72 | 73 | # An image asset can refer to one or more resolution-specific "variants", see 74 | # https://flutter.dev/assets-and-images/#resolution-aware. 75 | 76 | # For details regarding adding assets from package dependencies, see 77 | # https://flutter.dev/assets-and-images/#from-packages 78 | 79 | # To add custom fonts to your application, add a fonts section here, 80 | # in this "flutter" section. Each entry in this list should have a 81 | # "family" key with the font family name, and a "fonts" key with a 82 | # list giving the asset and other descriptors for the font. For 83 | # example: 84 | # fonts: 85 | # - family: Schyler 86 | # fonts: 87 | # - asset: fonts/Schyler-Regular.ttf 88 | # - asset: fonts/Schyler-Italic.ttf 89 | # style: italic 90 | # - family: Trajan Pro 91 | # fonts: 92 | # - asset: fonts/TrajanPro.ttf 93 | # - asset: fonts/TrajanPro_Bold.ttf 94 | # weight: 700 95 | # 96 | # For details regarding fonts from package dependencies, 97 | # see https://flutter.dev/custom-fonts/#from-packages 98 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/bottom_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/screens/meeting_screen.dart'; 2 | import 'package:coaching_app/screens/user_info.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'consts/my_icons.dart'; 6 | 7 | class BottomBarScreen extends StatefulWidget { 8 | static const routeName = '/BottomBarScreen'; 9 | @override 10 | _BottomBarScreenState createState() => _BottomBarScreenState(); 11 | } 12 | 13 | class _BottomBarScreenState extends State { 14 | // List> _pages; 15 | int _selectedPageIndex = 0; 16 | late List pages; 17 | @override 18 | void initState() { 19 | pages = [ 20 | MeetingScreen(), 21 | ProfilePage(), 22 | ]; 23 | // _pages = [ 24 | // { 25 | // 'page': Home(), 26 | // }, 27 | // { 28 | // 'page': Feeds(), 29 | // }, 30 | // { 31 | // 'page': Search(), 32 | // }, 33 | // { 34 | // 'page': CartScreen(), 35 | // }, 36 | // { 37 | // 'page': UserInfo(), 38 | // }, 39 | // ]; 40 | super.initState(); 41 | } 42 | 43 | void _selectPage(int index) { 44 | setState(() { 45 | _selectedPageIndex = index; 46 | }); 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | return Scaffold( 52 | body: pages[_selectedPageIndex], //_pages[_selectedPageIndex]['page'], 53 | bottomNavigationBar: BottomAppBar( 54 | color: Colors.white, 55 | shape: CircularNotchedRectangle(), 56 | notchMargin: 0.01, 57 | clipBehavior: Clip.antiAlias, 58 | child: Container( 59 | height: kBottomNavigationBarHeight * 0.98, 60 | child: Container( 61 | decoration: BoxDecoration( 62 | color: Colors.white, 63 | border: Border( 64 | top: BorderSide( 65 | color: Colors.grey, 66 | width: 0.5, 67 | ), 68 | ), 69 | ), 70 | child: BottomNavigationBar( 71 | onTap: _selectPage, 72 | backgroundColor: Theme.of(context).primaryColor, 73 | unselectedItemColor: Theme.of(context).textSelectionColor, 74 | selectedItemColor: Colors.purple, 75 | currentIndex: _selectedPageIndex, 76 | // selectedLabelStyle: TextStyle(fontSize: 16), 77 | items: [ 78 | BottomNavigationBarItem( 79 | icon: Icon(MyAppIcons.home), 80 | // title: Text('Home'), 81 | label: 'Home', 82 | ), 83 | // BottomNavigationBarItem( 84 | // icon: Icon(Icons.room_service), label: 'Services'), 85 | // BottomNavigationBarItem( 86 | // activeIcon: null, icon: Icon(null), label: 'Search'), 87 | // BottomNavigationBarItem( 88 | // icon: Icon( 89 | // MyAppIcons.bag, 90 | // ), 91 | // label: 'Cart'), 92 | BottomNavigationBarItem( 93 | icon: Icon(MyAppIcons.user), label: 'User'), 94 | ], 95 | ), 96 | ), 97 | ), 98 | ), 99 | // floatingActionButtonLocation: 100 | // FloatingActionButtonLocation.miniCenterDocked, 101 | // floatingActionButton: Padding( 102 | // padding: const EdgeInsets.all(8.0), 103 | // child: FloatingActionButton( 104 | // backgroundColor: Colors.purple, 105 | // hoverElevation: 10, 106 | // splashColor: Colors.grey, 107 | // tooltip: 'Search', 108 | // elevation: 4, 109 | // child: Icon(MyAppIcons.search), 110 | // onPressed: () => setState(() { 111 | // _selectedPageIndex = 2; 112 | // }), 113 | // ), 114 | // ), 115 | ); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:animated_splash_screen/animated_splash_screen.dart'; 4 | import 'package:bot_toast/bot_toast.dart'; 5 | import 'package:coaching_app/bottom_bar.dart'; 6 | import 'package:coaching_app/screens/auth/forget_password.dart'; 7 | import 'package:coaching_app/screens/auth/login.dart'; 8 | import 'package:coaching_app/screens/auth/sign_up.dart'; 9 | import 'package:coaching_app/screens/landingPage.dart'; 10 | import 'package:coaching_app/screens/main_screen.dart'; 11 | import 'package:coaching_app/screens/meeting_screen.dart'; 12 | import 'package:coaching_app/user_state.dart'; 13 | import 'package:firebase_core/firebase_core.dart'; 14 | import 'package:firebase_messaging/firebase_messaging.dart'; 15 | import 'package:flutter/material.dart'; 16 | import 'package:flutter_local_notifications/flutter_local_notifications.dart'; 17 | import 'package:get/get.dart'; 18 | import 'package:get_storage/get_storage.dart'; 19 | import 'consts/colllections.dart'; 20 | import 'consts/constants.dart'; 21 | import 'database/local_database.dart'; 22 | import 'models/users.dart'; 23 | 24 | const AndroidNotificationChannel channel = AndroidNotificationChannel( 25 | "high_importance_channel", 26 | "High Importance Notifications", 27 | importance: Importance.high, 28 | playSound: true, 29 | ); 30 | 31 | final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = 32 | FlutterLocalNotificationsPlugin(); 33 | 34 | Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { 35 | await Firebase.initializeApp(); 36 | } 37 | 38 | Future main() async { 39 | WidgetsFlutterBinding.ensureInitialized(); 40 | 41 | await GetStorage.init(); 42 | await Firebase.initializeApp(); 43 | FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); 44 | 45 | await flutterLocalNotificationsPlugin 46 | .resolvePlatformSpecificImplementation< 47 | AndroidFlutterLocalNotificationsPlugin>() 48 | ?.createNotificationChannel(channel); 49 | 50 | await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( 51 | alert: true, 52 | badge: true, 53 | sound: true, 54 | ); 55 | runApp(MyApp()); 56 | } 57 | 58 | class MyApp extends StatelessWidget { 59 | // This widget is the root of your application. 60 | 61 | @override 62 | Widget build(BuildContext context) { 63 | UserLocalData().setNotLoggedIn(); 64 | String? currentuserString = UserLocalData().getUserData(); 65 | print(currentuserString); 66 | if (currentuserString.isNotEmpty && 67 | currentuserString != "" && 68 | currentuserString != "USERMODELSTRING") { 69 | currentUser = AppUserModel.fromMap(json.decode(currentuserString)); 70 | isAdmin = UserLocalData().getIsAdmin(); 71 | } 72 | 73 | return GetMaterialApp( 74 | title: 'Coaching App', 75 | builder: BotToastInit(), 76 | navigatorObservers: [BotToastNavigatorObserver()], 77 | theme: ThemeData( 78 | visualDensity: VisualDensity.adaptivePlatformDensity, 79 | primaryColor: Color(0xFF07A8B2), 80 | accentColor: Colors.blue, 81 | // scaffoldBackgroundColor: Colors.transparent, 82 | appBarTheme: AppBarTheme(color: Color(0xff96B7BF)), 83 | canvasColor: Colors.white, 84 | ), 85 | routes: { 86 | // '/': (ctx) => LandingPage(), 87 | // WebhookPaymentScreen.routeName: (ctx) => 88 | // WebhookPaymentScreen(), 89 | LandingPage.routeName: (ctx) => LandingPage(), 90 | 91 | MainScreens.routeName: (ctx) => MainScreens(), 92 | LoginScreen.routeName: (ctx) => LoginScreen(), 93 | SignUpScreen.routeName: (ctx) => SignUpScreen(), 94 | MeetingScreen.routeName: (ctx) => MeetingScreen(), 95 | BottomBarScreen.routeName: (ctx) => BottomBarScreen(), 96 | ForgetPassword.routeName: (ctx) => ForgetPassword(), 97 | }, 98 | home: UserState() 99 | // ), 100 | ); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /lib/screens/auth/navigate_auth_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/screens/auth/login.dart'; 2 | import 'package:coaching_app/screens/auth/sign_up.dart'; 3 | import 'package:coaching_app/utilities/universal_variables.dart'; 4 | import "package:flutter/material.dart"; 5 | import 'package:flutter_gradient_colors/flutter_gradient_colors.dart'; 6 | 7 | class NavigateAuthScreen extends StatefulWidget { 8 | @override 9 | _NavigateAuthScreenState createState() => _NavigateAuthScreenState(); 10 | } 11 | 12 | class _NavigateAuthScreenState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | body: Stack( 17 | children: [ 18 | Container( 19 | width: MediaQuery.of(context).size.width, 20 | height: MediaQuery.of(context).size.height / 2, 21 | decoration: BoxDecoration( 22 | gradient: LinearGradient( 23 | colors: GradientColors.blue, 24 | ), 25 | ), 26 | child: Center( 27 | child: Text( 28 | "Coaching App", 29 | style: montserratStyle(45, Colors.black), 30 | ), 31 | ), 32 | ), 33 | Align( 34 | alignment: Alignment.bottomLeft, 35 | child: Container( 36 | width: MediaQuery.of(context).size.width, 37 | height: MediaQuery.of(context).size.height / 1.6, 38 | margin: EdgeInsets.only(left: 30, right: 30), 39 | decoration: BoxDecoration( 40 | boxShadow: [ 41 | BoxShadow( 42 | color: Colors.grey.withOpacity(0.5), 43 | spreadRadius: 5, 44 | blurRadius: 5, 45 | offset: const Offset(0, 3), 46 | ), 47 | ], 48 | color: Colors.white, 49 | borderRadius: BorderRadius.only( 50 | topLeft: Radius.circular(20), 51 | topRight: Radius.circular(20)), 52 | ), 53 | child: Column( 54 | mainAxisAlignment: MainAxisAlignment.center, 55 | children: [ 56 | InkWell( 57 | onTap: () => Navigator.of(context).push( 58 | MaterialPageRoute(builder: (ctx) => LoginScreen())), 59 | child: Container( 60 | width: MediaQuery.of(context).size.width / 2, 61 | height: 60, 62 | decoration: BoxDecoration( 63 | gradient: LinearGradient(colors: GradientColors.blue), 64 | borderRadius: BorderRadius.circular(20), 65 | ), 66 | child: Center( 67 | child: Text( 68 | "Login", 69 | style: ralewayStyle(30, Colors.white), 70 | ), 71 | ), 72 | ), 73 | ), 74 | SizedBox( 75 | height: 40, 76 | ), 77 | InkWell( 78 | onTap: () => Navigator.of(context).push( 79 | MaterialPageRoute(builder: (ctx) => SignUpScreen())), 80 | child: Container( 81 | width: MediaQuery.of(context).size.width / 2, 82 | height: 60, 83 | decoration: BoxDecoration( 84 | gradient: LinearGradient(colors: GradientColors.pink), 85 | borderRadius: BorderRadius.circular(20), 86 | ), 87 | child: Center( 88 | child: Text( 89 | "Sign Up", 90 | style: ralewayStyle(30, Colors.white), 91 | ), 92 | ), 93 | ), 94 | ), 95 | ], 96 | ), 97 | ), 98 | ), 99 | ], 100 | ), 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /lib/database/database.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:cloud_firestore/cloud_firestore.dart'; 3 | import 'package:coaching_app/consts/colllections.dart'; 4 | import 'package:coaching_app/models/announcementsModel.dart'; 5 | import 'package:coaching_app/models/users.dart'; 6 | import 'package:coaching_app/utilities/custom_toast.dart'; 7 | import 'package:firebase_messaging/firebase_messaging.dart'; 8 | import 'package:flutter/material.dart'; 9 | 10 | import 'local_database.dart'; 11 | 12 | 13 | class DatabaseMethods { 14 | // Future> getproductData() async { 15 | // return FirebaseFirestore.instance.collection(productCollection).snapshots(); 16 | // } 17 | 18 | Future addUserInfoToFirebase( 19 | {required AppUserModel userModel, 20 | required String userId, 21 | required bool isStuTeacher, 22 | required email}) async { 23 | print("addUserInfoToFirebase"); 24 | final Map userInfoMap = json.decode(userModel.toJson()); 25 | return userRef.doc(userId).set(userInfoMap).then((value) { 26 | if (!isStuTeacher) { 27 | currentUser = userModel; 28 | UserLocalData().setUserModel(userModel.toJson()); 29 | UserLocalData().setUserEmail(userModel.email); 30 | UserLocalData().setUserName(userModel.userName); 31 | UserLocalData().setIsAdmin(userModel.isAdmin); 32 | } 33 | }).catchError( 34 | (Object obj) { 35 | errorToast(message: obj.toString()); 36 | }, 37 | ); 38 | } 39 | 40 | 41 | 42 | addAnnouncements( 43 | {required final String postId, 44 | required final String announcementTitle, 45 | required final String imageUrl, 46 | required final String eachUserId, 47 | required String eachUserToken, 48 | required final String description}) async { 49 | FirebaseFirestore.instance 50 | .collection("announcements") 51 | .doc(eachUserId) 52 | .collection("userAnnouncements") 53 | .doc(postId) 54 | .set({ 55 | "announcementId": postId, 56 | "announcementTitle": announcementTitle, 57 | "description": description, 58 | "timestamp": DateTime.now(), 59 | "token": eachUserToken, 60 | "imageUrl": imageUrl, 61 | "userId": currentUser!.id 62 | }); 63 | } 64 | 65 | Future getAnnouncements() async { 66 | List tempAllAnnouncements = []; 67 | QuerySnapshot tempAnnouncementsSnapshot = await FirebaseFirestore.instance 68 | .collection('announcements') 69 | .doc(currentUser!.id) 70 | .collection("userAnnouncements") 71 | .get(); 72 | tempAnnouncementsSnapshot.docs.forEach((element) { 73 | tempAllAnnouncements.add(AnnouncementsModel.fromDocument(element)); 74 | }); 75 | return tempAllAnnouncements; 76 | } 77 | 78 | Future fetchUserInfoFromFirebase({ 79 | required String uid, 80 | }) async { 81 | final DocumentSnapshot _user = await userRef.doc(uid).get(); 82 | currentUser = AppUserModel.fromDocument(_user); 83 | createToken(uid); 84 | UserLocalData().setIsAdmin(currentUser!.isAdmin); 85 | Map userData = json.decode(currentUser!.toJson()); 86 | UserLocalData().setUserModel(json.encode(userData)); 87 | var user = UserLocalData().getUserData(); 88 | print(user); 89 | isAdmin = currentUser!.isAdmin; 90 | print(currentUser!.email); 91 | } 92 | 93 | Future fetchCalenderDataFromFirebase() async { 94 | final QuerySnapshot calenderMeetings = await calenderRef.get(); 95 | 96 | return calenderMeetings; 97 | } 98 | 99 | // Future fetchPostsDataFromFirebase() async { 100 | // final QuerySnapshot allPostsSnapshots = await postsRef.get(); 101 | 102 | // return allPostsSnapshots; 103 | // } 104 | 105 | createToken(String uid) { 106 | FirebaseMessaging.instance.getToken().then((token) { 107 | userRef.doc(uid).update({"androidNotificationToken": token}); 108 | UserLocalData().setToken(token!); 109 | }); 110 | } 111 | 112 | Future fetchAppointmentDataFromFirebase({@required String? uid}) async { 113 | final QuerySnapshot allAppointmentsSnapshots = 114 | await appointmentsRef.doc(uid).collection("userAppointments").get(); 115 | 116 | return allAppointmentsSnapshots; 117 | } 118 | 119 | } 120 | -------------------------------------------------------------------------------- /lib/models/users.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | class AppUserModel { 4 | final String? id; 5 | final String? userName; 6 | final String? firstName; 7 | final String? lastName; 8 | final String? password; 9 | final String? timestamp; 10 | final bool? isAdmin; 11 | final String? email; 12 | final String? photoUrl; 13 | 14 | final String? androidNotificationToken; 15 | 16 | // final Map? sectionsAppointed; 17 | AppUserModel( 18 | {this.id, 19 | this.userName, 20 | this.firstName, 21 | this.lastName, 22 | this.password, 23 | this.timestamp, 24 | this.isAdmin, 25 | this.email, 26 | this.androidNotificationToken, 27 | this.photoUrl}); 28 | 29 | Map toMap() { 30 | return { 31 | 'id': id, 32 | 'userName': userName, 33 | 'firstName': firstName, 34 | 'lastName': lastName, 35 | 'password': password, 36 | 'timestamp': timestamp, 37 | 'isAdmin': isAdmin, 38 | 'email': email, 39 | 'androidNotificationToken': androidNotificationToken, 40 | }; 41 | } 42 | 43 | factory AppUserModel.fromDocument(doc) { 44 | return AppUserModel( 45 | id: doc.data()["id"], 46 | password: doc.data()["password"], 47 | userName: doc.data()["userName"], 48 | timestamp: doc.data()["timestamp"], 49 | email: doc.data()["email"], 50 | isAdmin: doc.data()["isAdmin"], 51 | firstName: doc.data()["firstName"], 52 | lastName: doc.data()["lastName"], 53 | androidNotificationToken: doc.data()["androidNotificationToken"], 54 | photoUrl: doc.data()["photoUrl"]); 55 | } 56 | factory AppUserModel.fromMap(Map map) { 57 | return AppUserModel( 58 | id: map['id'], 59 | userName: map['userName'], 60 | firstName: map['firstName'], 61 | lastName: map['lastName'], 62 | password: map['password'], 63 | timestamp: map['timestamp'], 64 | isAdmin: map['isAdmin'], 65 | email: map['email'], 66 | androidNotificationToken: map['androidNotificationToken'], 67 | ); 68 | } 69 | 70 | String toJson() => json.encode(toMap()); 71 | 72 | factory AppUserModel.fromJson(String source) => 73 | AppUserModel.fromMap(json.decode(source)); 74 | 75 | AppUserModel copyWith({ 76 | String? id, 77 | String? userName, 78 | String? firstName, 79 | String? lastName, 80 | String? password, 81 | String? timestamp, 82 | bool? isAdmin, 83 | String? email, 84 | String? androidNotificationToken, 85 | }) { 86 | return AppUserModel( 87 | id: id ?? this.id, 88 | userName: userName ?? this.userName, 89 | firstName: firstName ?? this.firstName, 90 | lastName: lastName ?? this.lastName, 91 | password: password ?? this.password, 92 | timestamp: timestamp ?? this.timestamp, 93 | isAdmin: isAdmin ?? this.isAdmin, 94 | email: email ?? this.email, 95 | androidNotificationToken: 96 | androidNotificationToken ?? this.androidNotificationToken, 97 | ); 98 | } 99 | 100 | @override 101 | String toString() { 102 | return 'AppUserModel(id: $id, userName: $userName, firstName: $firstName, lastName: $lastName, password: $password, timestamp: $timestamp, isAdmin: $isAdmin, email: $email, androidNotificationToken: $androidNotificationToken)'; 103 | } 104 | 105 | @override 106 | bool operator ==(Object other) { 107 | if (identical(this, other)) return true; 108 | 109 | return other is AppUserModel && 110 | other.id == id && 111 | other.userName == userName && 112 | other.firstName == firstName && 113 | other.lastName == lastName && 114 | other.password == password && 115 | other.timestamp == timestamp && 116 | other.isAdmin == isAdmin && 117 | other.email == email && 118 | other.androidNotificationToken == androidNotificationToken; 119 | } 120 | 121 | @override 122 | int get hashCode { 123 | return id.hashCode ^ 124 | userName.hashCode ^ 125 | firstName.hashCode ^ 126 | lastName.hashCode ^ 127 | password.hashCode ^ 128 | timestamp.hashCode ^ 129 | isAdmin.hashCode ^ 130 | email.hashCode ^ 131 | androidNotificationToken.hashCode; 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | #=== Flutter Wrapper ===# 2 | -keep class io.flutter.app.** { *; } 3 | -keep class io.flutter.plugin.** { *; } 4 | -keep class io.flutter.util.** { *; } 5 | -keep class io.flutter.view.** { *; } 6 | -keep class io.flutter.** { *; } 7 | -keep class io.flutter.plugins.** { *; } 8 | -keep class com.google.firebase.** { *; } 9 | #=== Jitsi ===# 10 | # Source: https://github.com/jitsi/jitsi-meet/blob/master/android/app/proguard-rules.pro 11 | # Check above link for changes if release builds are broken again 12 | 13 | # Copyright (c) Facebook, Inc. and its affiliates. 14 | # 15 | # This source code is licensed under the MIT license found in the 16 | # LICENSE file in the root directory of this source tree. 17 | 18 | # Add project specific ProGuard rules here. 19 | # By default, the flags in this file are appended to flags specified 20 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 21 | # You can edit the include path and order by changing the proguardFiles 22 | # directive in build.gradle. 23 | # 24 | # For more details, see 25 | # http://developer.android.com/guide/developing/tools/proguard.html 26 | 27 | # Add any project specific keep options here: 28 | 29 | # React Native 30 | 31 | # Keep our interfaces so they can be used by other ProGuard rules. 32 | # See http://sourceforge.net/p/proguard/bugs/466/ 33 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 34 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 35 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 36 | 37 | # Do not strip any method/class that is annotated with @DoNotStrip 38 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 39 | -keep @com.facebook.common.internal.DoNotStrip class * 40 | -keepclassmembers class * { 41 | @com.facebook.proguard.annotations.DoNotStrip *; 42 | @com.facebook.common.internal.DoNotStrip *; 43 | } 44 | 45 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 46 | void set*(***); 47 | *** get*(); 48 | } 49 | 50 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 51 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 52 | -keepclassmembers,includedescriptorclasses class * { native ; } 53 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 54 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 55 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 56 | 57 | -dontwarn com.facebook.react.** 58 | -keep,includedescriptorclasses class com.facebook.react.bridge.** { *; } 59 | 60 | # okhttp 61 | 62 | -keepattributes Signature 63 | -keepattributes *Annotation* 64 | -keep class okhttp3.** { *; } 65 | -keep interface okhttp3.** { *; } 66 | -dontwarn okhttp3.** 67 | 68 | # okio 69 | 70 | -keep class sun.misc.Unsafe { *; } 71 | -dontwarn java.nio.file.* 72 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 73 | -keep class okio.** { *; } 74 | -dontwarn okio.** 75 | 76 | # WebRTC 77 | 78 | -keep class org.webrtc.** { *; } 79 | -dontwarn org.chromium.build.BuildHooksAndroid 80 | 81 | # Jisti Meet SDK 82 | 83 | -keep class org.jitsi.meet.** { *; } 84 | -keep class org.jitsi.meet.sdk.** { *; } 85 | 86 | # We added the following when we switched minifyEnabled on. Probably because we 87 | # ran the app and hit problems... 88 | 89 | #-keep class com.facebook.react.bridge.CatalystInstanceImpl { *; } 90 | #-keep class com.facebook.react.bridge.ExecutorToken { *; } 91 | #-keep class com.facebook.react.bridge.JavaScriptExecutor { *; } 92 | #-keep class com.facebook.react.bridge.ModuleRegistryHolder { *; } 93 | #-keep class com.facebook.react.bridge.ReadableType { *; } 94 | #-keep class com.facebook.react.bridge.queue.NativeRunnable { *; } 95 | #-keep class com.facebook.react.devsupport.** { *; } 96 | 97 | -dontwarn com.facebook.react.devsupport.** 98 | -dontwarn com.google.appengine.** 99 | -dontwarn com.squareup.okhttp.** 100 | -dontwarn javax.servlet.** 101 | 102 | # ^^^ We added the above when we switched minifyEnabled on. 103 | 104 | # Rule to avoid build errors related to SVGs. 105 | -keep public class com.horcrux.svg.** {*;} 106 | 107 | # Hermes 108 | -keep class com.facebook.hermes.unicode.** { *; } -------------------------------------------------------------------------------- /lib/screens/auth/forget_password.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/services/global_method.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:fluttertoast/fluttertoast.dart'; 5 | 6 | class ForgetPassword extends StatefulWidget { 7 | static const routeName = '/ForgetPassword'; 8 | 9 | @override 10 | _ForgetPasswordState createState() => _ForgetPasswordState(); 11 | } 12 | 13 | class _ForgetPasswordState extends State { 14 | String _emailAddress = ''; 15 | final _formKey = GlobalKey(); 16 | final FirebaseAuth _auth = FirebaseAuth.instance; 17 | GlobalMethods _globalMethods = GlobalMethods(); 18 | bool _isLoading = false; 19 | void _submitForm() async { 20 | final isValid = _formKey.currentState!.validate(); 21 | FocusScope.of(context).unfocus(); 22 | if (isValid) { 23 | setState(() { 24 | _isLoading = true; 25 | }); 26 | _formKey.currentState!.save(); 27 | try { 28 | await _auth 29 | .sendPasswordResetEmail(email: _emailAddress.trim().toLowerCase()) 30 | .then((value) => Fluttertoast.showToast( 31 | msg: "An email has been sent", 32 | toastLength: Toast.LENGTH_SHORT, 33 | gravity: ToastGravity.CENTER, 34 | timeInSecForIosWeb: 1, 35 | backgroundColor: Colors.red, 36 | textColor: Colors.white, 37 | fontSize: 16.0)); 38 | 39 | Navigator.canPop(context) ? Navigator.pop(context) : null; 40 | } catch (error) { 41 | _globalMethods.authErrorHandle(error.toString(), context); 42 | // print('error occured ${error.message}'); 43 | } finally { 44 | setState(() { 45 | _isLoading = false; 46 | }); 47 | } 48 | } 49 | } 50 | 51 | @override 52 | Widget build(BuildContext context) { 53 | return Scaffold( 54 | body: Column( 55 | mainAxisSize: MainAxisSize.min, 56 | crossAxisAlignment: CrossAxisAlignment.start, 57 | mainAxisAlignment: MainAxisAlignment.start, 58 | children: [ 59 | SizedBox( 60 | height: 80, 61 | ), 62 | Padding( 63 | padding: const EdgeInsets.all(8.0), 64 | child: Text( 65 | 'Forget password', 66 | style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold), 67 | ), 68 | ), 69 | Padding( 70 | padding: const EdgeInsets.all(12.0), 71 | child: Form( 72 | key: _formKey, 73 | child: TextFormField( 74 | key: ValueKey('email'), 75 | validator: (value) { 76 | if (value!.isEmpty || !value.contains('@')) { 77 | return 'Please enter a valid email address'; 78 | } 79 | return null; 80 | }, 81 | textInputAction: TextInputAction.next, 82 | keyboardType: TextInputType.emailAddress, 83 | decoration: InputDecoration( 84 | border: const UnderlineInputBorder(), 85 | filled: true, 86 | prefixIcon: Icon(Icons.email), 87 | labelText: 'Email Address', 88 | fillColor: Theme.of(context).backgroundColor), 89 | onSaved: (value) { 90 | _emailAddress = value!; 91 | }, 92 | ), 93 | ), 94 | ), 95 | SizedBox( 96 | height: 20, 97 | ), 98 | Padding( 99 | padding: const EdgeInsets.symmetric(horizontal: 25), 100 | child: _isLoading 101 | ? Align( 102 | alignment: Alignment.center, 103 | child: CircularProgressIndicator( 104 | color: Colors.green, 105 | ), 106 | ) 107 | : ElevatedButton( 108 | style: ButtonStyle( 109 | shape: 110 | MaterialStateProperty.all( 111 | RoundedRectangleBorder( 112 | borderRadius: BorderRadius.circular(30.0), 113 | side: BorderSide(color: Theme.of(context).cardColor), 114 | ), 115 | )), 116 | onPressed: _submitForm, 117 | child: Row( 118 | mainAxisAlignment: MainAxisAlignment.center, 119 | children: [ 120 | Text( 121 | 'Reset password', 122 | style: TextStyle( 123 | fontWeight: FontWeight.w500, fontSize: 17), 124 | ), 125 | SizedBox( 126 | width: 5, 127 | ), 128 | Icon( 129 | Icons.lock, 130 | size: 18, 131 | ) 132 | ], 133 | )), 134 | ), 135 | ], 136 | ), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/screens/join_meeting_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:coaching_app/consts/colors.dart'; 3 | import 'package:coaching_app/utilities/universal_variables.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import "package:flutter/material.dart"; 6 | import 'package:flutter_gradient_colors/flutter_gradient_colors.dart'; 7 | import 'package:jitsi_meet/feature_flag/feature_flag.dart'; 8 | import 'package:jitsi_meet/jitsi_meet.dart'; 9 | import 'package:pin_code_fields/pin_code_fields.dart'; 10 | 11 | class JoinMeetingScreen extends StatefulWidget { 12 | @override 13 | _JoinMeetingScreenState createState() => _JoinMeetingScreenState(); 14 | } 15 | 16 | class _JoinMeetingScreenState extends State { 17 | TextEditingController _controller = TextEditingController(); 18 | TextEditingController roomController = TextEditingController(); 19 | bool isVideoOff = true; 20 | bool isAudioMuted = true; 21 | String name = ""; 22 | bool isData = false; 23 | 24 | @override 25 | void initState() { 26 | super.initState(); 27 | getData(); 28 | } 29 | 30 | getData() async { 31 | var uid = FirebaseAuth.instance.currentUser!.uid; 32 | DocumentSnapshot data = await userCollection.doc(uid).get(); 33 | setState(() { 34 | name = data["name"]; 35 | isData = true; 36 | }); 37 | } 38 | 39 | _joinMeeting() async { 40 | try { 41 | FeatureFlag featureFlag = FeatureFlag(); 42 | featureFlag.welcomePageEnabled = false; 43 | featureFlag.resolution = FeatureFlagVideoResolution 44 | .HD_RESOLUTION; // Limit video resolution to 360p 45 | 46 | var options = JitsiMeetingOptions(room: roomController.text) 47 | // Required, spaces will be trimmed 48 | // ..serverURL = "https://someHost.com" 49 | // ..subject = "Meeting with Gunschu" 50 | ..userDisplayName = _controller.text 51 | // ..userEmail = "myemail@email.com" 52 | // ..userAvatarURL = us // or .png 53 | ..audioOnly = true 54 | ..audioMuted = true 55 | ..videoMuted = true 56 | // ..featureFlag = featureFlag 57 | ; 58 | 59 | await JitsiMeet.joinMeeting(options); 60 | } catch (error) { 61 | debugPrint("error: $error"); 62 | } 63 | } 64 | 65 | @override 66 | Widget build(BuildContext context) { 67 | return SafeArea( 68 | child: Container( 69 | decoration: backgroundColorBoxDecoration(), 70 | child: Scaffold( 71 | backgroundColor: Colors.transparent, 72 | body: Container( 73 | padding: EdgeInsets.symmetric( 74 | horizontal: 16, 75 | ), 76 | child: SingleChildScrollView( 77 | child: Column( 78 | children: [ 79 | SizedBox( 80 | height: 24, 81 | ), 82 | Text( 83 | "Room Code", 84 | style: ralewayStyle(20), 85 | ), 86 | SizedBox( 87 | height: 20, 88 | ), 89 | PinCodeTextField( 90 | controller: roomController, 91 | backgroundColor: Colors.white, 92 | appContext: context, 93 | autoDisposeControllers: false, 94 | length: 6, 95 | onChanged: (value) {}, 96 | animationType: AnimationType.fade, 97 | pinTheme: PinTheme(shape: PinCodeFieldShape.underline), 98 | animationDuration: Duration(microseconds: 300), 99 | ), 100 | SizedBox( 101 | height: 10, 102 | ), 103 | TextFormField( 104 | controller: _controller, 105 | style: montserratStyle(20), 106 | decoration: InputDecoration( 107 | border: OutlineInputBorder(), 108 | labelText: 109 | "Username(this will be visible in the meeting)", 110 | labelStyle: ralewayStyle(15), 111 | ), 112 | ), 113 | SizedBox( 114 | height: 16, 115 | ), 116 | CheckboxListTile( 117 | value: isVideoOff, 118 | onChanged: (val) { 119 | setState(() { 120 | isVideoOff = val!; 121 | }); 122 | }, 123 | title: Text( 124 | "Video Off", 125 | style: ralewayStyle(18, Colors.black), 126 | ), 127 | ), 128 | SizedBox( 129 | height: 16, 130 | ), 131 | CheckboxListTile( 132 | value: isAudioMuted, 133 | onChanged: (val) { 134 | setState(() { 135 | isAudioMuted = val!; 136 | }); 137 | }, 138 | title: Text( 139 | "Audio Muted", 140 | style: ralewayStyle(18, Colors.black), 141 | ), 142 | ), 143 | SizedBox( 144 | height: 30, 145 | ), 146 | Text( 147 | "You can change these settings in your meeting when you join", 148 | style: ralewayStyle(15), 149 | textAlign: TextAlign.center, 150 | ), 151 | Divider( 152 | height: 48, 153 | thickness: 2.0, 154 | ), 155 | SizedBox( 156 | height: 30, 157 | ), 158 | InkWell( 159 | onTap: _joinMeeting, 160 | child: Container( 161 | width: double.maxFinite, 162 | height: 64, 163 | decoration: BoxDecoration( 164 | borderRadius: BorderRadius.circular(20), 165 | gradient: LinearGradient( 166 | colors: GradientColors.amour, 167 | ), 168 | ), 169 | child: Center( 170 | child: Text( 171 | "Join Meeting", 172 | style: montserratStyle(20, Colors.white), 173 | ), 174 | ), 175 | ), 176 | ), 177 | ], 178 | ), 179 | ), 180 | ), 181 | ), 182 | ), 183 | ); 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /lib/screens/auth/login.dart: -------------------------------------------------------------------------------- 1 | import 'package:coaching_app/consts/colors.dart'; 2 | import 'package:coaching_app/screens/auth/forget_password.dart'; 3 | import 'package:coaching_app/services/global_method.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:wave/config.dart'; 7 | import 'package:wave/wave.dart'; 8 | 9 | import '../main_screen.dart'; 10 | 11 | class LoginScreen extends StatefulWidget { 12 | static const routeName = '/LoginScreen'; 13 | @override 14 | _LoginScreenState createState() => _LoginScreenState(); 15 | } 16 | 17 | class _LoginScreenState extends State { 18 | final FocusNode _passwordFocusNode = FocusNode(); 19 | bool _obscureText = true; 20 | String _emailAddress = ''; 21 | String _password = ''; 22 | final _formKey = GlobalKey(); 23 | final FirebaseAuth _auth = FirebaseAuth.instance; 24 | GlobalMethods _globalMethods = GlobalMethods(); 25 | bool _isLoading = false; 26 | @override 27 | void dispose() { 28 | _passwordFocusNode.dispose(); 29 | super.dispose(); 30 | } 31 | 32 | void _submitForm() async { 33 | final isValid = _formKey.currentState!.validate(); 34 | FocusScope.of(context).unfocus(); 35 | if (isValid) { 36 | setState(() { 37 | _isLoading = true; 38 | }); 39 | _formKey.currentState!.save(); 40 | try { 41 | await _auth 42 | .signInWithEmailAndPassword( 43 | email: _emailAddress.toLowerCase().trim(), 44 | password: _password.trim()) 45 | .then((value) { 46 | Navigator.canPop(context) ? Navigator.pop(context) : null; 47 | Navigator.of(context).popAndPushNamed(MainScreens.routeName); 48 | }); 49 | } catch (error) { 50 | _globalMethods.authErrorHandle(error.toString(), context); 51 | print('error occured ${error.toString()}'); 52 | } finally { 53 | setState(() { 54 | _isLoading = false; 55 | }); 56 | } 57 | } 58 | } 59 | 60 | @override 61 | Widget build(BuildContext context) { 62 | return Scaffold( 63 | body: Stack( 64 | children: [ 65 | Container( 66 | height: MediaQuery.of(context).size.height * 0.95, 67 | child: RotatedBox( 68 | quarterTurns: 2, 69 | child: WaveWidget( 70 | config: CustomConfig( 71 | gradients: [ 72 | [ColorsConsts.gradiendFStart, ColorsConsts.gradiendLStart], 73 | [ColorsConsts.gradiendFEnd, ColorsConsts.gradiendLEnd], 74 | ], 75 | durations: [19440, 10800], 76 | heightPercentages: [0.20, 0.25], 77 | blur: MaskFilter.blur(BlurStyle.solid, 10), 78 | gradientBegin: Alignment.bottomLeft, 79 | gradientEnd: Alignment.topRight, 80 | ), 81 | waveAmplitude: 0, 82 | size: Size( 83 | double.infinity, 84 | double.infinity, 85 | ), 86 | ), 87 | ), 88 | ), 89 | SingleChildScrollView( 90 | child: Column( 91 | children: [ 92 | Container( 93 | margin: EdgeInsets.only(top: 80), 94 | height: 120.0, 95 | width: 120.0, 96 | decoration: BoxDecoration( 97 | // color: Theme.of(context).backgroundColor, 98 | borderRadius: BorderRadius.circular(20), 99 | image: DecorationImage( 100 | image: NetworkImage( 101 | 'https://image.flaticon.com/icons/png/128/869/869636.png', 102 | ), 103 | fit: BoxFit.fill, 104 | ), 105 | shape: BoxShape.rectangle, 106 | ), 107 | ), 108 | SizedBox( 109 | height: 30, 110 | ), 111 | Form( 112 | key: _formKey, 113 | child: Column( 114 | children: [ 115 | Padding( 116 | padding: const EdgeInsets.all(12.0), 117 | child: TextFormField( 118 | key: ValueKey('email'), 119 | validator: (value) { 120 | if (value!.isEmpty || !value.contains('@')) { 121 | return 'Please enter a valid email address'; 122 | } 123 | return null; 124 | }, 125 | textInputAction: TextInputAction.next, 126 | onEditingComplete: () => FocusScope.of(context) 127 | .requestFocus(_passwordFocusNode), 128 | keyboardType: TextInputType.emailAddress, 129 | decoration: InputDecoration( 130 | border: const UnderlineInputBorder(), 131 | filled: true, 132 | prefixIcon: Icon(Icons.email), 133 | labelText: 'Email Address', 134 | fillColor: Theme.of(context).backgroundColor), 135 | onSaved: (value) { 136 | _emailAddress = value!; 137 | }, 138 | ), 139 | ), 140 | Padding( 141 | padding: const EdgeInsets.all(12.0), 142 | child: TextFormField( 143 | key: ValueKey('Password'), 144 | validator: (value) { 145 | if (value!.isEmpty || value.length < 7) { 146 | return 'Please enter a valid Password'; 147 | } 148 | return null; 149 | }, 150 | keyboardType: TextInputType.emailAddress, 151 | focusNode: _passwordFocusNode, 152 | decoration: InputDecoration( 153 | border: const UnderlineInputBorder(), 154 | filled: true, 155 | prefixIcon: Icon(Icons.lock), 156 | suffixIcon: GestureDetector( 157 | onTap: () { 158 | setState(() { 159 | _obscureText = !_obscureText; 160 | }); 161 | }, 162 | child: Icon(_obscureText 163 | ? Icons.visibility 164 | : Icons.visibility_off), 165 | ), 166 | labelText: 'Password', 167 | fillColor: Theme.of(context).backgroundColor), 168 | onSaved: (value) { 169 | _password = value!; 170 | }, 171 | obscureText: _obscureText, 172 | onEditingComplete: _submitForm, 173 | ), 174 | ), 175 | Align( 176 | alignment: Alignment.topRight, 177 | child: Padding( 178 | padding: const EdgeInsets.symmetric( 179 | vertical: 2, horizontal: 20), 180 | child: TextButton( 181 | onPressed: () { 182 | Navigator.pushNamed( 183 | context, ForgetPassword.routeName); 184 | }, 185 | child: Text( 186 | 'Forget password?', 187 | style: TextStyle( 188 | color: Colors.blue.shade900, 189 | decoration: TextDecoration.underline), 190 | )), 191 | ), 192 | ), 193 | Row( 194 | mainAxisAlignment: MainAxisAlignment.end, 195 | children: [ 196 | SizedBox(width: 10), 197 | _isLoading 198 | ? CircularProgressIndicator() 199 | : ElevatedButton( 200 | style: ButtonStyle( 201 | shape: MaterialStateProperty.all< 202 | RoundedRectangleBorder>( 203 | RoundedRectangleBorder( 204 | borderRadius: 205 | BorderRadius.circular(30.0), 206 | side: BorderSide( 207 | color: 208 | ColorsConsts.backgroundColor), 209 | ), 210 | )), 211 | onPressed: _submitForm, 212 | child: Row( 213 | mainAxisAlignment: 214 | MainAxisAlignment.center, 215 | children: [ 216 | Text( 217 | 'Login', 218 | style: TextStyle( 219 | fontWeight: FontWeight.w500, 220 | fontSize: 17), 221 | ), 222 | SizedBox( 223 | width: 5, 224 | ), 225 | Icon( 226 | Icons.person, 227 | size: 18, 228 | ) 229 | ], 230 | )), 231 | SizedBox(width: 20), 232 | ], 233 | ), 234 | ], 235 | )) 236 | ], 237 | ), 238 | ), 239 | ], 240 | ), 241 | ); 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /lib/screens/user_info.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | import '../consts/colors.dart'; 6 | 7 | class ProfilePage extends StatefulWidget { 8 | @override 9 | _ProfilePageState createState() => _ProfilePageState(); 10 | } 11 | 12 | class _ProfilePageState extends State { 13 | ScrollController? _scrollController; 14 | var top = 0.0; 15 | final FirebaseAuth _auth = FirebaseAuth.instance; 16 | String? _uid; 17 | String? _name; 18 | String? _email; 19 | String? _joinedAt; 20 | String? _userImageUrl; 21 | int? _phoneNumber; 22 | @override 23 | void initState() { 24 | super.initState(); 25 | _scrollController = ScrollController(); 26 | _scrollController!.addListener(() { 27 | setState(() {}); 28 | }); 29 | getData(); 30 | } 31 | 32 | void getData() async { 33 | User user = _auth.currentUser!; 34 | _uid = user.uid; 35 | 36 | print('user.displayName ${user.displayName}'); 37 | print('user.photoURL ${user.photoURL}'); 38 | DocumentSnapshot>? userDoc = user.isAnonymous 39 | ? null 40 | : await FirebaseFirestore.instance.collection('users').doc(_uid).get(); 41 | // .then((value) { 42 | // if (user.isAnonymous) { 43 | // userDoc = null; 44 | // } else { 45 | // userDoc = value; 46 | // } 47 | // }); 48 | if (userDoc == null) { 49 | return; 50 | } else { 51 | setState(() { 52 | _name = userDoc.get('name'); 53 | _email = user.email!; 54 | _joinedAt = userDoc.get('joinedAt'); 55 | _phoneNumber = userDoc.get('phoneNumber'); 56 | _userImageUrl = userDoc.get('imageUrl'); 57 | }); 58 | } 59 | // print("name $_name"); 60 | } 61 | 62 | @override 63 | Widget build(BuildContext context) { 64 | // final themeChange = Provider.of(context); 65 | return Scaffold( 66 | body: Stack( 67 | children: [ 68 | CustomScrollView( 69 | controller: _scrollController, 70 | slivers: [ 71 | SliverAppBar( 72 | // leading: Icon(Icons.ac_unit_outlined), 73 | // automaticallyImplyLeading: false, 74 | elevation: 0, 75 | expandedHeight: 200, 76 | pinned: true, 77 | flexibleSpace: LayoutBuilder(builder: 78 | (BuildContext context, BoxConstraints constraints) { 79 | top = constraints.biggest.height; 80 | 81 | return Container( 82 | decoration: BoxDecoration( 83 | gradient: LinearGradient( 84 | colors: [ 85 | ColorsConsts.starterColor, 86 | ColorsConsts.endColor, 87 | ], 88 | begin: const FractionalOffset(0.0, 0.0), 89 | end: const FractionalOffset(1.0, 0.0), 90 | stops: [0.0, 1.0], 91 | tileMode: TileMode.clamp), 92 | ), 93 | child: FlexibleSpaceBar( 94 | // collapseMode: CollapseMode.parallax, 95 | centerTitle: true, 96 | title: AnimatedOpacity( 97 | duration: Duration(milliseconds: 300), 98 | opacity: top <= 110.0 ? 1.0 : 0, 99 | child: Row( 100 | children: [ 101 | SizedBox( 102 | width: 12, 103 | ), 104 | Container( 105 | height: kToolbarHeight / 1.8, 106 | width: kToolbarHeight / 1.8, 107 | decoration: BoxDecoration( 108 | boxShadow: [ 109 | BoxShadow( 110 | color: Colors.white, 111 | blurRadius: 1.0, 112 | ), 113 | ], 114 | shape: BoxShape.circle, 115 | image: DecorationImage( 116 | fit: BoxFit.fill, 117 | image: NetworkImage(_userImageUrl ?? 118 | 'https://t3.ftcdn.net/jpg/01/83/55/76/240_F_183557656_DRcvOesmfDl5BIyhPKrcWANFKy2964i9.jpg'), 119 | ), 120 | ), 121 | ), 122 | SizedBox( 123 | width: 12, 124 | ), 125 | Text( 126 | // 'top.toString()', 127 | _name == null ? 'Guest' : _name!, 128 | style: TextStyle( 129 | fontSize: 20.0, color: Colors.white), 130 | ), 131 | ], 132 | ), 133 | ), 134 | background: Image( 135 | image: NetworkImage(_userImageUrl ?? 136 | 'https://t3.ftcdn.net/jpg/01/83/55/76/240_F_183557656_DRcvOesmfDl5BIyhPKrcWANFKy2964i9.jpg'), 137 | fit: BoxFit.fill, 138 | ), 139 | ), 140 | ); 141 | }), 142 | ), 143 | SliverToBoxAdapter( 144 | child: Column( 145 | mainAxisAlignment: MainAxisAlignment.center, 146 | crossAxisAlignment: CrossAxisAlignment.start, 147 | children: [ 148 | // Padding( 149 | // padding: const EdgeInsets.only(left: 8.0), 150 | // child: userTitle(title: 'User Bag')), 151 | Divider( 152 | thickness: 1, 153 | color: Colors.grey, 154 | ), 155 | 156 | // ListTile( 157 | // onTap: () { 158 | // Navigator.of(context).pushNamed(CartScreen.routeName); 159 | // }, 160 | // title: Text('Cart'), 161 | // trailing: Icon(Icons.chevron_right_rounded), 162 | // leading: Icon(MyAppIcons.cart), 163 | // ), 164 | // ListTile( 165 | // onTap: () => Navigator.of(context) 166 | // .pushNamed(OrderScreen.routeName), 167 | // title: Text('My Orders'), 168 | // trailing: Icon(Icons.chevron_right_rounded), 169 | // leading: Icon(MyAppIcons.bag), 170 | // ), 171 | 172 | Padding( 173 | padding: const EdgeInsets.only(left: 8.0), 174 | child: userTitle(title: 'User Information'), 175 | ), 176 | Divider( 177 | thickness: 1, 178 | color: Colors.grey, 179 | ), 180 | userListTile('Email', _email ?? '', 0, context), 181 | userListTile( 182 | 'Phone number', _phoneNumber.toString(), 1, context), 183 | // userListTile('Shipping address', '', 2, context), 184 | userListTile('joined date', _joinedAt ?? '', 3, context), 185 | Padding( 186 | padding: const EdgeInsets.only(left: 8.0), 187 | child: userTitle(title: 'User settings'), 188 | ), 189 | Divider( 190 | thickness: 1, 191 | color: Colors.grey, 192 | ), 193 | Material( 194 | color: Colors.transparent, 195 | child: InkWell( 196 | splashColor: Theme.of(context).splashColor, 197 | child: ListTile( 198 | onTap: () async { 199 | // Navigator.canPop(context)? Navigator.pop(context):null; 200 | showDialog( 201 | context: context, 202 | builder: (BuildContext ctx) { 203 | return AlertDialog( 204 | title: Row( 205 | children: [ 206 | Padding( 207 | padding: 208 | const EdgeInsets.only(right: 6.0), 209 | child: Image.network( 210 | 'https://image.flaticon.com/icons/png/128/1828/1828304.png', 211 | height: 20, 212 | width: 20, 213 | ), 214 | ), 215 | Padding( 216 | padding: const EdgeInsets.all(8.0), 217 | child: Text('Sign out'), 218 | ), 219 | ], 220 | ), 221 | content: Text('Do you wanna Sign out?'), 222 | actions: [ 223 | TextButton( 224 | onPressed: () async { 225 | Navigator.pop(context); 226 | }, 227 | child: Text('Cancel')), 228 | TextButton( 229 | onPressed: () async { 230 | await _auth.signOut().then( 231 | (value) => 232 | Navigator.pop(context)); 233 | }, 234 | child: Text( 235 | 'Ok', 236 | style: TextStyle(color: Colors.red), 237 | )) 238 | ], 239 | ); 240 | }); 241 | }, 242 | title: Text('Logout'), 243 | leading: Icon(Icons.exit_to_app_rounded), 244 | ), 245 | ), 246 | ), 247 | ], 248 | ), 249 | ) 250 | ], 251 | ), 252 | _buildFab() 253 | ], 254 | ), 255 | ); 256 | } 257 | 258 | Widget _buildFab() { 259 | //starting fab position 260 | final double defaultTopMargin = 200.0 - 4.0; 261 | //pixels from top where scaling should start 262 | final double scaleStart = 160.0; 263 | //pixels from top where scaling should end 264 | final double scaleEnd = scaleStart / 2; 265 | 266 | double top = defaultTopMargin; 267 | double scale = 1.0; 268 | if (_scrollController!.hasClients) { 269 | double offset = _scrollController!.offset; 270 | top -= offset; 271 | if (offset < defaultTopMargin - scaleStart) { 272 | //offset small => don't scale down 273 | 274 | scale = 1.0; 275 | } else if (offset < defaultTopMargin - scaleEnd) { 276 | //offset between scaleStart and scaleEnd => scale down 277 | 278 | scale = (defaultTopMargin - scaleEnd - offset) / scaleEnd; 279 | } else { 280 | //offset passed scaleEnd => hide fab 281 | scale = 0.0; 282 | } 283 | } 284 | 285 | return Positioned( 286 | top: top, 287 | right: 16.0, 288 | child: Transform( 289 | transform: Matrix4.identity()..scale(scale), 290 | alignment: Alignment.center, 291 | child: FloatingActionButton( 292 | backgroundColor: Colors.purple, 293 | heroTag: "btn1", 294 | onPressed: () {}, 295 | child: Icon(Icons.camera_alt_outlined), 296 | ), 297 | ), 298 | ); 299 | } 300 | 301 | List _userTileIcons = [ 302 | Icons.email, 303 | Icons.phone, 304 | Icons.local_shipping, 305 | Icons.watch_later, 306 | Icons.exit_to_app_rounded 307 | ]; 308 | 309 | Widget userListTile( 310 | String title, String subTitle, int index, BuildContext context) { 311 | return ListTile( 312 | title: Text(title), 313 | subtitle: Text(subTitle), 314 | leading: Icon(_userTileIcons[index]), 315 | ); 316 | } 317 | 318 | Widget userTitle({required String title}) { 319 | return Padding( 320 | padding: const EdgeInsets.all(14.0), 321 | child: Text( 322 | title, 323 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 23), 324 | ), 325 | ); 326 | } 327 | } 328 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.coachingApp; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.coachingApp; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.coachingApp; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | animated_splash_screen: 5 | dependency: "direct main" 6 | description: 7 | name: animated_splash_screen 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "1.2.0" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.3.1" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.8.2" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.1.0" 32 | bot_toast: 33 | dependency: "direct main" 34 | description: 35 | name: bot_toast 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "4.0.2" 39 | characters: 40 | dependency: transitive 41 | description: 42 | name: characters 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.2.0" 46 | charcode: 47 | dependency: transitive 48 | description: 49 | name: charcode 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.3.1" 53 | clock: 54 | dependency: transitive 55 | description: 56 | name: clock 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.0" 60 | cloud_firestore: 61 | dependency: "direct main" 62 | description: 63 | name: cloud_firestore 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "3.1.16" 67 | cloud_firestore_platform_interface: 68 | dependency: transitive 69 | description: 70 | name: cloud_firestore_platform_interface 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "5.5.6" 74 | cloud_firestore_web: 75 | dependency: transitive 76 | description: 77 | name: cloud_firestore_web 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "2.6.15" 81 | collection: 82 | dependency: transitive 83 | description: 84 | name: collection 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.15.0" 88 | cross_file: 89 | dependency: transitive 90 | description: 91 | name: cross_file 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "0.3.3" 95 | crypto: 96 | dependency: transitive 97 | description: 98 | name: crypto 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "3.0.2" 102 | cupertino_icons: 103 | dependency: "direct main" 104 | description: 105 | name: cupertino_icons 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.0.4" 109 | dbus: 110 | dependency: transitive 111 | description: 112 | name: dbus 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "0.7.3" 116 | dots_indicator: 117 | dependency: transitive 118 | description: 119 | name: dots_indicator 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "2.1.0" 123 | fake_async: 124 | dependency: transitive 125 | description: 126 | name: fake_async 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.2.0" 130 | ffi: 131 | dependency: transitive 132 | description: 133 | name: ffi 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "1.2.1" 137 | file: 138 | dependency: transitive 139 | description: 140 | name: file 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "6.1.2" 144 | firebase_auth: 145 | dependency: "direct main" 146 | description: 147 | name: firebase_auth 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "3.3.18" 151 | firebase_auth_platform_interface: 152 | dependency: transitive 153 | description: 154 | name: firebase_auth_platform_interface 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "6.2.6" 158 | firebase_auth_web: 159 | dependency: transitive 160 | description: 161 | name: firebase_auth_web 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "3.3.15" 165 | firebase_core: 166 | dependency: "direct main" 167 | description: 168 | name: firebase_core 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "1.17.0" 172 | firebase_core_platform_interface: 173 | dependency: transitive 174 | description: 175 | name: firebase_core_platform_interface 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "4.4.0" 179 | firebase_core_web: 180 | dependency: transitive 181 | description: 182 | name: firebase_core_web 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "1.6.4" 186 | firebase_messaging: 187 | dependency: "direct main" 188 | description: 189 | name: firebase_messaging 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "11.4.0" 193 | firebase_messaging_platform_interface: 194 | dependency: transitive 195 | description: 196 | name: firebase_messaging_platform_interface 197 | url: "https://pub.dartlang.org" 198 | source: hosted 199 | version: "3.5.0" 200 | firebase_messaging_web: 201 | dependency: transitive 202 | description: 203 | name: firebase_messaging_web 204 | url: "https://pub.dartlang.org" 205 | source: hosted 206 | version: "2.4.0" 207 | firebase_storage: 208 | dependency: "direct main" 209 | description: 210 | name: firebase_storage 211 | url: "https://pub.dartlang.org" 212 | source: hosted 213 | version: "10.2.16" 214 | firebase_storage_platform_interface: 215 | dependency: transitive 216 | description: 217 | name: firebase_storage_platform_interface 218 | url: "https://pub.dartlang.org" 219 | source: hosted 220 | version: "4.1.6" 221 | firebase_storage_web: 222 | dependency: transitive 223 | description: 224 | name: firebase_storage_web 225 | url: "https://pub.dartlang.org" 226 | source: hosted 227 | version: "3.2.15" 228 | flutter: 229 | dependency: "direct main" 230 | description: flutter 231 | source: sdk 232 | version: "0.0.0" 233 | flutter_gradient_colors: 234 | dependency: "direct main" 235 | description: 236 | name: flutter_gradient_colors 237 | url: "https://pub.dartlang.org" 238 | source: hosted 239 | version: "2.1.1" 240 | flutter_local_notifications: 241 | dependency: "direct main" 242 | description: 243 | name: flutter_local_notifications 244 | url: "https://pub.dartlang.org" 245 | source: hosted 246 | version: "9.5.3+1" 247 | flutter_local_notifications_linux: 248 | dependency: transitive 249 | description: 250 | name: flutter_local_notifications_linux 251 | url: "https://pub.dartlang.org" 252 | source: hosted 253 | version: "0.4.2" 254 | flutter_local_notifications_platform_interface: 255 | dependency: transitive 256 | description: 257 | name: flutter_local_notifications_platform_interface 258 | url: "https://pub.dartlang.org" 259 | source: hosted 260 | version: "5.0.0" 261 | flutter_plugin_android_lifecycle: 262 | dependency: transitive 263 | description: 264 | name: flutter_plugin_android_lifecycle 265 | url: "https://pub.dartlang.org" 266 | source: hosted 267 | version: "2.0.6" 268 | flutter_test: 269 | dependency: "direct dev" 270 | description: flutter 271 | source: sdk 272 | version: "0.0.0" 273 | flutter_web_plugins: 274 | dependency: transitive 275 | description: flutter 276 | source: sdk 277 | version: "0.0.0" 278 | fluttertoast: 279 | dependency: "direct main" 280 | description: 281 | name: fluttertoast 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "8.0.9" 285 | font_awesome_flutter: 286 | dependency: "direct main" 287 | description: 288 | name: font_awesome_flutter 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "10.1.0" 292 | get: 293 | dependency: "direct main" 294 | description: 295 | name: get 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "4.6.5" 299 | get_storage: 300 | dependency: "direct main" 301 | description: 302 | name: get_storage 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "2.0.3" 306 | glassmorphism_ui: 307 | dependency: "direct main" 308 | description: 309 | name: glassmorphism_ui 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "0.2.0" 313 | google_fonts: 314 | dependency: "direct main" 315 | description: 316 | name: google_fonts 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "3.0.1" 320 | http: 321 | dependency: transitive 322 | description: 323 | name: http 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "0.13.4" 327 | http_parser: 328 | dependency: transitive 329 | description: 330 | name: http_parser 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "4.0.1" 334 | image_picker: 335 | dependency: "direct main" 336 | description: 337 | name: image_picker 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "0.8.5+3" 341 | image_picker_android: 342 | dependency: transitive 343 | description: 344 | name: image_picker_android 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "0.8.4+13" 348 | image_picker_for_web: 349 | dependency: transitive 350 | description: 351 | name: image_picker_for_web 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "2.1.8" 355 | image_picker_ios: 356 | dependency: transitive 357 | description: 358 | name: image_picker_ios 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "0.8.5+5" 362 | image_picker_platform_interface: 363 | dependency: transitive 364 | description: 365 | name: image_picker_platform_interface 366 | url: "https://pub.dartlang.org" 367 | source: hosted 368 | version: "2.5.0" 369 | intl: 370 | dependency: transitive 371 | description: 372 | name: intl 373 | url: "https://pub.dartlang.org" 374 | source: hosted 375 | version: "0.17.0" 376 | introduction_screen: 377 | dependency: "direct main" 378 | description: 379 | name: introduction_screen 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "3.0.2" 383 | jitsi_meet: 384 | dependency: "direct main" 385 | description: 386 | name: jitsi_meet 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "4.0.0" 390 | jitsi_meet_platform_interface: 391 | dependency: transitive 392 | description: 393 | name: jitsi_meet_platform_interface 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "2.0.0" 397 | jitsi_meet_web_plugin: 398 | dependency: transitive 399 | description: 400 | name: jitsi_meet_web_plugin 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "2.0.0" 404 | js: 405 | dependency: transitive 406 | description: 407 | name: js 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "0.6.3" 411 | list_tile_switch: 412 | dependency: "direct main" 413 | description: 414 | name: list_tile_switch 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "1.0.0" 418 | matcher: 419 | dependency: transitive 420 | description: 421 | name: matcher 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "0.12.11" 425 | material_color_utilities: 426 | dependency: transitive 427 | description: 428 | name: material_color_utilities 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "0.1.3" 432 | meta: 433 | dependency: transitive 434 | description: 435 | name: meta 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "1.7.0" 439 | nested: 440 | dependency: transitive 441 | description: 442 | name: nested 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "1.0.0" 446 | page_transition: 447 | dependency: transitive 448 | description: 449 | name: page_transition 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "2.0.5" 453 | path: 454 | dependency: transitive 455 | description: 456 | name: path 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "1.8.0" 460 | path_provider: 461 | dependency: transitive 462 | description: 463 | name: path_provider 464 | url: "https://pub.dartlang.org" 465 | source: hosted 466 | version: "2.0.10" 467 | path_provider_android: 468 | dependency: transitive 469 | description: 470 | name: path_provider_android 471 | url: "https://pub.dartlang.org" 472 | source: hosted 473 | version: "2.0.14" 474 | path_provider_ios: 475 | dependency: transitive 476 | description: 477 | name: path_provider_ios 478 | url: "https://pub.dartlang.org" 479 | source: hosted 480 | version: "2.0.9" 481 | path_provider_linux: 482 | dependency: transitive 483 | description: 484 | name: path_provider_linux 485 | url: "https://pub.dartlang.org" 486 | source: hosted 487 | version: "2.1.6" 488 | path_provider_macos: 489 | dependency: transitive 490 | description: 491 | name: path_provider_macos 492 | url: "https://pub.dartlang.org" 493 | source: hosted 494 | version: "2.0.6" 495 | path_provider_platform_interface: 496 | dependency: transitive 497 | description: 498 | name: path_provider_platform_interface 499 | url: "https://pub.dartlang.org" 500 | source: hosted 501 | version: "2.0.4" 502 | path_provider_windows: 503 | dependency: transitive 504 | description: 505 | name: path_provider_windows 506 | url: "https://pub.dartlang.org" 507 | source: hosted 508 | version: "2.0.6" 509 | petitparser: 510 | dependency: transitive 511 | description: 512 | name: petitparser 513 | url: "https://pub.dartlang.org" 514 | source: hosted 515 | version: "4.4.0" 516 | pin_code_fields: 517 | dependency: "direct main" 518 | description: 519 | name: pin_code_fields 520 | url: "https://pub.dartlang.org" 521 | source: hosted 522 | version: "7.4.0" 523 | platform: 524 | dependency: transitive 525 | description: 526 | name: platform 527 | url: "https://pub.dartlang.org" 528 | source: hosted 529 | version: "3.1.0" 530 | plugin_platform_interface: 531 | dependency: transitive 532 | description: 533 | name: plugin_platform_interface 534 | url: "https://pub.dartlang.org" 535 | source: hosted 536 | version: "2.1.2" 537 | process: 538 | dependency: transitive 539 | description: 540 | name: process 541 | url: "https://pub.dartlang.org" 542 | source: hosted 543 | version: "4.2.4" 544 | provider: 545 | dependency: "direct main" 546 | description: 547 | name: provider 548 | url: "https://pub.dartlang.org" 549 | source: hosted 550 | version: "6.0.3" 551 | sky_engine: 552 | dependency: transitive 553 | description: flutter 554 | source: sdk 555 | version: "0.0.99" 556 | source_span: 557 | dependency: transitive 558 | description: 559 | name: source_span 560 | url: "https://pub.dartlang.org" 561 | source: hosted 562 | version: "1.8.1" 563 | stack_trace: 564 | dependency: transitive 565 | description: 566 | name: stack_trace 567 | url: "https://pub.dartlang.org" 568 | source: hosted 569 | version: "1.10.0" 570 | stream_channel: 571 | dependency: transitive 572 | description: 573 | name: stream_channel 574 | url: "https://pub.dartlang.org" 575 | source: hosted 576 | version: "2.1.0" 577 | string_scanner: 578 | dependency: transitive 579 | description: 580 | name: string_scanner 581 | url: "https://pub.dartlang.org" 582 | source: hosted 583 | version: "1.1.0" 584 | term_glyph: 585 | dependency: transitive 586 | description: 587 | name: term_glyph 588 | url: "https://pub.dartlang.org" 589 | source: hosted 590 | version: "1.2.0" 591 | test_api: 592 | dependency: transitive 593 | description: 594 | name: test_api 595 | url: "https://pub.dartlang.org" 596 | source: hosted 597 | version: "0.4.8" 598 | timezone: 599 | dependency: transitive 600 | description: 601 | name: timezone 602 | url: "https://pub.dartlang.org" 603 | source: hosted 604 | version: "0.8.0" 605 | typed_data: 606 | dependency: transitive 607 | description: 608 | name: typed_data 609 | url: "https://pub.dartlang.org" 610 | source: hosted 611 | version: "1.3.0" 612 | url_launcher: 613 | dependency: "direct main" 614 | description: 615 | name: url_launcher 616 | url: "https://pub.dartlang.org" 617 | source: hosted 618 | version: "6.1.2" 619 | url_launcher_android: 620 | dependency: transitive 621 | description: 622 | name: url_launcher_android 623 | url: "https://pub.dartlang.org" 624 | source: hosted 625 | version: "6.0.17" 626 | url_launcher_ios: 627 | dependency: transitive 628 | description: 629 | name: url_launcher_ios 630 | url: "https://pub.dartlang.org" 631 | source: hosted 632 | version: "6.0.17" 633 | url_launcher_linux: 634 | dependency: transitive 635 | description: 636 | name: url_launcher_linux 637 | url: "https://pub.dartlang.org" 638 | source: hosted 639 | version: "3.0.1" 640 | url_launcher_macos: 641 | dependency: transitive 642 | description: 643 | name: url_launcher_macos 644 | url: "https://pub.dartlang.org" 645 | source: hosted 646 | version: "3.0.1" 647 | url_launcher_platform_interface: 648 | dependency: transitive 649 | description: 650 | name: url_launcher_platform_interface 651 | url: "https://pub.dartlang.org" 652 | source: hosted 653 | version: "2.0.5" 654 | url_launcher_web: 655 | dependency: transitive 656 | description: 657 | name: url_launcher_web 658 | url: "https://pub.dartlang.org" 659 | source: hosted 660 | version: "2.0.11" 661 | url_launcher_windows: 662 | dependency: transitive 663 | description: 664 | name: url_launcher_windows 665 | url: "https://pub.dartlang.org" 666 | source: hosted 667 | version: "3.0.1" 668 | uuid: 669 | dependency: "direct main" 670 | description: 671 | name: uuid 672 | url: "https://pub.dartlang.org" 673 | source: hosted 674 | version: "3.0.6" 675 | vector_math: 676 | dependency: transitive 677 | description: 678 | name: vector_math 679 | url: "https://pub.dartlang.org" 680 | source: hosted 681 | version: "2.1.1" 682 | wave: 683 | dependency: "direct main" 684 | description: 685 | name: wave 686 | url: "https://pub.dartlang.org" 687 | source: hosted 688 | version: "0.2.0" 689 | win32: 690 | dependency: transitive 691 | description: 692 | name: win32 693 | url: "https://pub.dartlang.org" 694 | source: hosted 695 | version: "2.5.2" 696 | xdg_directories: 697 | dependency: transitive 698 | description: 699 | name: xdg_directories 700 | url: "https://pub.dartlang.org" 701 | source: hosted 702 | version: "0.2.0+1" 703 | xml: 704 | dependency: transitive 705 | description: 706 | name: xml 707 | url: "https://pub.dartlang.org" 708 | source: hosted 709 | version: "5.3.1" 710 | sdks: 711 | dart: ">=2.16.0 <3.0.0" 712 | flutter: ">=2.10.0" 713 | -------------------------------------------------------------------------------- /lib/screens/auth/sign_up.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:coaching_app/consts/colors.dart'; 4 | import 'package:coaching_app/services/global_method.dart'; 5 | import 'package:firebase_storage/firebase_storage.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/services.dart'; 8 | import 'package:image_picker/image_picker.dart'; 9 | import 'package:wave/config.dart'; 10 | import 'package:wave/wave.dart'; 11 | import 'package:firebase_auth/firebase_auth.dart'; 12 | import 'package:cloud_firestore/cloud_firestore.dart'; 13 | 14 | class SignUpScreen extends StatefulWidget { 15 | static const routeName = '/SignUpScreen'; 16 | @override 17 | _SignUpScreenState createState() => _SignUpScreenState(); 18 | } 19 | 20 | class _SignUpScreenState extends State { 21 | final FocusNode _passwordFocusNode = FocusNode(); 22 | final FocusNode _emailFocusNode = FocusNode(); 23 | final FocusNode _phoneNumberFocusNode = FocusNode(); 24 | bool? _obscureText = true; 25 | String? _emailAddress = ''; 26 | String? _password = ''; 27 | String? _fullName = ''; 28 | int? _phoneNumber; 29 | File? _pickedImage; 30 | String? url; 31 | final _formKey = GlobalKey(); 32 | final FirebaseAuth _auth = FirebaseAuth.instance; 33 | GlobalMethods _globalMethods = GlobalMethods(); 34 | bool _isLoading = false; 35 | @override 36 | void dispose() { 37 | _passwordFocusNode.dispose(); 38 | _emailFocusNode.dispose(); 39 | _phoneNumberFocusNode.dispose(); 40 | super.dispose(); 41 | } 42 | 43 | void _submitForm() async { 44 | final isValid = _formKey.currentState!.validate(); 45 | FocusScope.of(context).unfocus(); 46 | var date = DateTime.now().toString(); 47 | var dateparse = DateTime.parse(date); 48 | var formattedDate = "${dateparse.day}-${dateparse.month}-${dateparse.year}"; 49 | if (isValid) { 50 | _formKey.currentState!.save(); 51 | try { 52 | if (_pickedImage == null) { 53 | _globalMethods.authErrorHandle('Please pick an image', context); 54 | } else { 55 | setState(() { 56 | _isLoading = true; 57 | }); 58 | final ref = FirebaseStorage.instance 59 | .ref() 60 | .child('usersImages') 61 | .child(_fullName! + '.jpg'); 62 | await ref.putFile(_pickedImage!); 63 | url = await ref.getDownloadURL(); 64 | await _auth.createUserWithEmailAndPassword( 65 | email: _emailAddress!.toLowerCase().trim(), 66 | password: _password!.trim()); 67 | final User? user = _auth.currentUser; 68 | final _uid = user!.uid; 69 | user.updateDisplayName(_fullName); 70 | user.updatePhotoURL(url); 71 | user.reload(); 72 | await FirebaseFirestore.instance.collection('users').doc(_uid).set({ 73 | 'id': _uid, 74 | 'name': _fullName, 75 | 'email': _emailAddress, 76 | 'phoneNumber': _phoneNumber, 77 | 'imageUrl': url, 78 | 'joinedAt': formattedDate, 79 | 'createdAt': Timestamp.now(), 80 | }); 81 | Navigator.canPop(context) ? Navigator.pop(context) : null; 82 | } 83 | } catch (error) { 84 | _globalMethods.authErrorHandle(error.toString(), context); 85 | print('error occured ${error.toString()}'); 86 | } finally { 87 | setState(() { 88 | _isLoading = false; 89 | }); 90 | } 91 | } 92 | } 93 | 94 | void _pickImageCamera() async { 95 | final picker = ImagePicker(); 96 | final pickedImage = 97 | await picker.getImage(source: ImageSource.camera, imageQuality: 10); 98 | final pickedImageFile = File(pickedImage!.path); 99 | setState(() { 100 | _pickedImage = pickedImageFile; 101 | }); 102 | Navigator.pop(context); 103 | } 104 | 105 | void _pickImageGallery() async { 106 | final picker = ImagePicker(); 107 | final pickedImage = await picker.getImage(source: ImageSource.gallery); 108 | final pickedImageFile = File(pickedImage!.path); 109 | setState(() { 110 | _pickedImage = pickedImageFile; 111 | }); 112 | Navigator.pop(context); 113 | } 114 | 115 | void _remove() { 116 | setState(() { 117 | _pickedImage = null; 118 | }); 119 | Navigator.pop(context); 120 | } 121 | 122 | @override 123 | Widget build(BuildContext context) { 124 | return Scaffold( 125 | body: Stack( 126 | children: [ 127 | Container( 128 | height: MediaQuery.of(context).size.height * 0.95, 129 | child: RotatedBox( 130 | quarterTurns: 2, 131 | child: WaveWidget( 132 | config: CustomConfig( 133 | gradients: [ 134 | [ColorsConsts.gradiendFStart, ColorsConsts.gradiendLStart], 135 | [ColorsConsts.gradiendFEnd, ColorsConsts.gradiendLEnd], 136 | ], 137 | durations: [19440, 10800], 138 | heightPercentages: [0.20, 0.25], 139 | blur: MaskFilter.blur(BlurStyle.solid, 10), 140 | gradientBegin: Alignment.bottomLeft, 141 | gradientEnd: Alignment.topRight, 142 | ), 143 | waveAmplitude: 0, 144 | size: Size( 145 | double.infinity, 146 | double.infinity, 147 | ), 148 | ), 149 | ), 150 | ), 151 | SingleChildScrollView( 152 | child: Column( 153 | children: [ 154 | SizedBox( 155 | height: 30, 156 | ), 157 | Stack( 158 | children: [ 159 | Container( 160 | margin: 161 | EdgeInsets.symmetric(vertical: 30, horizontal: 30), 162 | child: CircleAvatar( 163 | radius: 71, 164 | backgroundColor: ColorsConsts.gradiendLEnd, 165 | child: CircleAvatar( 166 | radius: 65, 167 | backgroundColor: ColorsConsts.gradiendFEnd, 168 | backgroundImage: _pickedImage == null 169 | ? null 170 | : FileImage(_pickedImage!), 171 | ), 172 | ), 173 | ), 174 | Positioned( 175 | top: 120, 176 | left: 110, 177 | child: RawMaterialButton( 178 | elevation: 10, 179 | fillColor: ColorsConsts.gradiendLEnd, 180 | child: Icon(Icons.add_a_photo), 181 | padding: EdgeInsets.all(15.0), 182 | shape: CircleBorder(), 183 | onPressed: () { 184 | showDialog( 185 | context: context, 186 | builder: (BuildContext context) { 187 | return AlertDialog( 188 | title: Text( 189 | 'Choose option', 190 | style: TextStyle( 191 | fontWeight: FontWeight.w600, 192 | color: ColorsConsts.gradiendLStart), 193 | ), 194 | content: SingleChildScrollView( 195 | child: ListBody( 196 | children: [ 197 | InkWell( 198 | onTap: _pickImageCamera, 199 | splashColor: Colors.purpleAccent, 200 | child: Row( 201 | children: [ 202 | Padding( 203 | padding: 204 | const EdgeInsets.all(8.0), 205 | child: Icon( 206 | Icons.camera, 207 | color: Colors.purpleAccent, 208 | ), 209 | ), 210 | Text( 211 | 'Camera', 212 | style: TextStyle( 213 | fontSize: 18, 214 | fontWeight: 215 | FontWeight.w500, 216 | color: 217 | ColorsConsts.title), 218 | ) 219 | ], 220 | ), 221 | ), 222 | InkWell( 223 | onTap: _pickImageGallery, 224 | splashColor: Colors.purpleAccent, 225 | child: Row( 226 | children: [ 227 | Padding( 228 | padding: 229 | const EdgeInsets.all(8.0), 230 | child: Icon( 231 | Icons.image, 232 | color: Colors.purpleAccent, 233 | ), 234 | ), 235 | Text( 236 | 'Gallery', 237 | style: TextStyle( 238 | fontSize: 18, 239 | fontWeight: 240 | FontWeight.w500, 241 | color: 242 | ColorsConsts.title), 243 | ) 244 | ], 245 | ), 246 | ), 247 | InkWell( 248 | onTap: _remove, 249 | splashColor: Colors.purpleAccent, 250 | child: Row( 251 | children: [ 252 | Padding( 253 | padding: 254 | const EdgeInsets.all(8.0), 255 | child: Icon( 256 | Icons.remove_circle, 257 | color: Colors.red, 258 | ), 259 | ), 260 | Text( 261 | 'Remove', 262 | style: TextStyle( 263 | fontSize: 18, 264 | fontWeight: 265 | FontWeight.w500, 266 | color: Colors.red), 267 | ) 268 | ], 269 | ), 270 | ), 271 | ], 272 | ), 273 | ), 274 | ); 275 | }); 276 | }, 277 | )) 278 | ], 279 | ), 280 | Form( 281 | key: _formKey, 282 | child: Column( 283 | children: [ 284 | Padding( 285 | padding: const EdgeInsets.all(12.0), 286 | child: TextFormField( 287 | key: ValueKey('name'), 288 | validator: (value) { 289 | if (value!.isEmpty) { 290 | return 'name cannot be null'; 291 | } 292 | return null; 293 | }, 294 | textInputAction: TextInputAction.next, 295 | onEditingComplete: () => FocusScope.of(context) 296 | .requestFocus(_emailFocusNode), 297 | keyboardType: TextInputType.emailAddress, 298 | decoration: InputDecoration( 299 | border: const UnderlineInputBorder(), 300 | filled: true, 301 | prefixIcon: Icon(Icons.person), 302 | labelText: 'Full name', 303 | fillColor: Theme.of(context).backgroundColor), 304 | onSaved: (value) { 305 | _fullName = value; 306 | }, 307 | ), 308 | ), 309 | Padding( 310 | padding: const EdgeInsets.all(12.0), 311 | child: TextFormField( 312 | key: ValueKey('email'), 313 | focusNode: _emailFocusNode, 314 | validator: (value) { 315 | if (value!.isEmpty || !value.contains('@')) { 316 | return 'Please enter a valid email address'; 317 | } 318 | return null; 319 | }, 320 | textInputAction: TextInputAction.next, 321 | onEditingComplete: () => FocusScope.of(context) 322 | .requestFocus(_passwordFocusNode), 323 | keyboardType: TextInputType.emailAddress, 324 | decoration: InputDecoration( 325 | border: const UnderlineInputBorder(), 326 | filled: true, 327 | prefixIcon: Icon(Icons.email), 328 | labelText: 'Email Address', 329 | fillColor: Theme.of(context).backgroundColor), 330 | onSaved: (value) { 331 | _emailAddress = value; 332 | }, 333 | ), 334 | ), 335 | Padding( 336 | padding: const EdgeInsets.all(12.0), 337 | child: TextFormField( 338 | key: ValueKey('Password'), 339 | validator: (value) { 340 | if (value!.isEmpty || value.length < 7) { 341 | return 'Please enter a valid Password'; 342 | } 343 | return null; 344 | }, 345 | keyboardType: TextInputType.emailAddress, 346 | focusNode: _passwordFocusNode, 347 | decoration: InputDecoration( 348 | border: const UnderlineInputBorder(), 349 | filled: true, 350 | prefixIcon: Icon(Icons.lock), 351 | suffixIcon: GestureDetector( 352 | onTap: () { 353 | setState(() { 354 | _obscureText = !_obscureText!; 355 | }); 356 | }, 357 | child: Icon(_obscureText! 358 | ? Icons.visibility 359 | : Icons.visibility_off), 360 | ), 361 | labelText: 'Password', 362 | fillColor: Theme.of(context).backgroundColor), 363 | onSaved: (value) { 364 | _password = value; 365 | }, 366 | obscureText: _obscureText!, 367 | onEditingComplete: () => FocusScope.of(context) 368 | .requestFocus(_phoneNumberFocusNode), 369 | ), 370 | ), 371 | Padding( 372 | padding: const EdgeInsets.all(12.0), 373 | child: TextFormField( 374 | key: ValueKey('phone number'), 375 | focusNode: _phoneNumberFocusNode, 376 | validator: (value) { 377 | if (value!.isEmpty) { 378 | return 'Please enter a valid phone number'; 379 | } 380 | return null; 381 | }, 382 | inputFormatters: [ 383 | FilteringTextInputFormatter.digitsOnly 384 | ], 385 | textInputAction: TextInputAction.next, 386 | onEditingComplete: _submitForm, 387 | keyboardType: TextInputType.phone, 388 | decoration: InputDecoration( 389 | border: const UnderlineInputBorder(), 390 | filled: true, 391 | prefixIcon: Icon(Icons.phone_android), 392 | labelText: 'Phone number', 393 | fillColor: Theme.of(context).backgroundColor), 394 | onSaved: (value) { 395 | _phoneNumber = int.parse(value!); 396 | }, 397 | ), 398 | ), 399 | Row( 400 | mainAxisAlignment: MainAxisAlignment.end, 401 | children: [ 402 | SizedBox(width: 10), 403 | _isLoading 404 | ? CircularProgressIndicator() 405 | : ElevatedButton( 406 | style: ButtonStyle( 407 | shape: MaterialStateProperty.all< 408 | RoundedRectangleBorder>( 409 | RoundedRectangleBorder( 410 | borderRadius: 411 | BorderRadius.circular(30.0), 412 | side: BorderSide( 413 | color: 414 | ColorsConsts.backgroundColor), 415 | ), 416 | )), 417 | onPressed: _submitForm, 418 | child: Row( 419 | mainAxisAlignment: 420 | MainAxisAlignment.center, 421 | children: [ 422 | Text( 423 | 'Sign up', 424 | style: TextStyle( 425 | fontWeight: FontWeight.w500, 426 | fontSize: 17), 427 | ), 428 | SizedBox( 429 | width: 5, 430 | ), 431 | Icon( 432 | Icons.person, 433 | size: 18, 434 | ) 435 | ], 436 | )), 437 | SizedBox(width: 20), 438 | ], 439 | ), 440 | ], 441 | )) 442 | ], 443 | ), 444 | ), 445 | ], 446 | ), 447 | ); 448 | } 449 | } 450 | --------------------------------------------------------------------------------