├── .firebase
└── hosting.YnVpbGRcd2Vi.cache
├── .firebaserc
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── jcupzz
│ │ │ │ └── lefty
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ ├── ic_launcher_background.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── ic_launcher_background.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable-xhdpi
│ │ │ ├── ic_launcher_background.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── ic_launcher_background.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── ic_launcher_background.png
│ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ └── ic_launcher.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── Screenshots
│ ├── 1.jpg
│ ├── 10.jpg
│ ├── 11.jpg
│ ├── 12.jpg
│ ├── 13.jpg
│ ├── 14.jpg
│ ├── 15.jpg
│ ├── 16.jpg
│ ├── 17.jpg
│ ├── 18.jpg
│ ├── 19.jpg
│ ├── 2.jpg
│ ├── 20.jpg
│ ├── 21.jpg
│ ├── 22.jpg
│ ├── 23.jpg
│ ├── 24.jpg
│ ├── 3.jpg
│ ├── 4.jpg
│ ├── 5.jpg
│ ├── 6.jpg
│ ├── 7.jpg
│ ├── 8.jpg
│ └── 9.jpg
├── apk
│ └── Lefty.apk
├── font
│ ├── FredokaOne-Regular.ttf
│ ├── LobsterTwo-Regular.ttf
│ └── OpenSans-Light.ttf
└── icon
│ ├── android-bg.png
│ ├── android-fg.png
│ └── ios.png
├── firebase.json
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── Authentication
│ ├── Authentication_Services.dart
│ ├── Login.dart
│ └── Register.dart
├── Database_Services
│ └── Database_Services.dart
├── Home.dart
├── MyBottomNavigationBar.dart
├── Pages
│ ├── About.dart
│ ├── Account.dart
│ ├── Create.dart
│ ├── Details.dart
│ ├── Location.dart
│ ├── Register_Institute.dart
│ └── Select_Location.dart
├── SplashScreen.dart
├── Theme
│ └── ThemeController.dart
├── main.dart
└── static
│ ├── Circular_Loading.dart
│ ├── Horizontal_Loading.dart
│ └── Loading.dart
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
└── web
├── favicon.png
├── icons
├── Icon-192.png
└── Icon-512.png
├── index.html
└── manifest.json
/.firebase/hosting.YnVpbGRcd2Vi.cache:
--------------------------------------------------------------------------------
1 | favicon.png,1603304474913,0cab6e3dd5a9f008afdd133e1e1207cf65f2f2a10eb6712e3c209d8a5f76425a
2 | manifest.json,1613929729743,62020c80c06234cf4e080cf597dfcd546f371f00a09a0d1246d9f0884c61de53
3 | assets/assets/font/FredokaOne-Regular.ttf,1331663400000,50a3fa548e2d3de8c902bfd1d4d8ba32e65d8adfca6a4f2beb19795c0a8eff3a
4 | assets/assets/font/LobsterTwo-Regular.ttf,1308594600000,539d2f25041dd23e36dcf7a2efab95055bb288592aa47a61cff94ad91a351756
5 | assets/assets/font/OpenSans-Light.ttf,1296585000000,4a8665de1c0fb2b088f09bcd51d109b0d1970912173a68b0e84628741ab9ac73
6 | assets/fonts/MaterialIcons-Regular.otf,1603304407407,0f68fedebd1cdda23d988dc25ac5e50b517322b79e04ed19e743bef2a4364d25
7 | assets/packages/cupertino_icons/assets/CupertinoIcons.ttf,1603304308102,1ccaf8953583de868b812c7a5e4af9703a9988dddcae3b78bc63628891350d76
8 | icons/Icon-192.png,1603304474946,eaf2464bfb1d192fdd192a616f7b858dee456d573c6ec619648a1dcf2bdddfa6
9 | icons/Icon-512.png,1603304474955,9cf4cd298ae95acc1f25e97d88aa3f6bbfdf40867ea0f8a854c4393f49d56e64
10 | version.json,1613933539805,a10dd99e5642fd3fa73283cf230f94770ab5ab0b72385fda8a07fcbfac166322
11 | index.html,1613933540012,4a46e0de142c450aea1ae2bd583f06a888bddedde3e15a170ea22f4bc0ba28b5
12 | assets/AssetManifest.json,1613933539967,840806019a055d0697298f6339c7108d89ea0d6608975dbc2163d123acd2ad8e
13 | flutter_service_worker.js,1613933540828,6e28de83ae6536220ece2e14fd3fcd3b36071eb60a02597aa215f75d179fd735
14 | assets/FontManifest.json,1613933539967,d5b2b80453ac7308eb2d6d0c7c9e81c2c38efdadde6228be3f7547e7f3b141c0
15 | assets/NOTICES,1613933539968,3310f3c75d4d11b5c74f22d38cc38918896574d90bbdd34c34f276f7f5f6896a
16 | main.dart.js,1613933538753,c052b9db6b02181e5ec5a3bf57b790cd7a3d3fced04163fe90bc6589fe10b70c
17 |
--------------------------------------------------------------------------------
/.firebaserc:
--------------------------------------------------------------------------------
1 | {
2 | "projects": {
3 | "default": "lefty-3ea7c"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.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: 84f3d28555368a70270e9ac8390a9441df95e752
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Lefty
2 |
3 | A Food leftover donating app
4 |
5 | ## About
6 |
7 | Most of the people who has excess food leftovers from functions like marriages,party,etc..just dump food or waste them, because they don't know what to do with it. Through lefty people can donate
8 | excess food leftover to the needy ones.Lefty has a maps enabled location based feature that helps people to find the needy ones easily.Residential Institutions like orphanages,old age homes,
9 | etc.. can register an institute in lefty and lefty connects them to people who can help them.
10 |
11 | ## Screenshots
12 |
13 | ## DarkMode
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ## LightMode
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | Apk is available in assets folder.
48 | Also available as web app(Not fully functional.Preferred installing apk)
49 | Web app link: https://lefty-3ea7c.firebaseapp.com/
50 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:pedantic/analysis_options.yaml
2 |
3 | analyzer:
4 | exclude:
5 | - lib/src/locations.g.dart
6 |
7 | linter:
8 | rules:
9 | - always_declare_return_types
10 | - camel_case_types
11 | - empty_constructor_bodies
12 | - annotate_overrides
13 | - avoid_init_to_null
14 | - constant_identifier_names
15 | - one_member_abstracts
16 | - slash_for_doc_comments
17 | - sort_constructors_first
18 | - unnecessary_brace_in_string_interps
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 | apply plugin: 'com.google.gms.google-services'
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 29
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.jcupzz.lefty"
42 | minSdkVersion 24
43 | targetSdkVersion 29
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | Properties properties = new Properties()
47 | if (rootProject.file("local.properties").exists()) {
48 | properties.load(rootProject.file("local.properties").newDataInputStream())
49 | }
50 |
51 | // Inject the Maps API key into the manifest
52 | manifestPlaceholders = [ mapsApiKey : properties.getProperty("MAPS_API_KEY", "") ]
53 | }
54 |
55 | buildTypes {
56 | release {
57 | // TODO: Add your own signing config for the release build.
58 | // Signing with the debug keys for now, so `flutter run --release` works.
59 | signingConfig signingConfigs.debug
60 | }
61 | }
62 | }
63 |
64 | flutter {
65 | source '../..'
66 | }
67 |
68 | dependencies {
69 | implementation platform('com.google.firebase:firebase-bom:26.5.0')
70 | implementation 'com.google.firebase:firebase-analytics'
71 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
72 | }
73 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
13 |
16 |
17 |
24 |
28 |
32 |
37 |
41 |
42 |
43 |
44 |
45 |
46 |
48 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/jcupzz/lefty/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.jcupzz.lefty
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.google.gms:google-services:4.3.5'
10 | classpath 'com.android.tools.build:gradle:3.5.0'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
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 | }
26 | subprojects {
27 | project.evaluationDependsOn(':app')
28 | }
29 |
30 | task clean(type: Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/Screenshots/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/1.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/10.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/11.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/12.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/13.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/13.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/14.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/14.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/15.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/15.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/16.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/16.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/17.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/17.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/18.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/18.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/19.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/19.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/2.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/20.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/20.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/21.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/21.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/22.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/22.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/23.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/23.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/24.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/24.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/3.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/4.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/5.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/6.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/7.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/8.jpg
--------------------------------------------------------------------------------
/assets/Screenshots/9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/Screenshots/9.jpg
--------------------------------------------------------------------------------
/assets/apk/Lefty.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/apk/Lefty.apk
--------------------------------------------------------------------------------
/assets/font/FredokaOne-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/font/FredokaOne-Regular.ttf
--------------------------------------------------------------------------------
/assets/font/LobsterTwo-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/font/LobsterTwo-Regular.ttf
--------------------------------------------------------------------------------
/assets/font/OpenSans-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/font/OpenSans-Light.ttf
--------------------------------------------------------------------------------
/assets/icon/android-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/icon/android-bg.png
--------------------------------------------------------------------------------
/assets/icon/android-fg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/icon/android-fg.png
--------------------------------------------------------------------------------
/assets/icon/ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/assets/icon/ios.png
--------------------------------------------------------------------------------
/firebase.json:
--------------------------------------------------------------------------------
1 | {
2 | "hosting": {
3 | "public": "build/web",
4 | "ignore": [
5 | "firebase.json",
6 | "**/.*",
7 | "**/node_modules/**"
8 | ],
9 | "rewrites": [
10 | {
11 | "source": "**",
12 | "destination": "/index.html"
13 | }
14 | ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/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/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 9.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/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 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.jcupzz.lefty;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.jcupzz.lefty;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.jcupzz.lefty;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/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/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | lefty
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 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/Authentication/Authentication_Services.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 |
3 | class AuthenticationService {
4 | final FirebaseAuth firebaseAuth;
5 |
6 | AuthenticationService(this.firebaseAuth);
7 |
8 | Stream get authStateChanges => firebaseAuth.authStateChanges();
9 |
10 | Future signOut() async {
11 | try {
12 | await firebaseAuth.signOut();
13 | return "Signed out";
14 | } on FirebaseAuthException catch (e) {
15 | return e.message;
16 | }
17 | }
18 |
19 | Future signIn({String email, String password}) async {
20 | try {
21 | await firebaseAuth.signInWithEmailAndPassword(
22 | email: email, password: password);
23 | return "Signed in";
24 | } on FirebaseAuthException catch (e) {
25 | return e.message;
26 | }
27 | }
28 |
29 | Future signUp({String email, String password}) async {
30 | try {
31 | await firebaseAuth.createUserWithEmailAndPassword(
32 | email: email, password: password);
33 | return "Signed up";
34 | } on FirebaseAuthException catch (e) {
35 | return e.message;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/Authentication/Login.dart:
--------------------------------------------------------------------------------
1 | import 'package:bot_toast/bot_toast.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:lefty/Authentication/Authentication_Services.dart';
5 | import 'package:lefty/Theme/ThemeController.dart';
6 | import 'package:lefty/main.dart';
7 | import 'package:lefty/static/Loading.dart';
8 | import 'package:provider/provider.dart';
9 |
10 | class Login extends StatefulWidget {
11 | @override
12 | _LoginState createState() => _LoginState();
13 | }
14 |
15 | class _LoginState extends State {
16 | final _formkey = GlobalKey();
17 | String email = '';
18 | String password = '';
19 | String error = '';
20 | bool loading = false;
21 | dynamic isSuccess;
22 |
23 | @override
24 | Widget build(BuildContext context) {
25 | var brightness = Theme.of(context).brightness;
26 | return loading
27 | ? Loading()
28 | : Scaffold(
29 | backgroundColor: Theme.of(context).backgroundColor,
30 | body: Center(
31 | child: Padding(
32 | padding: const EdgeInsets.fromLTRB(30, 0, 30, 0),
33 | child: Form(
34 | key: _formkey,
35 | child: SingleChildScrollView(
36 | child: Column(
37 | children: [
38 | Align(
39 | alignment: Alignment.centerLeft,
40 | child: Text(
41 | "Hi there",
42 | style: TextStyle(
43 | color: brightness == Brightness.light ? Colors.teal[600] : Colors.teal[50],
44 | fontSize: 65,
45 | fontFamily: 'Lobster',
46 | fontWeight: FontWeight.bold),
47 | ),
48 | ),
49 | Align(
50 | alignment: Alignment.centerLeft,
51 | child: Text(
52 | "Welcome back",
53 | style: TextStyle(
54 | color:brightness == Brightness.light? Colors.teal[700] : Colors.teal[100],
55 | fontSize: 35,
56 | fontFamily: 'Lobster',
57 | fontStyle: FontStyle.normal,
58 | fontWeight: FontWeight.bold),
59 | ),
60 | ),
61 | SizedBox(
62 | height: 65,
63 | ),
64 |
65 | //Email Field
66 |
67 | TextFormField(
68 | validator: (val) => val.isEmpty || !(val.contains('@')) ? 'Enter a valid email address' : null,
69 | onChanged: (value) {
70 | setState(() => email = value);
71 | },
72 | style: Theme.of(context).textTheme.headline5,
73 | decoration: InputDecoration(
74 | labelStyle: Theme.of(context).textTheme.headline5,
75 | labelText: "Email",
76 | fillColor: Colors.white,
77 | focusedBorder: OutlineInputBorder(
78 | borderRadius: BorderRadius.circular(20),
79 | borderSide: BorderSide(width: 1, color: Colors.teal[200]),
80 | ),
81 | enabledBorder: OutlineInputBorder(
82 | borderRadius: BorderRadius.circular(20),
83 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
84 | ),
85 | border: OutlineInputBorder(
86 | borderRadius: BorderRadius.circular(20),
87 | borderSide: BorderSide(),
88 | ),
89 | ),
90 | ),
91 |
92 | SizedBox(
93 | height: 25,
94 | ),
95 |
96 | //Password Field
97 |
98 | TextFormField(
99 | validator: (val) =>
100 | val.isEmpty || val.length < 6 ? 'Enter a password greater than 6 characters' : null,
101 | onChanged: (value) {
102 | setState(() => password = value);
103 | },
104 | obscureText: true,
105 | style: Theme.of(context).textTheme.headline5,
106 | decoration: InputDecoration(
107 | labelStyle: Theme.of(context).textTheme.headline5,
108 | labelText: "Password",
109 | focusedBorder: OutlineInputBorder(
110 | borderRadius: BorderRadius.circular(20),
111 | borderSide: BorderSide(width: 1, color: Colors.teal[200]),
112 | ),
113 | enabledBorder: OutlineInputBorder(
114 | borderRadius: BorderRadius.circular(20),
115 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
116 | ),
117 | border: OutlineInputBorder(
118 | borderRadius: BorderRadius.circular(20),
119 | borderSide: BorderSide(),
120 | ),
121 | ),
122 | ),
123 | SizedBox(
124 | height: 30,
125 | ),
126 | Container(
127 | width: double.infinity,
128 | child: ElevatedButton(
129 | style: ElevatedButton.styleFrom(
130 | primary: Theme.of(context).buttonColor,
131 | elevation: 10,
132 | shadowColor: brightness == Brightness.light?Colors.teal[500]:Colors.black,
133 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
134 | ),
135 | onPressed: () async {
136 | print("Button presed");
137 | //
138 | if (_formkey.currentState.validate()) {
139 | setState(() {
140 | loading = true;
141 | });
142 | isSuccess =
143 | await context.read().signIn(email: email, password: password);
144 | print(isSuccess);
145 | if (isSuccess.toString() == "Signed in") {
146 | setState(() {
147 | isVerified = true;
148 | });
149 | Navigator.pushReplacementNamed(context, '/Home');
150 | BotToast.showSimpleNotification(
151 | title: "Welcome back!",
152 | backgroundColor: Colors.teal[100],
153 | );
154 | } else {
155 | Navigator.pushReplacementNamed(context, '/Register');
156 | BotToast.showSimpleNotification(
157 | title: "Failed to sign in. Please check internet connection and try again!",
158 | backgroundColor: Colors.red[300],
159 | );
160 | }
161 | }
162 | //}
163 | // dynamic result =
164 | // await _auth.loginWithEmailAndPassword(
165 | // email, password);
166 | // if (result == null) {
167 | // setState(() {
168 | // loading = false;
169 | // error = 'Invalid Credentials';
170 | // print(
171 | // "Oops...!\nSign in failed!\nInvalid Credentials");
172 | // });
173 | // } else {
174 | // print('User Signed In Successfully');
175 | // Navigator.pushNamed(context, '/List_home');
176 | // }
177 | // }
178 | },
179 | child: Padding(
180 | padding: const EdgeInsets.fromLTRB(0, 20, 0, 20),
181 | child: Text(
182 | "Sign in",
183 | style: TextStyle(color: Colors.white),
184 | ),
185 | ),
186 | ),
187 | ),
188 |
189 | SizedBox(
190 | height: 20,
191 | ),
192 | Align(
193 | alignment: Alignment.center,
194 | child: Text(
195 | error,
196 | textAlign: TextAlign.center,
197 | style: TextStyle(color: Colors.deepOrange[200], fontSize: 18),
198 | ),
199 | )
200 | ],
201 | ),
202 | )),
203 | ),
204 | ),
205 | );
206 | }
207 | }
208 |
--------------------------------------------------------------------------------
/lib/Authentication/Register.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:lefty/Authentication/Authentication_Services.dart';
4 | import 'package:lefty/Theme/ThemeController.dart';
5 | import 'package:lefty/main.dart';
6 | import 'package:lefty/static/Loading.dart';
7 | import 'package:provider/provider.dart';
8 | import 'package:bot_toast/bot_toast.dart';
9 |
10 | class Register extends StatefulWidget {
11 | @override
12 | _RegisterState createState() => _RegisterState();
13 | }
14 |
15 | class _RegisterState extends State {
16 | final _formkey = GlobalKey();
17 | String email = '';
18 | String password = '';
19 | String error = '';
20 | bool loading = false;
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | var brightness = Theme.of(context).brightness;
25 | return loading
26 | ? Loading()
27 | : Scaffold(
28 | backgroundColor: Theme.of(context).backgroundColor,
29 | body: Center(
30 | child: Padding(
31 | padding: const EdgeInsets.fromLTRB(30, 0, 30, 0),
32 | child: Form(
33 | key: _formkey,
34 | child: SingleChildScrollView(
35 | child: Column(
36 | children: [
37 | Align(
38 | alignment: Alignment.centerLeft,
39 | child: Text(
40 | "Welcome to",
41 | style: TextStyle(
42 | color: brightness == Brightness.light ? Colors.teal[600] : Colors.teal[50],
43 | fontSize: 45,
44 | fontFamily: 'Lobster'
45 | ),
46 | ),
47 | ),
48 | Align(
49 | alignment: Alignment.centerLeft,
50 | child: Text(
51 | "Lefty.",
52 | style: TextStyle(
53 | color: brightness == Brightness.light ? Colors.teal[700] : Colors.teal[100],
54 | fontSize: 100,
55 | fontWeight: FontWeight.bold,
56 | fontFamily: 'Lobster'),
57 | ),
58 | ),
59 | SizedBox(
60 | height: 60,
61 | ),
62 |
63 | //Email Field
64 |
65 | TextFormField(
66 | validator: (val) => val.isEmpty || !(val.contains('@')) ? 'Enter a valid email address' : null,
67 | style: Theme.of(context).textTheme.headline5,
68 | onChanged: (value) {
69 | setState(() => email = value);
70 | },
71 | decoration: InputDecoration(
72 | labelStyle: Theme.of(context).textTheme.headline5,
73 | labelText: "Email",
74 | fillColor: Colors.white,
75 | focusedBorder: OutlineInputBorder(
76 | borderRadius: BorderRadius.circular(20),
77 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
78 | ),
79 | enabledBorder: OutlineInputBorder(
80 | borderRadius: BorderRadius.circular(20),
81 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
82 | ),
83 | border: OutlineInputBorder(
84 | borderRadius: BorderRadius.circular(20),
85 | borderSide: BorderSide(),
86 | ),
87 | ),
88 | ),
89 |
90 | SizedBox(
91 | height: 25,
92 | ),
93 |
94 | //Password Field
95 |
96 | TextFormField(
97 | validator: (val) =>
98 | val.isEmpty || val.length < 6 ? 'Enter a password greater than 6 characters' : null,
99 | onChanged: (value) {
100 | setState(() => password = value);
101 | },
102 | obscureText: true,
103 | style: Theme.of(context).textTheme.headline5,
104 | decoration: InputDecoration(
105 | labelStyle: Theme.of(context).textTheme.headline5,
106 | labelText: "Password",
107 | focusedBorder: OutlineInputBorder(
108 | borderRadius: BorderRadius.circular(20),
109 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
110 | ),
111 | enabledBorder: OutlineInputBorder(
112 | borderRadius: BorderRadius.circular(20),
113 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
114 | ),
115 | border: OutlineInputBorder(
116 | borderRadius: BorderRadius.circular(20),
117 | borderSide: BorderSide(),
118 | ),
119 | ),
120 | ),
121 | SizedBox(
122 | height: 30,
123 | ),
124 | Container(
125 | width: double.infinity,
126 | child: ElevatedButton(
127 | style: ElevatedButton.styleFrom(
128 | shadowColor: brightness == Brightness.light?Colors.teal[500]:Colors.black,
129 | elevation: 10,
130 | primary: Theme.of(context).buttonColor,
131 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
132 | ),
133 | onPressed: () async {
134 | if (_formkey.currentState.validate()) {
135 | setState(() {
136 | loading = true;
137 | });
138 | dynamic isSuccess =
139 | await context.read().signUp(email: email, password: password);
140 | if (isSuccess.toString() == "Signed up") {
141 | setState(() {
142 | isVerified = true;
143 | });
144 | Navigator.pushReplacementNamed(context, '/Home');
145 | BotToast.showSimpleNotification(
146 | title: " Welcome! ",
147 | backgroundColor: Colors.teal[200],
148 | );
149 | } else {
150 | Navigator.pushReplacementNamed(context, '/Register');
151 | BotToast.showSimpleNotification(
152 | title: "Failed to register. Please check internet connection and try again!",
153 | backgroundColor: Colors.red[300],
154 | );
155 | }
156 | }
157 | // if (_formkey.currentState.validate()) {
158 | // setState(() {
159 | // loading = true;
160 | // });
161 | // dynamic result =
162 | // await _auth.registerWithEmailAndPassword(
163 | // email, password);
164 | // if (result == null) {
165 | // setState(() {
166 | // print("Error user not registered");
167 | // loading = false;
168 | // });
169 | // } else {
170 | // print('User Signed In Successfully');
171 | // Navigator.pushReplacementNamed(
172 | // context, '/List_home');
173 | // }
174 | // }
175 | },
176 | child: Padding(
177 | padding: const EdgeInsets.fromLTRB(0, 20, 0, 20),
178 | child: Text(
179 | "Sign up",
180 | ),
181 | ),
182 | ),
183 | ),
184 | TextButton(
185 | onPressed: () {
186 | Navigator.pushNamed(context, '/Login');
187 | },
188 | child: Text(
189 | "Already registered ? Login Here",
190 | style: Theme.of(context).textTheme.headline5.apply(
191 | fontFamily: '',color: brightness == Brightness.light?Colors.teal[700]:Colors.grey
192 | ),
193 | )),
194 | ],
195 | ),
196 | )),
197 | ),
198 | ),
199 | );
200 | }
201 | }
202 |
--------------------------------------------------------------------------------
/lib/Database_Services/Database_Services.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:firebase_auth/firebase_auth.dart';
5 | import 'package:firebase_storage/firebase_storage.dart' as firebase_storage;
6 | import 'package:flutter/material.dart';
7 |
8 | class Database_Services {
9 | FirebaseFirestore firestore = FirebaseFirestore.instance;
10 | FirebaseAuth _auth = FirebaseAuth.instance;
11 | CollectionReference collectionReference1 = FirebaseFirestore.instance.collection("iDetails");
12 |
13 | // firebase_storage.FirebaseStorage _storage =
14 | // firebase_storage.FirebaseStorage.instance;
15 |
16 | Future addCreateToFb(String iName, String iAddress, String iType, File iPhoto, String iPhone1, String iPhone2,
17 | String iDesc, bool isRequested, double lat, double long) async {
18 | String downloadURL;
19 | int iHour = 0;
20 | final User firebaseUser = _auth.currentUser;
21 | if (iPhoto == null) {
22 | downloadURL =
23 | "https://firebasestorage.googleapis.com/v0/b/lefty-3ea7c.appspot.com/o/iPhoto%2Fdownload%20(1).jfif?alt=media&token=1db1a00a-3c7f-4810-9c3e-37f2b6bf724a";
24 | } else {
25 | downloadURL = await uploadFile(iPhoto.path);
26 | }
27 |
28 | //CollectionReference collectionReference2 = FirebaseFirestore.instance.collection("iPublic");
29 | // firebase_storage.Reference ref = firebase_storage.FirebaseStorage.instance
30 | // .ref()
31 | // .child("iPhoto");
32 |
33 | if (!(downloadURL == 'Error')) {
34 | await collectionReference1.add({
35 | 'iName': iName,
36 | 'iAddress': iAddress,
37 | 'iType': iType,
38 | 'iPhoto': downloadURL,
39 | 'iPhone1': iPhone1,
40 | 'iPhone2': iPhone2,
41 | 'iDesc': iDesc,
42 | 'isRequested': isRequested,
43 | 'time': DateTime.now(),
44 | 'uid': firebaseUser.uid,
45 | 'lat': lat,
46 | 'long': long,
47 | }).then((value) {
48 | return 'Done';
49 | }).catchError((onError) {
50 | return 'Error';
51 | });
52 | }
53 | }
54 |
55 | Future uploadFile(String filePath) async {
56 | File file = File(filePath);
57 | String downloadURL;
58 | try {
59 | await firebase_storage.FirebaseStorage.instance
60 | .ref('iPhoto')
61 | .child("${DateTime.now().millisecondsSinceEpoch}")
62 | .putFile(file)
63 | .then((val) async {
64 | downloadURL = await val.ref.getDownloadURL();
65 | });
66 | return downloadURL;
67 | } on FirebaseException catch (e) {
68 | // e.g, e.code == 'canceled'
69 | return "Error";
70 | }
71 | }
72 | Future deleteDataFromFb(
73 | DocumentSnapshot documentSnapshot,BuildContext context) async {
74 | final User firebaseUser = _auth.currentUser;
75 |
76 | await collectionReference1.doc(documentSnapshot.id).delete().then((value) {
77 | ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('Data Deleted!',style: Theme.of(context).textTheme.headline4,)));
78 | }).catchError((onError){
79 | ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('Error Deleting Data!',style: Theme.of(context).textTheme.headline4,)));
80 | });
81 | }
82 |
83 |
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/lib/Home.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:cached_network_image/cached_network_image.dart';
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:firebase_auth/firebase_auth.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter/services.dart';
7 | import 'package:lefty/Pages/About.dart';
8 | import 'package:firebase_core/firebase_core.dart';
9 | import 'package:lefty/Pages/Details.dart';
10 | import 'package:lefty/Theme/ThemeController.dart';
11 | import 'package:lefty/main.dart';
12 | import 'package:lefty/static/Loading.dart';
13 | import 'package:provider/provider.dart';
14 | import 'package:lefty/Authentication/Authentication_Services.dart';
15 |
16 | class Home extends StatefulWidget {
17 | @override
18 | _HomeState createState() => _HomeState();
19 | }
20 |
21 | class _HomeState extends State {
22 | ThemeMode _themeMode;
23 | int selectedValue;
24 | FirebaseFirestore firestore = FirebaseFirestore.instance;
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 |
29 | final firebaseUser = context.watch();
30 | return Scaffold(
31 | backgroundColor: Theme.of(context).backgroundColor,
32 | appBar: AppBar(
33 | backgroundColor: Theme.of(context).primaryColorDark,
34 | elevation: 0,
35 | title: Text(
36 | "Lefty.",
37 | style: TextStyle(color: Colors.teal[100],fontFamily: 'Lobster',fontSize: 30),
38 | ),
39 | centerTitle: true,
40 | actions: [
41 | // IconButton(
42 | // icon: Icon(Icons.more_vert_rounded),
43 | // onPressed: () async {
44 | //
45 | // // dynamic isLoggedOut =
46 | // // await context.read().signOut();
47 | // // if (isLoggedOut.toString() == "Signed out") {
48 | // // setState(() {
49 | // // isVerified = false;
50 | // // });
51 | // // SystemNavigator.pop();
52 | // // }
53 | // }),
54 | PopupMenuButton(itemBuilder: (context){
55 | return [
56 | PopupMenuItem(
57 | value: 1,
58 | child: Text('Theme'),
59 | ),
60 | PopupMenuItem(
61 | value: 2,
62 | child: Text('SignOut'),
63 | ),
64 | PopupMenuItem(
65 | value: 3,
66 | child: Text('About'),
67 | ),
68 | ];
69 | },
70 | icon: Icon(Icons.more_vert_rounded),
71 | onSelected: (index) async {
72 | switch(index){
73 | case 1:
74 | changeThemeShowDialog(context);
75 | break;
76 | case 2:
77 | showSignOutDialog(context);
78 | break;
79 | case 3:
80 | Navigator.push(context, MaterialPageRoute(builder: (_)=>About()));
81 | break;
82 | }
83 | }
84 | ),
85 | ],
86 | ),
87 | body: Container(
88 | width: MediaQuery.of(context).size.width,
89 | margin: EdgeInsets.fromLTRB(0, 5, 0, 0),
90 | height: MediaQuery.of(context).size.height,
91 | child: StreamBuilder(
92 | stream: firestore
93 | .collection("iDetails")
94 | .where('isRequested', isEqualTo: true)
95 | .snapshots(),
96 | builder:
97 | (BuildContext context, AsyncSnapshot snapshot) {
98 | if (!snapshot.hasData) {
99 | return Loading();
100 | } else {
101 | return ListView(
102 | shrinkWrap: true,
103 | children: snapshot.data.docs.map((DocumentSnapshot document) {
104 | return Padding(
105 | padding: const EdgeInsets.fromLTRB(3, 0, 3, 0),
106 | child: Card(
107 | color: Theme.of(context).cardColor,
108 | elevation: 0,
109 | shape: RoundedRectangleBorder(
110 | borderRadius: BorderRadius.circular(14.0)),
111 | child: ListTile(
112 | onTap: () {
113 | Navigator.push(
114 | context,
115 | MaterialPageRoute(
116 | builder: (_) => Details(document)));
117 | },
118 | onLongPress: () {
119 | //showDeleteDialog(document);
120 | },
121 | //subtitle: Text(document['iType']),
122 | title: Padding(
123 | padding: const EdgeInsets.fromLTRB(0, 10, 0, 10),
124 | child: Column(
125 | crossAxisAlignment: CrossAxisAlignment.start,
126 | children: [
127 | Text(
128 | document.data()['iName'],
129 | style:Theme.of(context).textTheme.headline3),
130 | Text(
131 | document.data()['iType'],
132 | style:Theme.of(context).textTheme.headline5),
133 | Divider(height: 20,thickness: 0,color: Theme.of(context).dividerColor,),
134 | Row(
135 | crossAxisAlignment:
136 | CrossAxisAlignment.start,
137 | mainAxisAlignment:
138 | MainAxisAlignment.spaceBetween,
139 | children: [
140 | Flexible(
141 | flex: 1,
142 | child: Padding(
143 | padding: const EdgeInsets.fromLTRB(
144 | 0, 0, 10, 5),
145 | child: Column(
146 | mainAxisAlignment:
147 | MainAxisAlignment.start,
148 | crossAxisAlignment:
149 | CrossAxisAlignment.start,
150 | mainAxisSize: MainAxisSize.max,
151 | children: [
152 | Text(
153 | document.data()['iDesc'],
154 | softWrap: true,
155 | style: Theme.of(context).textTheme.bodyText1
156 | ),
157 | Text(
158 | document.data()['iAddress'],
159 | softWrap: true,
160 | style:Theme.of(context).textTheme.bodyText1
161 | ),
162 | ],
163 | ),
164 | ),
165 | ),
166 | Flexible(
167 | flex: 1,
168 | child: CachedNetworkImage(
169 | imageUrl: document.data()['iPhoto'],
170 | imageBuilder:
171 | (context, imageProvider) =>
172 | Container(
173 | width: MediaQuery.of(context)
174 | .size
175 | .width,
176 | height: MediaQuery.of(context)
177 | .size
178 | .width *
179 | 0.35,
180 | decoration: BoxDecoration(
181 | shape: BoxShape.rectangle,
182 | borderRadius:
183 | BorderRadius.circular(10),
184 | image: DecorationImage(
185 | image: imageProvider,
186 | fit: BoxFit.cover),
187 | ),
188 | ),
189 | placeholder: ((context, s) =>
190 | Center(
191 | child:
192 | CircularProgressIndicator(),
193 | )),
194 | fit: BoxFit.cover,
195 | ),
196 | ),
197 | ],
198 | ),
199 | ],
200 | ),
201 | ),
202 | )),
203 | );
204 | }).toList(),
205 | );
206 | }
207 | }),
208 | ),
209 | );
210 | }
211 | showSignOutDialog(BuildContext context) {
212 | showDialog(
213 | context: context,
214 | builder: (context) {
215 | return AlertDialog(
216 | elevation: 24,
217 | backgroundColor: Theme.of(context).cardColor,
218 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
219 | title: Text("SignOut", style: Theme.of(context).textTheme.headline3),
220 | content: Text("Are you sure?", style: Theme.of(context).textTheme.subtitle1),
221 | actions: [
222 | ElevatedButton(
223 | style: ElevatedButton.styleFrom(primary: Theme.of(context).cardColor, elevation: 0),
224 | onPressed: () {
225 | Navigator.pop(context);
226 | },
227 | child: Text(
228 | "No",
229 | style: TextStyle(color: Colors.greenAccent, fontSize: 18),
230 | ),
231 | ),
232 | ElevatedButton(
233 | style: ElevatedButton.styleFrom(primary: Theme.of(context).cardColor, elevation: 0),
234 | onPressed: () async{
235 | dynamic isLoggedOut = await context.read().signOut();
236 | if (isLoggedOut.toString() == "Signed out") {
237 | setState(() {
238 | isVerified = false;
239 | });
240 | print("Signed Outt");
241 | SystemNavigator.pop();
242 | }
243 | },
244 | child: Text(
245 | "Yes",
246 | style: TextStyle(fontSize: 18, color: Colors.redAccent),
247 | ),
248 | ),
249 | ],
250 | );
251 | });
252 | }
253 |
254 | changeThemeShowDialog(BuildContext context) {
255 | showDialog(
256 | context: context,
257 | builder: (_) {
258 | return AlertDialog(
259 | title: Text("Theme",style: Theme.of(context).textTheme.headline3,),
260 | content: themeDialog(),
261 | );
262 | });
263 | }
264 |
265 | Widget themeDialog() {
266 | return Column(
267 | mainAxisSize: MainAxisSize.min,
268 | mainAxisAlignment: MainAxisAlignment.center,
269 | crossAxisAlignment: CrossAxisAlignment.center,
270 | children: [
271 | RadioListTile(
272 | title: Text('system'),
273 | value: ThemeMode.system,
274 | groupValue: _themeMode,
275 | onChanged: (value) {
276 | setState(() {
277 | _themeMode = value;
278 | ThemeController.to.setThemeMode(_themeMode);
279 | });
280 | },
281 | ),
282 | RadioListTile(
283 | title: Text('dark'),
284 | value: ThemeMode.dark,
285 | groupValue: _themeMode,
286 | onChanged: (value) {
287 | setState(() {
288 | _themeMode = value;
289 | ThemeController.to.setThemeMode(_themeMode);
290 | });
291 | },
292 | ),
293 | RadioListTile(
294 | title: Text('light'),
295 | value: ThemeMode.light,
296 | groupValue: _themeMode,
297 | onChanged: (value) {
298 | setState(() {
299 | _themeMode = value;
300 | ThemeController.to.setThemeMode(_themeMode);
301 | });
302 | },
303 | )
304 | ],
305 | );
306 | }
307 | }
308 |
--------------------------------------------------------------------------------
/lib/MyBottomNavigationBar.dart:
--------------------------------------------------------------------------------
1 | import 'package:curved_navigation_bar/curved_navigation_bar.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:lefty/Authentication/Login.dart';
5 | import 'package:lefty/Authentication/Register.dart';
6 | import 'package:lefty/Home.dart';
7 | import 'package:lefty/Pages/Account.dart';
8 | import 'package:lefty/Pages/Create.dart';
9 | import 'package:lefty/Pages/Location.dart';
10 |
11 | class MyBottomNavigationBar extends StatefulWidget {
12 | @override
13 | _MyBottomNavigationBarState createState() => _MyBottomNavigationBarState();
14 | }
15 |
16 | class _MyBottomNavigationBarState extends State {
17 | int _page = 0;
18 | final pageOption = [
19 | Home(),
20 | Create(),
21 | Location(),
22 | Account(),
23 | ];
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Scaffold(
28 | bottomNavigationBar: CurvedNavigationBar(
29 | backgroundColor: Theme.of(context).backgroundColor,
30 | animationCurve: Curves.bounceInOut,
31 | animationDuration: Duration(milliseconds: 200),
32 | color: Theme.of(context).primaryColorDark,
33 | buttonBackgroundColor: Theme.of(context).primaryColorDark,
34 | height: 60,
35 | items: [
36 | Icon(
37 | Icons.home,
38 | size: 20,
39 | color: Colors.white,
40 | ),
41 | Icon(
42 | Icons.add_circle_rounded,
43 | size: 20,
44 | color: Colors.white,
45 | ),
46 | Icon(
47 | Icons.location_on_outlined,
48 | color: Colors.white,
49 | size: 20,
50 | ),
51 | Icon(
52 | Icons.person,
53 | size: 20,
54 | color: Colors.white,
55 | ),
56 | ],
57 | onTap: (index) {
58 | setState(() {
59 | _page = index;
60 | });
61 | },
62 | ),
63 | body: pageOption[_page],
64 | );
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/lib/Pages/About.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:lefty/static/Circular_Loading.dart';
5 | import 'package:webview_flutter/webview_flutter.dart';
6 |
7 | class About extends StatefulWidget {
8 | @override
9 | _AboutState createState() => _AboutState();
10 | }
11 |
12 | class _AboutState extends State {
13 | bool isLoaded = false;
14 |
15 | void initState() {
16 | super.initState();
17 | if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();
18 | }
19 | int _indexStack = 1;
20 | @override
21 | Widget build(BuildContext context) {
22 | return IndexedStack(
23 | index: _indexStack,
24 | children: [
25 | SafeArea(
26 | child: WebView(
27 | onPageFinished: (String url) {
28 | setState(() {
29 | _indexStack = 0;
30 | });
31 | },
32 | javascriptMode: JavascriptMode.unrestricted,
33 | initialUrl: 'https://www.notion.so/Lefty-fc3ef66584314d1a8f4a50bd16574a5d',
34 | ),
35 | ),
36 | Circular_Loading(),
37 | ],
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/Pages/Account.dart:
--------------------------------------------------------------------------------
1 | import 'package:bot_toast/bot_toast.dart';
2 | import 'package:cached_network_image/cached_network_image.dart';
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:firebase_auth/firebase_auth.dart';
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter/services.dart';
8 | import 'package:lefty/Authentication/Authentication_Services.dart';
9 | import 'package:lefty/Authentication/Register.dart';
10 | import 'package:lefty/Database_Services/Database_Services.dart';
11 | import 'package:lefty/Home.dart';
12 | import 'package:lefty/Pages/Details.dart';
13 | import 'package:lefty/Theme/ThemeController.dart';
14 | import 'package:lefty/main.dart';
15 | import 'package:lefty/static/Horizontal_Loading.dart';
16 | import 'package:provider/provider.dart';
17 |
18 | class Account extends StatefulWidget {
19 | @override
20 | _AccountState createState() => _AccountState();
21 | }
22 |
23 | class _AccountState extends State {
24 | FirebaseFirestore firestore = FirebaseFirestore.instance;
25 | ThemeMode _themeMode;
26 | FirebaseAuth _auth = FirebaseAuth.instance;
27 | Stream stream;
28 |
29 | @override
30 | void initState() {
31 | super.initState();
32 | if (isVerified) {
33 | final User firebaseUser = _auth.currentUser;
34 | stream = firestore.collection("iDetails").where('uid', isEqualTo: firebaseUser.uid).snapshots();
35 | } else {
36 | //do nothing
37 | }
38 | }
39 |
40 | @override
41 | Widget build(BuildContext context) {
42 | final firebaseUser = context.watch();
43 | var brightness = Theme.of(context).brightness;
44 | return (isVerified)
45 | ? Scaffold(
46 | backgroundColor: Theme.of(context).backgroundColor,
47 | body: SafeArea(
48 | child: Padding(
49 | padding: const EdgeInsets.all(10),
50 | child: SingleChildScrollView(
51 | child: Column(
52 | mainAxisSize: MainAxisSize.max,
53 | mainAxisAlignment: MainAxisAlignment.start,
54 | crossAxisAlignment: CrossAxisAlignment.start,
55 | children: [
56 | SizedBox(
57 | height: 30,
58 | ),
59 | Center(
60 | child: CircleAvatar(
61 | backgroundImage: NetworkImage(
62 | "https://firebasestorage.googleapis.com/v0/b/lefty-3ea7c.appspot.com/o/iPhoto%2Fdownload%20(1).png?alt=media&token=c00efbe3-8f0c-4bd9-86b7-61421d1f855f"),
63 | radius: 80.0,
64 | ),
65 | ),
66 | SizedBox(
67 | height: 30,
68 | ),
69 | Container(
70 | width: MediaQuery.of(context).size.width,
71 | height: 60,
72 | child: Card(
73 | elevation: 0,
74 | shape: RoundedRectangleBorder(
75 | borderRadius: BorderRadius.circular(14),
76 | ),
77 | child: Center(
78 | child:
79 | Text("${firebaseUser.email}" ?? 'Anonymous', style: Theme.of(context).textTheme.subtitle1))),
80 | ),
81 | Container(
82 | width: MediaQuery.of(context).size.width,
83 | height: 60,
84 | child: Card(
85 | elevation: 0,
86 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
87 | child: Center(
88 | child: Text(
89 | 'Your Institutions',
90 | style: Theme.of(context).textTheme.subtitle1.apply(fontFamily: 'FredokaOne'),
91 | )))),
92 | Container(
93 | width: MediaQuery.of(context).size.width,
94 | child: StreamBuilder(
95 | stream: stream,
96 | builder: (BuildContext context, AsyncSnapshot snapshot) {
97 | if (!snapshot.hasData) {
98 | return Horizontal_Loading();
99 | } else {
100 | return (!(snapshot.data.docs.length == 0 || snapshot.data == null))
101 | ? ConstrainedBox(
102 | constraints: BoxConstraints(
103 | maxHeight: double.infinity,
104 | minHeight: MediaQuery.of(context).size.width * 0.5,
105 | minWidth: MediaQuery.of(context).size.width,
106 | maxWidth: MediaQuery.of(context).size.width),
107 | child: ListView(
108 | shrinkWrap: true,
109 | children: snapshot.data.docs.map((DocumentSnapshot document) {
110 | return Card(
111 | color: Theme.of(context).cardColor,
112 | elevation: 0,
113 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14.0)),
114 | child: ListTile(
115 | onTap: () {
116 | Navigator.push(context, MaterialPageRoute(builder: (_) => Details(document)));
117 | },
118 | onLongPress: () {
119 | BotToast.showText(
120 | text: 'Please goto Create menu and long press to delete institute');
121 | },
122 | title: Padding(
123 | padding: const EdgeInsets.fromLTRB(0, 10, 0, 10),
124 | child: Column(
125 | mainAxisSize: MainAxisSize.min,
126 | crossAxisAlignment: CrossAxisAlignment.start,
127 | children: [
128 | Text(document.data()['iName'],
129 | style: Theme.of(context).textTheme.headline3),
130 | Text(document.data()['iType'],
131 | style: Theme.of(context).textTheme.headline5),
132 | Divider(
133 | height: 20,
134 | thickness: 0,
135 | color: Theme.of(context).dividerColor,
136 | ),
137 | Row(
138 | crossAxisAlignment: CrossAxisAlignment.start,
139 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
140 | children: [
141 | Flexible(
142 | flex: 1,
143 | child: Padding(
144 | padding: const EdgeInsets.fromLTRB(0, 0, 15, 3),
145 | child: Column(
146 | mainAxisAlignment: MainAxisAlignment.start,
147 | crossAxisAlignment: CrossAxisAlignment.start,
148 | mainAxisSize: MainAxisSize.max,
149 | children: [
150 | Text(
151 | document.data()['iDesc'],
152 | style: Theme.of(context).textTheme.bodyText1,
153 | ),
154 | Text(
155 | document.data()['iAddress'],
156 | style: Theme.of(context).textTheme.bodyText1,
157 | ),
158 | Text(
159 | document.data()['iPhone1'],
160 | style: Theme.of(context).textTheme.bodyText1,
161 | ),
162 | Text(
163 | document.data()['iPhone2'],
164 | style: Theme.of(context).textTheme.bodyText1,
165 | ),
166 | ],
167 | ),
168 | ),
169 | ),
170 | Flexible(
171 | flex: 1,
172 | child: CachedNetworkImage(
173 | imageUrl: document.data()['iPhoto'],
174 | imageBuilder: (context, imageProvider) => Container(
175 | width: MediaQuery.of(context).size.width,
176 | height: MediaQuery.of(context).size.width * 0.35,
177 | decoration: BoxDecoration(
178 | shape: BoxShape.rectangle,
179 | borderRadius: BorderRadius.circular(10),
180 | image:
181 | DecorationImage(image: imageProvider, fit: BoxFit.cover),
182 | ),
183 | ),
184 | placeholder: ((context, s) => Center(
185 | child: CircularProgressIndicator(),
186 | )),
187 | fit: BoxFit.cover,
188 | ),
189 | ),
190 | ],
191 | ),
192 | ],
193 | ),
194 | ),
195 | ));
196 | }).toList(),
197 | ),
198 | )
199 | : Container(
200 | width: MediaQuery.of(context).size.width,
201 | height: MediaQuery.of(context).size.width * 0.5,
202 | child: Card(
203 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
204 | elevation: 0,
205 | color: Theme.of(context).cardColor,
206 | child: Center(
207 | child: Text(
208 | 'You have 0 institute\nCreate an Institute \nby clicking Register \nInstitute in Create menu',
209 | textAlign: TextAlign.center,
210 | style: Theme.of(context).textTheme.bodyText1,
211 | ),
212 | ),
213 | ),
214 | );
215 | }
216 | }),
217 | ),
218 | Container(
219 | margin: EdgeInsets.fromLTRB(3, 5, 3, 0),
220 | height: 50,
221 | width: MediaQuery.of(context).size.width,
222 | child: ElevatedButton(
223 | onPressed: () {
224 | changeThemeShowDialog(context);
225 | },
226 | child: Text(
227 | "Current Theme: ${brightness == Brightness.dark ? 'DarkMode' : 'LightMode'}",
228 | style: Theme.of(context).textTheme.subtitle1,
229 | ),
230 | style: ElevatedButton.styleFrom(
231 | primary: Theme.of(context).cardColor,
232 | elevation: 0,
233 | shape: RoundedRectangleBorder(
234 | borderRadius: BorderRadius.circular(14),
235 | )),
236 | ),
237 | ),
238 | Container(
239 | margin: EdgeInsets.fromLTRB(3, 10, 3, 10),
240 | height: 50,
241 | width: MediaQuery.of(context).size.width,
242 | child: ElevatedButton(
243 | onPressed: () {
244 | showSignOutDialog(context);
245 | },
246 | child: Text(
247 | 'SignOut',
248 | style: Theme.of(context).textTheme.subtitle1,
249 | ),
250 | style: ElevatedButton.styleFrom(
251 | primary: Theme.of(context).cardColor,
252 | elevation: 0,
253 | shape: RoundedRectangleBorder(
254 | borderRadius: BorderRadius.circular(14),
255 | )),
256 | ),
257 | ),
258 | ],
259 | ),
260 | ),
261 | ),
262 | ),
263 | )
264 | : Register();
265 | }
266 |
267 | showSignOutDialog(BuildContext context) {
268 | showDialog(
269 | context: context,
270 | builder: (context) {
271 | return AlertDialog(
272 | elevation: 24,
273 | backgroundColor: Theme.of(context).cardColor,
274 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
275 | title: Text("SignOut", style: Theme.of(context).textTheme.headline3),
276 | content: Text("Are you sure?", style: Theme.of(context).textTheme.subtitle1),
277 | actions: [
278 | ElevatedButton(
279 | style: ElevatedButton.styleFrom(primary: Theme.of(context).cardColor, elevation: 0),
280 | onPressed: () {
281 | Navigator.pop(context);
282 | },
283 | child: Text(
284 | "No",
285 | style: TextStyle(color: Colors.greenAccent, fontSize: 18),
286 | ),
287 | ),
288 | ElevatedButton(
289 | style: ElevatedButton.styleFrom(primary: Theme.of(context).cardColor, elevation: 0),
290 | onPressed: () async {
291 | dynamic isLoggedOut = await context.read().signOut();
292 | if (isLoggedOut.toString() == "Signed out") {
293 | setState(() {
294 | isVerified = false;
295 | });
296 | print("Signed Outt");
297 | SystemNavigator.pop();
298 | }
299 | },
300 | child: Text(
301 | "Yes",
302 | style: TextStyle(fontSize: 18, color: Colors.redAccent),
303 | ),
304 | ),
305 | ],
306 | );
307 | });
308 | }
309 |
310 | changeThemeShowDialog(BuildContext context) {
311 | showDialog(
312 | context: context,
313 | builder: (_) {
314 | return AlertDialog(
315 | title: Text(
316 | "Theme",
317 | style: Theme.of(context).textTheme.headline3,
318 | ),
319 | content: themeDialog(),
320 | );
321 | });
322 | }
323 |
324 | Widget themeDialog() {
325 | return Column(
326 | mainAxisSize: MainAxisSize.min,
327 | mainAxisAlignment: MainAxisAlignment.center,
328 | crossAxisAlignment: CrossAxisAlignment.center,
329 | children: [
330 | RadioListTile(
331 | title: Text('system'),
332 | value: ThemeMode.system,
333 | groupValue: _themeMode,
334 | onChanged: (value) {
335 | setState(() {
336 | _themeMode = value;
337 | ThemeController.to.setThemeMode(_themeMode);
338 | });
339 | },
340 | ),
341 | RadioListTile(
342 | title: Text('dark'),
343 | value: ThemeMode.dark,
344 | groupValue: _themeMode,
345 | onChanged: (value) {
346 | setState(() {
347 | _themeMode = value;
348 | ThemeController.to.setThemeMode(_themeMode);
349 | });
350 | },
351 | ),
352 | RadioListTile(
353 | title: Text('light'),
354 | value: ThemeMode.light,
355 | groupValue: _themeMode,
356 | onChanged: (value) {
357 | setState(() {
358 | _themeMode = value;
359 | ThemeController.to.setThemeMode(_themeMode);
360 | });
361 | },
362 | )
363 | ],
364 | );
365 | }
366 | }
367 |
--------------------------------------------------------------------------------
/lib/Pages/Create.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:cached_network_image/cached_network_image.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:flutter/cupertino.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:image_picker/image_picker.dart';
9 | import 'package:lefty/Authentication/Register.dart';
10 | import 'package:lefty/Database_Services/Database_Services.dart';
11 | import 'package:lefty/main.dart';
12 | import 'package:lefty/static/Circular_Loading.dart';
13 | import 'package:lefty/static/Horizontal_Loading.dart';
14 | import 'package:lefty/static/Loading.dart';
15 | import 'package:numberpicker/numberpicker.dart';
16 | import 'package:provider/provider.dart';
17 |
18 | import 'Register_Institute.dart';
19 |
20 | class Create extends StatefulWidget {
21 | @override
22 | _CreateState createState() => _CreateState();
23 | }
24 |
25 | class _CreateState extends State {
26 | FirebaseFirestore firestore = FirebaseFirestore.instance;
27 | String timer;
28 | FirebaseAuth _auth = FirebaseAuth.instance;
29 | Database_Services database_services = new Database_Services();
30 | Stream stream;
31 | @override
32 | void initState() {
33 | super.initState();
34 | if(isVerified){
35 | final User firebaseUser = _auth.currentUser;
36 | stream = firestore.collection("iDetails").where('uid', isEqualTo: firebaseUser.uid).snapshots();
37 | }else{
38 | //do nothing
39 | }
40 | }
41 | @override
42 | Widget build(BuildContext context) {
43 | final firebaseUser = context.watch();
44 | return !(isVerified)
45 | ? Scaffold(
46 | backgroundColor: Theme.of(context).backgroundColor,
47 | body: AlertDialog(
48 | elevation: 30,
49 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
50 | backgroundColor: Theme.of(context).cardColor,
51 | title: Text("Sign in",style: Theme.of(context).textTheme.headline3,),
52 | content: Text("Please Sign in to register an institute"),
53 | actions: [
54 | Container(
55 | margin: EdgeInsets.fromLTRB(10, 0, 10, 0),
56 | width: MediaQuery.of(context).size.width,
57 | child: ElevatedButton(
58 | style: ElevatedButton.styleFrom(
59 | elevation: 0,
60 | primary: Theme.of(context).buttonColor,
61 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14))),
62 | onPressed: () {
63 | Navigator.push(context, MaterialPageRoute(builder: (_) => Register()));
64 | },
65 | child: Text(
66 | "Ok",
67 | style: Theme.of(context).textTheme.headline4,
68 | )),
69 | )
70 | ],
71 | ),
72 | )
73 | : Scaffold(
74 | backgroundColor: Theme.of(context).backgroundColor,
75 | body: SafeArea(
76 | child: Padding(
77 | padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
78 | child: Column(
79 | mainAxisAlignment: MainAxisAlignment.start,
80 | crossAxisAlignment: CrossAxisAlignment.start,
81 | mainAxisSize: MainAxisSize.max,
82 | children: [
83 | Padding(
84 | padding: const EdgeInsets.fromLTRB(7,0,0,0),
85 | child: Text(
86 | "Create",
87 | style: Theme.of(context).textTheme.headline1,
88 | ),
89 | ),
90 | Padding(
91 | padding: const EdgeInsets.fromLTRB(11, 0, 0, 0),
92 | child: Text(
93 | 'Register an institute',
94 | style: Theme.of(context).textTheme.bodyText2,
95 | ),
96 | ),
97 | Padding(
98 | padding: const EdgeInsets.fromLTRB(10, 20, 10, 20),
99 | child: Container(
100 | width: MediaQuery.of(context).size.width,
101 | height: 50,
102 | child: ElevatedButton(
103 | onPressed: () {
104 | Navigator.push(context, MaterialPageRoute(builder: (_) => Register_Institute()));
105 | },
106 | style: ElevatedButton.styleFrom(
107 | elevation: 30,
108 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
109 | primary: Theme.of(context).buttonColor,
110 | ),
111 | // style: ButtonStyle(
112 | // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
113 | // elevation: MaterialStateProperty.all(20),
114 | // backgroundColor: MaterialStateProperty.all(Colors.black)
115 | // ),
116 | child: Text(
117 | "Register Institute",
118 | style: Theme.of(context).textTheme.headline4,
119 | )),
120 | ),
121 | ),
122 | StreamBuilder(
123 | stream: stream,
124 | builder: (BuildContext context, AsyncSnapshot snapshot) {
125 | if (!snapshot.hasData) {
126 | return Horizontal_Loading();
127 | } else {
128 | return (!(snapshot.data.docs.length == 0 || snapshot.data == null))?Expanded(
129 | child: ListView(
130 | shrinkWrap: true,
131 | children: snapshot.data.docs.map((DocumentSnapshot document) {
132 | return Card(
133 | color: Theme.of(context).cardColor,
134 | elevation: 0,
135 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14.0)),
136 | child: ListTile(
137 | onTap: () {},
138 | onLongPress: () {
139 | showDeleteDialog(document);
140 | },
141 | title: Padding(
142 | padding: const EdgeInsets.fromLTRB(0, 10, 0, 0),
143 | child: Column(
144 | crossAxisAlignment: CrossAxisAlignment.start,
145 | children: [
146 | Text(document.data()['iName'], style: Theme.of(context).textTheme.headline3),
147 | Text(document.data()['iType'], style: Theme.of(context).textTheme.headline5),
148 | Divider(
149 | height: 20,
150 | thickness: 0,
151 | color: Theme.of(context).dividerColor,
152 | ),
153 | Row(
154 | crossAxisAlignment: CrossAxisAlignment.start,
155 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
156 | children: [
157 | Flexible(
158 | flex: 1,
159 | child: Padding(
160 | padding: const EdgeInsets.fromLTRB(0,0,15,3),
161 | child: Column(
162 | mainAxisAlignment: MainAxisAlignment.start,
163 | crossAxisAlignment: CrossAxisAlignment.start,
164 | mainAxisSize: MainAxisSize.max,
165 | children: [
166 | Text(
167 | document.data()['iDesc'],
168 | style: Theme.of(context).textTheme.bodyText1,
169 | ),
170 | Text(
171 | document.data()['iAddress'],
172 | style: Theme.of(context).textTheme.bodyText1,
173 | ),
174 | Text(
175 | document.data()['iPhone1'],
176 | style: Theme.of(context).textTheme.bodyText1,
177 | ),
178 | Text(
179 | document.data()['iPhone2'],
180 | style: Theme.of(context).textTheme.bodyText1,
181 | ),
182 | ],
183 | ),
184 | ),
185 | ),
186 | Flexible(
187 | flex: 1,
188 | child: CachedNetworkImage(
189 | imageUrl: document.data()['iPhoto'],
190 | imageBuilder: (context, imageProvider) => Container(
191 | width: MediaQuery.of(context).size.width,
192 | height: MediaQuery.of(context).size.width * 0.35,
193 | decoration: BoxDecoration(
194 | shape: BoxShape.rectangle,
195 | borderRadius: BorderRadius.circular(10),
196 | image: DecorationImage(image: imageProvider, fit: BoxFit.cover),
197 | ),
198 | ),
199 | placeholder: ((context, s) => Center(
200 | child: CircularProgressIndicator(),
201 | )),
202 | fit: BoxFit.cover,
203 | ),
204 | ),
205 | ],
206 | ),
207 | Padding(
208 | padding: const EdgeInsets.fromLTRB(0, 10, 0, 0),
209 | child: Container(
210 | width: MediaQuery.of(context).size.width,
211 | child: document.data()['isRequested']
212 | ? ElevatedButton(
213 | onPressed: () async {
214 | await firestore
215 | .collection("iDetails")
216 | .doc(document.id)
217 | .update({'isRequested': false});
218 | //showRequestDialog(document, firebaseUser);
219 | },
220 | child: Text("Cancel Request",
221 | style: Theme.of(context).textTheme.headline4),
222 | style: ElevatedButton.styleFrom(
223 | primary: Colors.red[300],
224 | elevation: 0,
225 | shape: RoundedRectangleBorder(
226 | borderRadius: BorderRadius.circular(14),
227 | ),
228 | ),
229 | )
230 | : ElevatedButton(
231 | onPressed: () async {
232 | await firestore
233 | .collection("iDetails")
234 | .doc(document.id)
235 | .update({'isRequested': true});
236 | //showRequestDialog(document, firebaseUser);
237 | },
238 | child: Text(
239 | "Create Request",
240 | style: Theme.of(context).textTheme.headline4,
241 | ),
242 | style: ElevatedButton.styleFrom(
243 | primary: Theme.of(context).buttonColor,
244 | elevation: 0,
245 | shape: RoundedRectangleBorder(
246 | borderRadius: BorderRadius.circular(14),
247 | ),
248 | ),
249 | ),
250 | ),
251 | )
252 | ],
253 | ),
254 | ),
255 | ));
256 | }).toList(),
257 | ),
258 | ):Expanded(
259 | child: Container(
260 | margin: EdgeInsets.fromLTRB(5, 10, 5, 5),
261 | width: MediaQuery.of(context).size.width,
262 | height: MediaQuery.of(context).size.width * 0.5,
263 | child: Card(
264 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
265 | elevation: 0,
266 | color: Theme.of(context).cardColor,
267 | child: Center(
268 | child: Text(
269 | 'You have 0 institute\nCreate an Institute \nby clicking Register Institute',
270 | textAlign: TextAlign.center,
271 | style: Theme.of(context).textTheme.bodyText1,
272 | ),
273 | ),
274 | ),
275 | ),
276 | );
277 | }
278 | }),
279 | ],
280 | ),
281 | ),
282 | ),
283 | );
284 | }
285 | void showDeleteDialog(DocumentSnapshot doc) {
286 | showDialog(
287 | context: context,
288 | builder: (context) {
289 | return AlertDialog(
290 | elevation: 24,
291 | backgroundColor: Theme.of(context).cardColor,
292 | shape: RoundedRectangleBorder(
293 | borderRadius: BorderRadius.circular(20.0)),
294 | title: Text("Delete",style: Theme.of(context).textTheme.headline3),
295 | content: Text("Do you want to delete?",style: Theme.of(context).textTheme.subtitle1),
296 | actions: [
297 | ElevatedButton(
298 |
299 | style: ElevatedButton.styleFrom(
300 | primary: Theme.of(context).cardColor,
301 | elevation: 0
302 | ),
303 | onPressed: () {
304 | Navigator.pop(context);
305 | },
306 | child: Text(
307 | "No",
308 | style: TextStyle(color: Colors.greenAccent,fontSize: 18),
309 | ),
310 | ),
311 | ElevatedButton(
312 | style: ElevatedButton.styleFrom(
313 | primary: Theme.of(context).cardColor,
314 | elevation: 0
315 | ),
316 | onPressed: () {
317 | database_services.deleteDataFromFb(doc,context);
318 | Navigator.pop(context);
319 | },
320 | child: Text(
321 | "Yes",
322 | style: TextStyle(fontSize: 18 ,color: Colors.redAccent),
323 | ),
324 | ),
325 | ],
326 | );
327 | });
328 | }
329 |
330 | // void showRequestDialog(DocumentSnapshot document, User firebaseUser) {
331 | // showDialog(
332 | // context: context,
333 | // builder: (_) => new AlertDialog(
334 | // title: new Text("Choose Hours"),
335 | // actions: [
336 | // Column(
337 | // mainAxisAlignment: MainAxisAlignment.center,
338 | // crossAxisAlignment: CrossAxisAlignment.center,
339 | // mainAxisSize: MainAxisSize.max,
340 | // children: [
341 | // Container(
342 | // width: MediaQuery.of(context).size.width,
343 | // child: new NumberPicker.horizontal(
344 | // listViewHeight: 60,
345 | // step: 1,
346 | // selectedTextStyle: TextStyle(color: Colors.blue),
347 | // initialValue: iHour,
348 | // minValue: 1,
349 | // maxValue: 48,
350 | // onChanged: (value) {
351 | // setState(() {
352 | // iHour = value;
353 | // print(iHour);
354 | // });
355 | // }),
356 | // ),
357 | // Container(
358 | // width: MediaQuery.of(context).size.width,
359 | // child: ElevatedButton(
360 | // onPressed: () {
361 | // firestore.collection("iDetails").doc(document.id).update({'iHour': iHour});
362 | // setState(() {
363 | // isRequested = true;
364 | // });
365 | // Count_Down_Timer count = new Count_Down_Timer(iHour);
366 | // count.countDown();
367 | // Navigator.pop(context);
368 | // },
369 | // child: Text(
370 | // "Done",
371 | // style: TextStyle(color: Colors.white),
372 | // ),
373 | // style: ElevatedButton.styleFrom(
374 | // primary: Colors.black,
375 | // elevation: 10,
376 | // shape: RoundedRectangleBorder(
377 | // borderRadius: BorderRadius.circular(20),
378 | // ),
379 | // ),
380 | // ),
381 | // ),
382 | // ],
383 | // ),
384 | // ],
385 | // ));
386 | // // showDialog(
387 | // // useSafeArea: true,
388 | // // barrierColor: Colors.white,
389 | // // context: context,
390 | // // builder: (_) => AlertDialog(
391 | // //
392 | // // content: Column(
393 | // // mainAxisAlignment: MainAxisAlignment.center,
394 | // // crossAxisAlignment: CrossAxisAlignment.center,
395 | // // mainAxisSize: MainAxisSize.min,
396 | // // children: [
397 | // //
398 | // // NumberPicker.horizontal(
399 | // // listViewHeight: 50,
400 | // // step: 1,
401 | // // initialValue: iHour,
402 | // // minValue: 1,
403 | // // maxValue: 48,
404 | // // onChanged: (value) {
405 | // // setState(() {
406 | // // iHour = value;
407 | // // print(iHour);
408 | // // });
409 | // // }),
410 | // // ElevatedButton(
411 | // // onPressed: () {
412 | // // showRequestDialog(document);
413 | // // },
414 | // // child: Text(
415 | // // "Done",
416 | // // style: TextStyle(color: Colors.white),
417 | // // ),
418 | // // style: ElevatedButton.styleFrom(
419 | // // primary: Colors.black,
420 | // // elevation: 10,
421 | // // shape: RoundedRectangleBorder(
422 | // // borderRadius: BorderRadius.circular(20),
423 | // // ),
424 | // // ),
425 | // // ),
426 | // //
427 | // // ],
428 | // // ),
429 | // // ),);
430 | // }
431 | // Future getImage() async {
432 | // var image = await ImagePicker.pickImage(source: ImageSource.gallery);
433 | // setState(() {
434 | // _image = image;
435 | // print("_image: $_image");
436 | // });
437 | // }
438 | }
439 |
--------------------------------------------------------------------------------
/lib/Pages/Details.dart:
--------------------------------------------------------------------------------
1 | import 'package:cached_network_image/cached_network_image.dart';
2 | import 'package:cloud_firestore/cloud_firestore.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:google_maps_flutter/google_maps_flutter.dart';
6 | import 'package:url_launcher/url_launcher.dart';
7 |
8 | class Details extends StatefulWidget {
9 | DocumentSnapshot document;
10 |
11 | Details(DocumentSnapshot document) {
12 | this.document = document;
13 | }
14 |
15 | @override
16 | _DetailsState createState() => _DetailsState();
17 | }
18 |
19 | class _DetailsState extends State {
20 | List myMarker = [];
21 |
22 | @override
23 | void initState() {
24 | super.initState();
25 |
26 | myMarker.add(Marker(
27 | markerId: MarkerId(LatLng(widget.document['lat'], widget.document['long']).toString()),
28 | position: LatLng(widget.document['lat'], widget.document['long'])));
29 | }
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | return Scaffold(
34 | backgroundColor: Theme.of(context).backgroundColor,
35 | body: SafeArea(
36 | child: SingleChildScrollView(
37 | child: Padding(
38 | padding: const EdgeInsets.fromLTRB(8, 20, 8, 20),
39 | child: Column(
40 | mainAxisSize: MainAxisSize.max,
41 | crossAxisAlignment: CrossAxisAlignment.start,
42 | mainAxisAlignment: MainAxisAlignment.start,
43 | children: [
44 | Padding(
45 | padding: const EdgeInsets.fromLTRB(3, 0, 3, 0),
46 | child: Text(
47 | widget.document.data()['iName'],
48 | style: Theme.of(context).textTheme.headline2,
49 | ),
50 | ),
51 | Padding(
52 | padding: const EdgeInsets.fromLTRB(4, 0, 4, 0),
53 | child: Text(
54 | widget.document.data()['iType'],
55 | style: Theme.of(context).textTheme.subtitle1,
56 | ),
57 | ),
58 | SizedBox(
59 | height: 10,
60 | ),
61 | CachedNetworkImage(
62 | imageUrl: widget.document.data()['iPhoto'],
63 | imageBuilder: (context, imageProvider) => Container(
64 | margin: EdgeInsets.fromLTRB(5, 0, 5, 0),
65 | width: MediaQuery.of(context).size.width,
66 | height: MediaQuery.of(context).size.width * 0.75,
67 | decoration: BoxDecoration(
68 | shape: BoxShape.rectangle,
69 | borderRadius: BorderRadius.circular(14),
70 | image: DecorationImage(image: imageProvider, fit: BoxFit.cover),
71 | ),
72 | ),
73 | placeholder: ((context, s) => Center(
74 | child: CircularProgressIndicator(),
75 | )),
76 | fit: BoxFit.cover,
77 | ),
78 | SizedBox(
79 | height: 5,
80 | ),
81 | // Container(
82 | // width: MediaQuery.of(context).size.width,
83 | // child: Card(
84 | // child: Padding(
85 | // padding: const EdgeInsets.fromLTRB(15, 10, 10, 10),
86 | // child: RichText(
87 | // text: new TextSpan(
88 | // // Note: Styles for TextSpans must be explicitly defined.
89 | // // Child text spans will inherit styles from parent
90 | // style: new TextStyle(
91 | // fontSize: 14.0,
92 | // color: Colors.black,
93 | // ),
94 | // children: [
95 | // new TextSpan(text: 'Description', style: new TextStyle(fontWeight: FontWeight.bold,color: Colors.black,fontSize: 12)),
96 | // new TextSpan(text: '\n'+widget.document.data()['iDesc'], style: new TextStyle(fontSize: 14)),
97 | // ],
98 | // ),
99 | // )
100 | // ),
101 | // elevation: 8,
102 | // color: Colors.white,
103 | // shape: RoundedRectangleBorder(
104 | // borderRadius: BorderRadius.circular(10),
105 | // )),
106 | // ),
107 | Card(
108 | elevation: 0,
109 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
110 | child: ListTile(
111 | title: Text('Description', style: Theme.of(context).textTheme.bodyText2),
112 | subtitle: Text(widget.document.data()['iDesc'], style: Theme.of(context).textTheme.bodyText1),
113 | ),
114 | ),
115 | Card(
116 | elevation: 0,
117 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
118 | child: ListTile(
119 | title: Text(
120 | '\nAddress',
121 | style: Theme.of(context).textTheme.bodyText2,
122 | ),
123 | subtitle: Text(widget.document.data()['iAddress'] + '\n', style: Theme.of(context).textTheme.bodyText1),
124 | ),
125 | ),
126 | Container(
127 | margin: EdgeInsets.fromLTRB(5, 10, 5, 10),
128 | width: MediaQuery.of(context).size.width,
129 | height: MediaQuery.of(context).size.width,
130 | child: ClipRRect(
131 | borderRadius: BorderRadius.circular(20),
132 | child: GoogleMap(
133 | initialCameraPosition: CameraPosition(
134 | target: LatLng(widget.document['lat'], widget.document['long']),
135 | zoom: 11,
136 | ),
137 | markers: Set.from(myMarker),
138 | ),
139 | ),
140 | ),
141 | Card(
142 | elevation: 0,
143 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
144 | child: ListTile(
145 | trailing: IconButton(
146 | splashColor: Theme.of(context).splashColor,
147 | icon: Icon(Icons.phone),
148 | onPressed: () {
149 | _launchURL('tel:${widget.document.data()['iPhone1']}');
150 | }),
151 | title: Text('Primary Contact', style: Theme.of(context).textTheme.bodyText2),
152 | subtitle: Text(widget.document.data()['iPhone1'], style: Theme.of(context).textTheme.bodyText1),
153 | ),
154 | ),
155 | Card(
156 | elevation: 0,
157 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
158 | child: ListTile(
159 | trailing: IconButton(
160 | splashColor: Theme.of(context).splashColor,
161 | icon: Icon(Icons.phone),
162 | onPressed: () {
163 | _launchURL('tel:${widget.document.data()['iPhone2']}');
164 | }),
165 | title: Text('Secondary Contact', style: Theme.of(context).textTheme.bodyText2),
166 | subtitle: Text(widget.document.data()['iPhone2'], style: Theme.of(context).textTheme.bodyText1),
167 | ),
168 | ),
169 | ],
170 | ),
171 | ),
172 | ),
173 | ),
174 | );
175 | }
176 |
177 | _launchURL(String url) async {
178 | if (await canLaunch(url)) {
179 | await launch(url);
180 | } else {
181 | throw 'Could not launch $url';
182 | }
183 | }
184 | }
185 |
--------------------------------------------------------------------------------
/lib/Pages/Location.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:bot_toast/bot_toast.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:geolocator/geolocator.dart';
8 | import 'package:google_maps_flutter/google_maps_flutter.dart';
9 | import 'package:lefty/Pages/Details.dart';
10 | import 'package:lefty/static/Circular_Loading.dart';
11 |
12 | class Location extends StatefulWidget {
13 | @override
14 | _LocationState createState() => _LocationState();
15 | }
16 |
17 | class _LocationState extends State {
18 | bool showDetailsButton = false;
19 | GoogleMapController mapController;
20 | List myMarker = [];
21 | DocumentSnapshot documentSnapshot;
22 |
23 | void _onMapCreated(GoogleMapController controller) {
24 | setState(() {
25 | mapController = controller;
26 | });
27 | }
28 |
29 | //
30 | LatLng currentPostion;
31 |
32 | void _getUserLocation() async {
33 | var position = await GeolocatorPlatform.instance.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
34 | if (position != null) {
35 | setState(() {
36 | currentPostion = LatLng(position.latitude, position.longitude);
37 | });
38 | } else {
39 | setState(() {
40 | currentPostion = LatLng(56.53455, 65.4533434);
41 | });
42 | }
43 | }
44 |
45 | void _getAllLatLongFromFb() async {
46 | await FirebaseFirestore.instance
47 | .collection("iDetails")
48 | .where('isRequested', isEqualTo: true)
49 | .get()
50 | .then((QuerySnapshot querySnapshot) => querySnapshot.docs.forEach((doc) {
51 | myMarker.add(Marker(
52 | markerId: MarkerId(LatLng(doc['lat'], doc['long']).toString()),
53 | onTap: () {
54 | setState(() {
55 | showDetailsButton = true;
56 | documentSnapshot = doc;
57 | });
58 | },
59 | position: LatLng(doc['lat'], doc['long']),
60 | infoWindow: InfoWindow(title: doc['iName'], snippet: doc['iAddress'])));
61 | }));
62 | }
63 |
64 | @override
65 | void initState() {
66 | super.initState();
67 | _getUserLocationPermission();
68 | _getUserLocation();
69 | _getAllLatLongFromFb();
70 | }
71 |
72 | //
73 | Set marker;
74 | LatLng latLngs;
75 |
76 | @override
77 | Widget build(BuildContext context) {
78 | return Scaffold(
79 | backgroundColor: Theme.of(context).backgroundColor,
80 | body: currentPostion != null
81 | ? SafeArea(
82 | child: Stack(
83 | children: [
84 | GoogleMap(
85 | mapToolbarEnabled: true,
86 | buildingsEnabled: true,
87 | mapType: MapType.hybrid,
88 | myLocationButtonEnabled: true,
89 | myLocationEnabled: true,
90 | markers: Set.from(myMarker),
91 | onMapCreated: _onMapCreated,
92 | initialCameraPosition: CameraPosition(
93 | target: currentPostion,
94 | zoom: 10,
95 | ),
96 | ),
97 | (showDetailsButton)
98 | ? Positioned(
99 | bottom: 18,
100 | left: 0,
101 | child: Container(
102 | height: 38,
103 | width: MediaQuery.of(context).size.width * 0.6,
104 | child: Padding(
105 | padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
106 | child: ElevatedButton(
107 | onPressed: () async {
108 | if (documentSnapshot != null) {
109 | Navigator.push(context, MaterialPageRoute(builder: (_) => Details(documentSnapshot)));
110 | }
111 | },
112 | child: Text(
113 | "Show Details",
114 | style: TextStyle(color: Colors.black),
115 | ),
116 | style: ElevatedButton.styleFrom(
117 | primary: Colors.white70,
118 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8))),
119 | ),
120 | ),
121 | ))
122 | : Container(),
123 | ],
124 | ),
125 | )
126 | : Circular_Loading(),
127 | );
128 | }
129 |
130 | //functions
131 | //functions
132 | //functions
133 |
134 | Future _getUserLocationPermission() async {
135 | bool serviceEnabled;
136 | LocationPermission permission;
137 |
138 | serviceEnabled = await Geolocator.isLocationServiceEnabled();
139 | if (!serviceEnabled) {
140 | BotToast.showText(text: 'Location services are disabled');
141 | return Future.error('Location services are disabled.');
142 | }
143 |
144 | permission = await Geolocator.checkPermission();
145 | if (permission == LocationPermission.deniedForever) {
146 | BotToast.showText(text: 'Location permissions are permantly denied, we cannot request permissions');
147 | return Future.error('Location permissions are permantly denied, we cannot request permissions.');
148 | }
149 |
150 | if (permission == LocationPermission.denied) {
151 | permission = await Geolocator.requestPermission();
152 | if (permission != LocationPermission.whileInUse && permission != LocationPermission.always) {
153 | BotToast.showText(text: 'Location permissions are denied (actual value: $permission)');
154 | return Future.error('Location permissions are denied (actual value: $permission).');
155 | }
156 | }
157 | }
158 | }
159 |
--------------------------------------------------------------------------------
/lib/Pages/Register_Institute.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:bot_toast/bot_toast.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:firebase_core/firebase_core.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:google_maps_flutter/google_maps_flutter.dart';
8 | import 'package:image_picker/image_picker.dart';
9 | import 'package:lefty/Database_Services/Database_Services.dart';
10 | import 'package:lefty/MyBottomNavigationBar.dart';
11 | import 'package:lefty/Pages/Create.dart';
12 | import 'package:lefty/Pages/Select_Location.dart';
13 | import 'package:lefty/Theme/ThemeController.dart';
14 | import 'package:lefty/main.dart';
15 | import 'package:numberpicker/numberpicker.dart';
16 |
17 | class Register_Institute extends StatefulWidget {
18 | @override
19 | _Register_InstituteState createState() => _Register_InstituteState();
20 | }
21 |
22 | class _Register_InstituteState extends State {
23 | final _formKey = GlobalKey();
24 | String iName, iPhone1, iPhone2, iAddress, iType, iDesc;
25 | final iNameController = TextEditingController();
26 | final iPhone1Controller = TextEditingController();
27 | final iPhone2Controller = TextEditingController();
28 | final iAddressController = TextEditingController();
29 | final iDescController = TextEditingController();
30 | int selectedValue;
31 | int iHour = 1;
32 | File iPhoto;
33 | double lat;
34 | double long;
35 | bool isLocationSelected = false;
36 | final picker = ImagePicker();
37 | Database_Services database_services = new Database_Services();
38 |
39 | Future getImage() async {
40 | final pickedFile = await picker.getImage(source: ImageSource.gallery);
41 | setState(() {
42 | if (pickedFile != null) {
43 | iPhoto = File(pickedFile.path);
44 | } else {
45 | print('No image selected.');
46 | }
47 | });
48 | }
49 |
50 | double lati, longi;
51 |
52 | @override
53 | Widget build(BuildContext context) {
54 | return Scaffold(
55 | backgroundColor: Theme.of(context).backgroundColor,
56 | body: SafeArea(
57 | child: SingleChildScrollView(
58 | child: Form(
59 | key: _formKey,
60 | child: Padding(
61 | padding: const EdgeInsets.fromLTRB(20, 10, 20, 10),
62 | child: Column(
63 | mainAxisAlignment: MainAxisAlignment.start,
64 | crossAxisAlignment: CrossAxisAlignment.start,
65 | mainAxisSize: MainAxisSize.max,
66 | children: [
67 | Text(
68 | "Register Institute",
69 | style: Theme.of(context).textTheme.headline2
70 | ),
71 | Divider(
72 | color: Theme.of(context).dividerColor,
73 | height: 30,
74 | ),
75 | Padding(
76 | padding: const EdgeInsets.fromLTRB(15, 10, 0, 0),
77 | child: Text(
78 | "Institution Name",
79 | style: Theme.of(context).textTheme.bodyText2,
80 | ),
81 | ),
82 | TextFormField(
83 | onChanged: (value) {
84 | iName = value;
85 | },
86 | validator: (value) {
87 | if (value.isEmpty) {
88 | return 'Please enter some text';
89 | }
90 | return null;
91 | },
92 | controller: iNameController,
93 | decoration: InputDecoration(
94 | fillColor: Colors.white,
95 | hintText: "Institution Name",
96 | focusedBorder: OutlineInputBorder(
97 | borderRadius: BorderRadius.circular(14),
98 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
99 | ),
100 | enabledBorder: OutlineInputBorder(
101 | borderRadius: BorderRadius.circular(14),
102 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
103 | ),
104 | border: OutlineInputBorder(
105 | borderRadius: BorderRadius.circular(14),
106 | borderSide: BorderSide(),
107 | ),
108 | ),
109 | ),
110 | Padding(
111 | padding: const EdgeInsets.fromLTRB(15, 10, 0, 0),
112 | child: Text(
113 | "Institution Address",
114 | style: Theme.of(context).textTheme.bodyText2,
115 | ),
116 | ),
117 | TextFormField(
118 | onChanged: (value) {
119 | iAddress = value;
120 | },
121 | validator: (value) {
122 | if (value.isEmpty) {
123 | return 'Please enter some text';
124 | }
125 | return null;
126 | },
127 | minLines: 6,
128 | maxLines: 6,
129 | controller: iAddressController,
130 | decoration: InputDecoration(
131 | alignLabelWithHint: true,
132 | hintText: "Institution Address",
133 | fillColor: Colors.white,
134 | focusedBorder: OutlineInputBorder(
135 | borderRadius: BorderRadius.circular(14),
136 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
137 | ),
138 | enabledBorder: OutlineInputBorder(
139 | borderRadius: BorderRadius.circular(14),
140 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
141 | ),
142 | border: OutlineInputBorder(
143 | borderRadius: BorderRadius.circular(14),
144 | borderSide: BorderSide(),
145 | ),
146 | ),
147 | ),
148 | Padding(
149 | padding: const EdgeInsets.fromLTRB(15, 10, 0, 0),
150 | child: Text(
151 | "Institution Type",
152 | style: Theme.of(context).textTheme.bodyText2,
153 | ),
154 | ),
155 | Container(
156 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(14), border: Border.all(width: 1,color: Theme.of(context).unselectedWidgetColor),),
157 | width: MediaQuery.of(context).size.width,
158 | child: Padding(
159 | padding: const EdgeInsets.fromLTRB(10, 0, 10, 0),
160 | child: DropdownButton(
161 | hint: Text("Institution Type"),
162 | underline: SizedBox(),
163 | isExpanded: true,
164 | value: selectedValue,
165 | items: [
166 | DropdownMenuItem(
167 | child: Text("Orphanage"),
168 | value: 1,
169 | ),
170 | DropdownMenuItem(
171 | child: Text("Old Age Home"),
172 | value: 2,
173 | ),
174 | DropdownMenuItem(
175 | child: Text("Mental Institution"),
176 | value: 3,
177 | ),
178 | DropdownMenuItem(
179 | child: Text("Others"),
180 | value: 4,
181 | ),
182 | ],
183 | onChanged: (value) {
184 | setState(() {
185 | selectedValue = value;
186 | });
187 | }),
188 | ),
189 | ),
190 | // Divider(
191 | // color: Colors.black,
192 | // height: 30,
193 | // ),
194 | // Padding(
195 | // padding: const EdgeInsets.fromLTRB(15, 0, 0, 0),
196 | // child: Text(
197 | // "Select Hours",
198 | // style: Theme.of(context).textTheme.bodyText2,
199 | // ),
200 | // ),
201 | // Container(
202 | // decoration: BoxDecoration(border: Border.all(width: 1), borderRadius: BorderRadius.circular(14)),
203 | // width: MediaQuery.of(context).size.width,
204 | // child: NumberPicker.horizontal(
205 | // listViewHeight: 50,
206 | // step: 1,
207 | // initialValue: iHour,
208 | // minValue: 1,
209 | // maxValue: 48,
210 | // onChanged: (value) {
211 | // setState(() {
212 | // iHour = value;
213 | // print(iHour);
214 | // });
215 | // }),
216 | // ),
217 | // Container(
218 | // width: MediaQuery.of(context).size.width,
219 | // margin: const EdgeInsets.fromLTRB(0, 10, 0, 10),
220 | // padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
221 | // decoration: BoxDecoration(borderRadius: BorderRadius.circular(15), border: Border.all(color: Colors.grey)),
222 | // child: RichText(
223 | // text: TextSpan(
224 | // children: [
225 | // WidgetSpan(
226 | // child: Icon(Icons.info_outline_rounded, size: 18),
227 | // ),
228 | // TextSpan(
229 | // text: " Select the hours to show the request.",
230 | // style: TextStyle(
231 | // color: Colors.grey,
232 | // fontSize: 12,
233 | // ),
234 | // ),
235 | // ],
236 | // ),
237 | // )),
238 | Divider(
239 | color: Theme.of(context).dividerColor,
240 | height: 30,
241 | ),
242 | Padding(
243 | padding: const EdgeInsets.fromLTRB(15, 0, 0, 0),
244 | child: Text(
245 | "Enter Description",
246 | style: Theme.of(context).textTheme.bodyText2,
247 | ),
248 | ),
249 | TextFormField(
250 | onChanged: (value) {
251 | iDesc = value;
252 | },
253 | validator: (value) {
254 | if (value.isEmpty) {
255 | return 'Please enter some text';
256 | }
257 | return null;
258 | },
259 | minLines: 5,
260 | maxLines: 5,
261 | controller: iDescController,
262 | decoration: InputDecoration(
263 | alignLabelWithHint: true,
264 | hintText: "Description",
265 | fillColor: Colors.white,
266 | focusedBorder: OutlineInputBorder(
267 | borderRadius: BorderRadius.circular(14),
268 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
269 | ),
270 | enabledBorder: OutlineInputBorder(
271 | borderRadius: BorderRadius.circular(14),
272 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
273 | ),
274 | border: OutlineInputBorder(
275 | borderRadius: BorderRadius.circular(14),
276 | borderSide: BorderSide(),
277 | ),
278 | ),
279 | ),
280 | Padding(
281 | padding: const EdgeInsets.fromLTRB(15, 10, 0, 0),
282 | child: Text(
283 | "Select image of the institute (optional)",
284 | style: Theme.of(context).textTheme.bodyText2,
285 | ),
286 | ),
287 | InkWell(
288 | onTap: () => getImage(),
289 | child: Container(
290 | margin: EdgeInsets.fromLTRB(0, 0, 0, 10),
291 | decoration: BoxDecoration(
292 | border: Border.all(width: 1,color: Theme.of(context).unselectedWidgetColor),
293 | borderRadius: BorderRadius.circular(14),
294 | ),
295 | padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
296 | width: MediaQuery.of(context).size.width,
297 | height: MediaQuery.of(context).size.width,
298 | child: Center(
299 | child: iPhoto == null
300 | ? Icon(
301 | Icons.add_photo_alternate_outlined,
302 | size: 80,
303 | )
304 | : Image.file(iPhoto)),
305 | ),
306 | ),
307 | Divider(
308 | height: 10,
309 | color: Theme.of(context).dividerColor,
310 | thickness: 0,
311 | ),
312 | Padding(
313 | padding: const EdgeInsets.fromLTRB(15, 10, 0, 0),
314 | child: Text(
315 | "Select Institute Location",
316 | style: Theme.of(context).textTheme.bodyText2,
317 | ),
318 | ),
319 | isLocationSelected
320 | ? Container(
321 | width: MediaQuery.of(context).size.width,
322 | height: 50,
323 | margin: EdgeInsets.fromLTRB(0, 0, 0, 10),
324 | child: ElevatedButton(
325 | onPressed: () {
326 | Navigator.push(context, MaterialPageRoute(builder: (_) => Select_Location()));
327 | },
328 | child: Text("Location Selected"),
329 | style: ElevatedButton.styleFrom(
330 | primary: Colors.green[300],
331 | elevation: 0,
332 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)))),
333 | )
334 | : Container(
335 | width: MediaQuery.of(context).size.width,
336 | height: 50,
337 | margin: EdgeInsets.fromLTRB(0, 0, 0, 10),
338 | child: ElevatedButton(
339 | onPressed: () async{
340 | var result = await Navigator.push(context, MaterialPageRoute(builder: (_) => Select_Location()));
341 | if(result!=null){
342 | print('result is:');
343 | print(result);
344 | LatLng df;
345 | df = result;
346 | lat = df.latitude;
347 | long = df.longitude;
348 | setState(() {
349 | isLocationSelected = true;
350 | });
351 | }
352 | },
353 | child: Text("Select Location"),
354 | style: ElevatedButton.styleFrom(
355 | primary: Theme.of(context).buttonColor,
356 | elevation: 0,
357 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)))),
358 | ),
359 | Divider(
360 | height: 10,
361 | color: Theme.of(context).dividerColor,
362 | thickness: 0,
363 | ),
364 | Padding(
365 | padding: const EdgeInsets.fromLTRB(15, 10, 0, 0),
366 | child: Text(
367 | "Primary Contact Number",
368 | style: Theme.of(context).textTheme.bodyText2,
369 | ),
370 | ),
371 | TextFormField(
372 | onChanged: (value) {
373 | iPhone1 = value;
374 | },
375 | validator: (value) {
376 | if (value.isEmpty) {
377 | return 'Please enter some text';
378 | }
379 | return null;
380 | },
381 | keyboardType: TextInputType.number,
382 | controller: iPhone1Controller,
383 | decoration: InputDecoration(
384 | fillColor: Colors.white,
385 | focusedBorder: OutlineInputBorder(
386 | borderRadius: BorderRadius.circular(14),
387 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
388 | ),
389 | enabledBorder: OutlineInputBorder(
390 | borderRadius: BorderRadius.circular(14),
391 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
392 | ),
393 | border: OutlineInputBorder(
394 | borderRadius: BorderRadius.circular(14),
395 | borderSide: BorderSide(),
396 | ),
397 | ),
398 | ),
399 | Padding(
400 | padding: const EdgeInsets.fromLTRB(15, 10, 0, 0),
401 | child: Text(
402 | "Secondary Contact Number",
403 | style: Theme.of(context).textTheme.bodyText2,
404 | ),
405 | ),
406 | TextFormField(
407 | onChanged: (value) {
408 | iPhone2 = value;
409 | },
410 | validator: (value) {
411 | if (value.isEmpty) {
412 | return 'Please enter some text';
413 | }
414 | return null;
415 | },
416 | keyboardType: TextInputType.number,
417 | controller: iPhone2Controller,
418 | decoration: InputDecoration(
419 | fillColor: Colors.white,
420 | focusedBorder: OutlineInputBorder(
421 | borderRadius: BorderRadius.circular(14),
422 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
423 | ),
424 | enabledBorder: OutlineInputBorder(
425 | borderRadius: BorderRadius.circular(14),
426 | borderSide: BorderSide(width: 1, color: Theme.of(context).unselectedWidgetColor),
427 | ),
428 | border: OutlineInputBorder(
429 | borderRadius: BorderRadius.circular(14),
430 | borderSide: BorderSide(),
431 | ),
432 | ),
433 | ),
434 | Padding(
435 | padding: const EdgeInsets.fromLTRB(0, 14, 0, 30),
436 | child: Container(
437 | width: MediaQuery.of(context).size.width,
438 | height: 50,
439 | child: ElevatedButton(
440 | onPressed: () {
441 | if (_formKey.currentState.validate()) {
442 | switch (selectedValue) {
443 | case 1:
444 | iType = "Orphanage";
445 | break;
446 |
447 | case 2:
448 | iType = "Old Age Home";
449 | break;
450 |
451 | case 3:
452 | iType = "Mental Institution";
453 | break;
454 |
455 | case 4:
456 | iType = "Others";
457 | break;
458 | default:
459 | iType = 'Others';
460 | break;
461 | }
462 | if(lat==null&&long==null){
463 | BotToast.showText(text: "Please select institute location");
464 | }
465 | else{
466 | ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('Processing Data',style: Theme.of(context).textTheme.headline4,)));
467 | database_services.addCreateToFb(
468 | iName, iAddress, iType, iPhoto, iPhone1, iPhone2, iDesc, false, lat, long);
469 | Navigator.push(context, MaterialPageRoute(builder: (_)=>MyBottomNavigationBar()));
470 | }
471 | }
472 | },
473 | child: Text("Done",style: Theme.of(context).textTheme.headline4,),
474 | style: ElevatedButton.styleFrom(
475 | elevation: 0,
476 | primary: Theme.of(context).buttonColor,
477 | shape: RoundedRectangleBorder(
478 | borderRadius: BorderRadius.circular(14),
479 | )
480 | )
481 | ),
482 | ),
483 | )
484 | ],
485 | ),
486 | ),
487 | ),
488 | ),
489 | ),
490 | );
491 | }
492 |
493 |
494 | }
495 |
--------------------------------------------------------------------------------
/lib/Pages/Select_Location.dart:
--------------------------------------------------------------------------------
1 | import 'package:bot_toast/bot_toast.dart';
2 | import 'package:cloud_firestore/cloud_firestore.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:geolocator/geolocator.dart';
5 | import 'package:google_maps_flutter/google_maps_flutter.dart';
6 | import 'package:lefty/main.dart';
7 | import 'package:lefty/static/Circular_Loading.dart';
8 |
9 | class Select_Location extends StatefulWidget {
10 | @override
11 | _Select_LocationState createState() => _Select_LocationState();
12 | }
13 |
14 | class _Select_LocationState extends State {
15 | GoogleMapController mapController;
16 |
17 | void _onMapCreated(GoogleMapController controller) {
18 | setState(() {
19 | mapController = controller;
20 | });
21 |
22 | }
23 |
24 | //
25 |
26 | LatLng currentPostion;
27 |
28 | void _getUserLocation() async {
29 | var position = await GeolocatorPlatform.instance.getCurrentPosition(desiredAccuracy: LocationAccuracy.high);
30 |
31 | setState(() {
32 | currentPostion = LatLng(position.latitude, position.longitude);
33 | });
34 | }
35 |
36 | @override
37 | void initState() {
38 | _getUserLocationPermission();
39 | _getUserLocation();
40 |
41 | super.initState();
42 | }
43 |
44 | //
45 | List myMarker = [];
46 | LatLng latLngs;
47 | @override
48 | Widget build(BuildContext context) {
49 | return
50 | Scaffold(
51 | body: currentPostion != null ? SafeArea(
52 | child: Stack(
53 | children: [
54 |
55 | GoogleMap(
56 | mapToolbarEnabled: false,
57 | buildingsEnabled: true,
58 | mapType: MapType.hybrid,
59 | zoomControlsEnabled: false,
60 | myLocationButtonEnabled: true,
61 | myLocationEnabled: true,
62 | onTap: _handleTap,
63 | markers: Set.from(myMarker),
64 | onMapCreated: _onMapCreated,
65 | initialCameraPosition: CameraPosition(
66 | target: currentPostion,
67 | zoom: 10,
68 | ),
69 | ),
70 | Positioned(
71 | bottom: 10,
72 | child:
73 | Container(
74 |
75 | height: 60,
76 | width: MediaQuery.of(context).size.width,
77 | child: Padding(
78 | padding: const EdgeInsets.fromLTRB(20,0,20,0),
79 | child: ElevatedButton(
80 | onPressed: () async{
81 | if(latLngs!=null)
82 | {
83 | Navigator.pop(context,latLngs);
84 | }
85 | else{
86 | BotToast.showText(text: "Tap on screen to select institute location");
87 | }
88 | },
89 | child: Text("Done",style: TextStyle(color: Colors.white),),
90 | style: ElevatedButton.styleFrom(primary: Colors.blue,shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20))),
91 | ),
92 | ),
93 | )
94 | )
95 |
96 | ],
97 | ),
98 | ):Circular_Loading(),
99 | );
100 | }
101 |
102 | //functions
103 | //functions
104 | //functions
105 |
106 | Future _getUserLocationPermission() async {
107 | bool serviceEnabled;
108 | LocationPermission permission;
109 |
110 | serviceEnabled = await Geolocator.isLocationServiceEnabled();
111 | if (!serviceEnabled) {
112 | BotToast.showText(text: 'Location services are disabled');
113 | return Future.error('Location services are disabled.');
114 | }
115 |
116 | permission = await Geolocator.checkPermission();
117 | if (permission == LocationPermission.deniedForever) {
118 | BotToast.showText(text: 'Location permissions are permantly denied, we cannot request permissions');
119 | return Future.error('Location permissions are permantly denied, we cannot request permissions.');
120 | }
121 |
122 | if (permission == LocationPermission.denied) {
123 | permission = await Geolocator.requestPermission();
124 | if (permission != LocationPermission.whileInUse && permission != LocationPermission.always) {
125 | BotToast.showText(text: 'Location permissions are denied (actual value: $permission)');
126 | return Future.error('Location permissions are denied (actual value: $permission).');
127 | }
128 | }
129 | }
130 | _handleTap(LatLng tappedPoint){
131 | print(tappedPoint);
132 | setState(() {
133 | myMarker = [];
134 | myMarker.add(Marker(markerId: MarkerId(tappedPoint.toString()),position: tappedPoint));
135 | latLngs = tappedPoint;
136 | });
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/lib/SplashScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:lefty/MyBottomNavigationBar.dart';
3 | import 'package:shimmer/shimmer.dart';
4 |
5 | class SplashScreen extends StatelessWidget {
6 | @override
7 | Widget build(BuildContext context) {
8 | Future.delayed(Duration(milliseconds: 4000), () {
9 | Navigator.pushReplacementNamed(context, '/Home');
10 | });
11 |
12 | return Scaffold(
13 | backgroundColor: Theme.of(context).backgroundColor,
14 | body: Shimmer.fromColors(
15 | baseColor: Theme.of(context).hintColor,
16 | highlightColor: Colors.white,
17 | period: Duration(milliseconds: 1000),
18 | child: Container(
19 | padding: EdgeInsets.all(16),
20 | child: Center(
21 | child: Text(
22 | "Lefty.",
23 | style: Theme.of(context).textTheme.bodyText2.apply(fontSizeFactor: 10,fontFamily: 'Lobster'),
24 | ),
25 | ),
26 | ),
27 | ),
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/Theme/ThemeController.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:get/get.dart';
4 | import 'package:shared_preferences/shared_preferences.dart';
5 |
6 | class ThemeController extends GetxController {
7 | static ThemeController get to => Get.find();
8 |
9 | SharedPreferences prefs;
10 | ThemeMode _themeMode;
11 | ThemeMode get themeMode => _themeMode;
12 |
13 | Future setThemeMode(ThemeMode themeMode) async {
14 | Get.changeThemeMode(themeMode);
15 | _themeMode = themeMode;
16 | update();
17 | prefs = await SharedPreferences.getInstance();
18 | await prefs.setString('theme', themeMode.toString().split('.')[1]);
19 | }
20 |
21 | getThemeModeFromPreferences() async {
22 | ThemeMode themeMode;
23 | prefs = await SharedPreferences.getInstance();
24 | String themeText = prefs.getString('theme') ?? 'system';
25 | try {
26 | themeMode =
27 | ThemeMode.values.firstWhere((e) => describeEnum(e) == themeText);
28 | } catch (e) {
29 | themeMode = ThemeMode.system;
30 | }
31 | setThemeMode(themeMode);
32 | }
33 | }
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:bot_toast/bot_toast.dart';
2 | import 'package:firebase_auth/firebase_auth.dart';
3 | import 'package:firebase_core/firebase_core.dart';
4 | import 'package:flutter/cupertino.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:get/get.dart';
7 | import 'package:get/get_navigation/src/root/get_material_app.dart';
8 | import 'package:lefty/Authentication/Authentication_Services.dart';
9 | import 'package:lefty/Authentication/Login.dart';
10 | import 'package:lefty/Authentication/Register.dart';
11 | import 'package:lefty/MyBottomNavigationBar.dart';
12 | import 'package:lefty/SplashScreen.dart';
13 | import 'package:provider/provider.dart';
14 | import 'Theme/ThemeController.dart';
15 |
16 | bool isVerified = false;
17 |
18 | Future main() async {
19 | WidgetsFlutterBinding.ensureInitialized();
20 | await Firebase.initializeApp();
21 | Get.lazyPut(() => ThemeController());
22 | runApp(MyApp());
23 | }
24 |
25 | class MyApp extends StatelessWidget {
26 | @override
27 | Widget build(BuildContext context) {
28 | ThemeController.to.getThemeModeFromPreferences();
29 | return MultiProvider(
30 | providers: [
31 | Provider(create: (_) => AuthenticationService(FirebaseAuth.instance)),
32 | StreamProvider(
33 | create: (context) => context.read().authStateChanges,
34 | )
35 | ],
36 | child: GetMaterialApp(
37 | builder: BotToastInit(),
38 | theme: ThemeData.light().copyWith(
39 | snackBarTheme: SnackBarThemeData(
40 | backgroundColor: Colors.white,
41 | actionTextColor: Colors.black,
42 | ),
43 | accentColorBrightness: Brightness.light,
44 | primaryColor: Colors.teal[500],
45 | primaryColorDark: Colors.teal[800],
46 | cardColor: Colors.teal[50],
47 | highlightColor: Colors.black,
48 | backgroundColor: Colors.teal[100],
49 | accentColor: Colors.tealAccent,
50 | brightness: Brightness.light,
51 | textSelectionTheme: TextSelectionThemeData(
52 | cursorColor: Colors.teal[900], selectionColor: Colors.white70, selectionHandleColor: Colors.teal[500]),
53 | splashColor: Colors.teal[200],
54 | buttonColor: Colors.teal[500],
55 | hintColor: Colors.teal[900],
56 | unselectedWidgetColor: Colors.teal[500],
57 | errorColor: Colors.red[300],
58 | dividerColor: Colors.teal[900],
59 | textTheme: TextTheme(
60 | bodyText1: TextStyle(color: Colors.teal[700], fontSize: 16, fontFamily: 'Sans'),
61 | headline3: TextStyle(color: Colors.teal[400], fontSize: 20, fontFamily: 'FredokaOne'),
62 | headline2: TextStyle(color: Colors.teal[400], fontSize: 35, fontFamily: 'FredokaOne'),
63 | subtitle1: TextStyle(color: Colors.teal[800], fontSize: 18, fontFamily: 'Sans'),
64 | headline5: TextStyle(color: Colors.teal[400], fontSize: 14, fontWeight: FontWeight.bold, fontFamily: 'Sans'),
65 | headline4: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.bold, fontFamily: 'Sans'),
66 | bodyText2: TextStyle(color: Colors.teal[600], fontSize: 14, fontWeight: FontWeight.bold),
67 | headline1: TextStyle(color: Colors.teal[800], fontSize: 60, fontWeight: FontWeight.normal,fontFamily: 'FredokaOne'))),
68 | //
69 | //
70 | //DarkTheme
71 |
72 | //
73 | darkTheme: ThemeData.dark().copyWith(
74 | snackBarTheme: SnackBarThemeData(
75 | backgroundColor: Colors.grey[850],
76 | actionTextColor: Colors.white,
77 | ),
78 | textTheme: TextTheme(
79 | bodyText1: TextStyle(color: Colors.white, fontSize: 16, fontFamily: 'Sans'),
80 | headline3: TextStyle(color: Colors.white, fontSize: 20, fontFamily: 'FredokaOne'),
81 | headline2: TextStyle(color: Colors.white, fontSize: 35, fontFamily: 'FredokaOne'),
82 | headline5: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.bold, fontFamily: 'Sans'),
83 | subtitle1: TextStyle(color: Colors.white, fontSize: 18, fontFamily: 'Sans'),
84 | headline4: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.bold, fontFamily: 'Sans'),
85 | bodyText2: TextStyle(color: Colors.teal[100], fontSize: 14, fontWeight: FontWeight.bold),
86 | headline1: TextStyle(color: Colors.white, fontSize: 60, fontWeight: FontWeight.normal,fontFamily: 'FredokaOne')),
87 | dividerColor: Colors.grey[400],
88 | unselectedWidgetColor: Colors.grey[600],
89 | errorColor: Colors.red[300],
90 | primaryColor: Colors.grey[850],
91 | hintColor: Colors.grey,
92 | primaryColorDark: Colors.black,
93 | cardColor: Colors.grey[850],
94 | backgroundColor: Colors.grey[900],
95 | highlightColor: Colors.black,
96 | textSelectionTheme: TextSelectionThemeData(
97 | cursorColor: Colors.teal[200], selectionColor: Colors.teal[100], selectionHandleColor: Colors.teal[200]),
98 | accentColor: Colors.teal[200],
99 | brightness: Brightness.dark,
100 | splashColor: Colors.greenAccent,
101 | buttonColor: Colors.grey[700],
102 | accentColorBrightness: Brightness.dark),
103 | themeMode: ThemeController.to.themeMode,
104 | navigatorObservers: [BotToastNavigatorObserver()],
105 | home: AuthenticationWrapper(),
106 | routes: {
107 | '/SplashScreen': (context) => SplashScreen(),
108 | '/Login': (context) => Login(),
109 | '/Register': (context) => Register(),
110 | '/Home': (context) => MyBottomNavigationBar()
111 | }),
112 | );
113 | }
114 | }
115 |
116 | //
117 | class AuthenticationWrapper extends StatelessWidget {
118 | @override
119 | Widget build(BuildContext context) {
120 | final firebaseUser = context.watch();
121 | print("Printing fbuser: " + firebaseUser.toString());
122 |
123 | if (firebaseUser == null) {
124 | isVerified = false;
125 | return SplashScreen();
126 | } else {
127 | isVerified = true;
128 | return SplashScreen();
129 | }
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/lib/static/Circular_Loading.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/scheduler.dart';
2 | import 'package:flutter_spinkit/flutter_spinkit.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:lefty/Theme/ThemeController.dart';
5 |
6 | class Circular_Loading extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | var brightness = Theme.of(context).brightness;
10 | ThemeData themeData;
11 | return Container(
12 | color: Theme.of(context).backgroundColor,
13 | child: Center(
14 | child: SpinKitChasingDots(
15 | color: brightness == Brightness.light?Colors.teal[700]:Colors.white,
16 | size: 100.0,
17 | ),
18 | ));
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/static/Horizontal_Loading.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_spinkit/flutter_spinkit.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:get/get.dart';
4 | import 'package:lefty/Theme/ThemeController.dart';
5 |
6 | class Horizontal_Loading extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | var brightness = Theme.of(context).brightness;
10 | return Container(
11 | color: Theme.of(context).backgroundColor,
12 | child: Center(
13 | child: SpinKitThreeBounce(
14 | color: brightness == Brightness.light?Colors.teal[700]:Colors.white,
15 | size: 80.0,
16 | ),
17 | ));
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/static/Loading.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_spinkit/flutter_spinkit.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:get/get.dart';
4 | import 'package:lefty/Theme/ThemeController.dart';
5 |
6 | class Loading extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | var brightness = Theme.of(context).brightness;
10 | return Container(
11 | color: Theme.of(context).backgroundColor,
12 | child: Center(
13 | child: SpinKitRipple(
14 | color:brightness == Brightness.light?Colors.teal[700]:Colors.white,
15 | size: 80.0,
16 | ),
17 | ));
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | name: lefty
3 | description: A new Flutter application.
4 | publish_to: none
5 | version: 1.0.0+1
6 | environment:
7 | sdk: '>=2.7.0 <3.0.0'
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 | shimmer: ^1.1.2
12 | flutter_spinkit: ^4.1.2
13 | firebase_auth: ^0.20.0+1
14 | firebase_core: ^0.7.0
15 | bot_toast: ^3.0.5
16 | cloud_firestore: ^0.16.0
17 | flutter_launcher_icons: ^0.8.1
18 | provider: null
19 | cupertino_icons: ^1.0.0
20 | curved_navigation_bar: ^0.3.7
21 | numberpicker: ^1.3.0
22 | image_picker: ^0.6.7+22
23 | firebase_storage: ^7.0.0
24 | cached_network_image: ^2.5.0
25 | google_maps_flutter: ^1.2.0
26 | http: ^0.12.0+1
27 | json_serializable: ^3.3.0
28 | location: ^3.2.4
29 | geolocator: ^6.2.0
30 | get: ^3.25.4
31 | shared_preferences: ^0.5.12+4
32 | webview_flutter: ^1.0.7
33 | url_launcher: ^5.7.10
34 | google_maps_flutter_web: ^0.1.0
35 |
36 | dev_dependencies:
37 | flutter_test:
38 | sdk: flutter
39 | pedantic: ^1.9.0
40 | build_runner: ^1.10.0
41 |
42 | flutter:
43 | uses-material-design: true
44 |
45 | fonts:
46 | - family: Lobster
47 | fonts:
48 | - asset: assets/font/LobsterTwo-Regular.ttf
49 | - family: Sans
50 | fonts:
51 | - asset: assets/font/OpenSans-Light.ttf
52 | - family: FredokaOne
53 | fonts:
54 | - asset: assets/font/FredokaOne-Regular.ttf
55 |
56 | flutter_icons:
57 | image_path_android: "assets/icon/android-fg.png"
58 | image_path_ios: "assets/icon/ios.png"
59 | android: true # can specify file name here e.g. "ic_launcher"
60 | ios: true # can specify file name here e.g. "My-Launcher-Icon"
61 | adaptive_icon_background: "assets/icon/android-bg.png" # only available for Android 8.0 devices and above
62 | adaptive_icon_foreground: "assets/icon/android-fg.png"
63 |
64 | # flutter packages pub run flutter_launcher_icons:main
65 |
--------------------------------------------------------------------------------
/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:lefty/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 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/web/favicon.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jacobranjit/lefty/409c9c7b06fcbda074086c9c5801bf229ff1c92b/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | lefty
30 |
31 |
32 |
33 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
57 |
58 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lefty",
3 | "short_name": "lefty",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------