├── .flutter-plugins
├── .gitignore
├── .idea
└── misc.xml
├── .metadata
├── .packages
├── README.md
├── Screenshots
├── Occassions_1.jpg
├── Occassions_2.jpg
├── Occassions_3.jpg
├── Occassions_4.jpg
├── buymecoffee.png
├── facebook.png
├── flutter-ocassions.json
├── instagram.png
├── linkedin.png
├── stackoverflow.png
└── twitter.png
├── android
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ └── plugins
│ │ │ │ └── GeneratedPluginRegistrant.java
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── toastguyz
│ │ │ │ └── flutter_occassions
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ ├── Generated.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── GeneratedPluginRegistrant.h
│ ├── GeneratedPluginRegistrant.m
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── auth
│ ├── auth_user.dart
│ ├── sign_in.dart
│ └── sign_up.dart
├── holiday
│ └── holiday_list.dart
├── home
│ └── home.dart
├── main.dart
├── models
│ ├── header_item_list.dart
│ └── holiday_list_model.dart
└── utils
│ ├── constants.dart
│ └── network_check.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.flutter-plugins:
--------------------------------------------------------------------------------
1 | connectivity=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\connectivity-0.4.4\\
2 | firebase_auth=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_auth-0.11.1+12\\
3 | firebase_core=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_core-0.4.0+9\\
4 | firebase_database=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_database-3.0.7\\
5 | firebase_messaging=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_messaging-5.1.6\\
6 | shared_preferences=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\shared_preferences-0.5.3+4\\
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | *.aab
5 |
6 | # Files for the ART/Dalvik VM
7 | *.dex
8 |
9 | # Java class files
10 | *.class
11 |
12 | # Generated files
13 | bin/
14 | gen/
15 | out/
16 | # Uncomment the following line in case you need and you don't have the release build type files in your app
17 | # release/
18 |
19 | # Gradle files
20 | .gradle/
21 | build/
22 |
23 | # Local configuration file (sdk path, etc)
24 | local.properties
25 |
26 | # Proguard folder generated by Eclipse
27 | proguard/
28 |
29 | # Log Files
30 | *.log
31 |
32 | # Android Studio Navigation editor temp files
33 | .navigation/
34 |
35 | # Android Studio captures folder
36 | captures/
37 |
38 | # IntelliJ
39 | *.iml
40 | .idea/workspace.xml
41 | .idea/tasks.xml
42 | .idea/gradle.xml
43 | .idea/assetWizardSettings.xml
44 | .idea/dictionaries
45 | .idea/libraries
46 | # Android Studio 3 in .gitignore file.
47 | .idea/caches
48 | .idea/modules.xml
49 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you
50 | .idea/navEditor.xml
51 |
52 | # Keystore files
53 | # Uncomment the following lines if you do not want to check your keystore files in.
54 | *.jks
55 | *.keystore
56 |
57 | # External native build folder generated in Android Studio 2.2 and later
58 | .externalNativeBuild
59 |
60 | # Google Services (e.g. APIs or Firebase)
61 | google-services.json
62 |
63 | # Freeline
64 | freeline.py
65 | freeline/
66 | freeline_project_description.json
67 |
68 | # fastlane
69 | fastlane/report.xml
70 | fastlane/Preview.html
71 | fastlane/screenshots
72 | fastlane/test_output
73 | fastlane/readme.md
74 |
75 | # Version control
76 | vcs.xml
77 |
78 | # lint
79 | lint/intermediates/
80 | lint/generated/
81 | lint/outputs/
82 | lint/tmp/
83 | # lint/reports/
84 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 20e59316b8b8474554b38493b8ca888794b0234a
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/.packages:
--------------------------------------------------------------------------------
1 | # Generated by pub on 2019-09-27 01:03:04.687756.
2 | async:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.3.0/lib/
3 | boolean_selector:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.5/lib/
4 | charcode:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/
5 | collection:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib/
6 | connectivity:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.4/lib/
7 | cupertino_icons:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.2/lib/
8 | firebase_auth:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.11.1+12/lib/
9 | firebase_core:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+9/lib/
10 | firebase_database:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database-3.0.7/lib/
11 | firebase_messaging:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-5.1.6/lib/
12 | flutter:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/packages/flutter/lib/
13 | flutter_test:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/packages/flutter_test/lib/
14 | intl:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.15.8/lib/
15 | matcher:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.5/lib/
16 | meta:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.7/lib/
17 | path:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/
18 | pedantic:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/pedantic-1.8.0+1/lib/
19 | platform:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/platform-2.2.1/lib/
20 | quiver:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.5/lib/
21 | shared_preferences:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.3+4/lib/
22 | sky_engine:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/bin/cache/pkg/sky_engine/lib/
23 | source_span:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.5.5/lib/
24 | stack_trace:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/
25 | stream_channel:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/
26 | string_scanner:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/
27 | term_glyph:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/
28 | test_api:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.5/lib/
29 | typed_data:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/
30 | vector_math:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/
31 | flutter_occassions:lib/
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Occassions
2 |
3 | > A flutter application for displaying the list of the holidays throughout the year.
4 |
5 | Main Features Used :
6 | - Beautiful UI Design
7 | - Form-Field Validation
8 | - Firebase Authentication
9 | - Firebase Database
10 | - TabBar
11 |
12 | ## Screenshots
13 |
14 | | 1 | 2|
15 | |------|-------|
16 | |
|
|
17 |
18 | | 3 | 4|
19 | |------|-------|
20 | |
|
|
21 |
22 | Don't forget to star :star2: the repo if you like our work.:heart::blue_heart::yellow_heart::purple_heart::green_heart:
23 |
24 | ## Website :link:
25 |
26 | > [Toastguyz](www.toastguyz.com) - A programming tutorials website
27 |
28 | ## Support on social media :thumbsup:
29 |
30 | >Follow us on our social media profiles to support us.
31 |
32 | - [Youtube Channel](https://www.youtube.com/toastguyz)
33 | - [Facebook Page](https://www.facebook.com/toastguyz)
34 | - [Twitter Account](https://www.twitter.com/toastguyz)
35 | - [Instagram Account](https://www.instagram.com/toastguyz)
36 |
37 | ## Code Developer
38 |
39 | >### Jay Patel :fire:
40 | >Enthusiastic Android & Flutter App Developer.
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | ## ☕ Donate
49 |
50 | > [Paypal](https://www.paypal.me/toastguyz)
51 |
52 |
53 |
54 |
55 |
56 | Thanks for reaching out to us. :100:
57 |
58 | # Getting Started
59 |
60 | > 1. Create your flutter application project.
61 | > 2. [Set up with firebase](https://firebase.google.com/docs)
62 | > 3. Create Realtime Database with Test Rules and import the attached json file(flutter-ocassions.json) in Screenshots folder to your flutter project.
63 | > 4. To run your project enable Authentication for email in [firebase console](https://console.firebase.google.com/).
64 | > 5. After Running your app, use company code as "ABC" to move further.
65 |
66 | RealTime Database Rules :
67 | {
68 | "rules": {
69 | ".read": true,
70 | ".write": true
71 | }
72 | }
73 |
74 | Now, you're ready to rock the floor:guitar:
--------------------------------------------------------------------------------
/Screenshots/Occassions_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/Occassions_1.jpg
--------------------------------------------------------------------------------
/Screenshots/Occassions_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/Occassions_2.jpg
--------------------------------------------------------------------------------
/Screenshots/Occassions_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/Occassions_3.jpg
--------------------------------------------------------------------------------
/Screenshots/Occassions_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/Occassions_4.jpg
--------------------------------------------------------------------------------
/Screenshots/buymecoffee.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/buymecoffee.png
--------------------------------------------------------------------------------
/Screenshots/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/facebook.png
--------------------------------------------------------------------------------
/Screenshots/flutter-ocassions.json:
--------------------------------------------------------------------------------
1 | {
2 | "Holiday" : {
3 | "ABC" : {
4 | "-LivvdBHPtytpTgE6DVk" : {
5 | "createdAt" : 1547451644,
6 | "date" : 1547451644,
7 | "description" : "Testing Holiday Data.",
8 | "name" : "MakarSankranti",
9 | "photo" : "https://images.pexels.com/photos/461198/pexels-photo-461198.jpeg",
10 | "tags" : "#MakarSankranti#Celebration",
11 | "updatedAt" : 1547451644
12 | },
13 | "-Livvs-qAcA6DzFSrZTY" : {
14 | "createdAt" : 1562226044,
15 | "date" : 1562226044,
16 | "description" : "Testing Holiday Data.",
17 | "name" : "RakshaBandhan",
18 | "photo" : "https://images.pexels.com/photos/461198/pexels-photo-461198.jpeg",
19 | "tags" : "#RakshaBandhan#Celebration",
20 | "updatedAt" : 1562226044
21 | },
22 | "-Livw1szrg7dfGcDeqoM" : {
23 | "createdAt" : 1572162044,
24 | "date" : 1572162044,
25 | "description" : "Testing Holiday Data.",
26 | "name" : "Diwali",
27 | "photo" : "https://images.pexels.com/photos/461198/pexels-photo-461198.jpeg",
28 | "tags" : "#Diwali#Celebration",
29 | "updatedAt" : 1572162044
30 | },
31 | "-LivwArYCJ2b1_i_QTEQ" : {
32 | "createdAt" : 1570261244,
33 | "date" : 1570261244,
34 | "description" : "Testing Holiday Data.",
35 | "name" : "Dashera",
36 | "photo" : "https://images.pexels.com/photos/461198/pexels-photo-461198.jpeg",
37 | "tags" : "#Dashera#Celebration",
38 | "updatedAt" : 1570261244
39 | }
40 | }
41 | },
42 | "Users" : {
43 | "-Lpj6IVbH07rzro3W2oP" : {
44 | "createdAt" : 1569527248937,
45 | "deviceToken" : "cUJ9kk5TUV8:APA91bFiy8MvomwcaIWWrr5GVrchRup6mfwp78OMQWsjffJcFjeaMZbd9WwrE5Vtjpvuln1bD9bl6R7wib7bkcjuZjS_-IM0vy3V3bnku_c0313OepCuHJ6PrHjyuG86lFi0NINtuAAe",
46 | "deviceType" : "Android",
47 | "email" : "test@mail.com",
48 | "group" : "ABC",
49 | "online" : false,
50 | "photo" : "-",
51 | "statusUpdatedAt" : 1569527248937,
52 | "updatedAt" : 1569527248937,
53 | "userApprovalStatus" : 1,
54 | "userID" : "jlSo1EFpKcdxfPXXD2jfd3Kqp512"
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Screenshots/instagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/instagram.png
--------------------------------------------------------------------------------
/Screenshots/linkedin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/linkedin.png
--------------------------------------------------------------------------------
/Screenshots/stackoverflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/stackoverflow.png
--------------------------------------------------------------------------------
/Screenshots/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/Screenshots/twitter.png
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
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.toastguyz.flutter_occassions"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'androidx.test:runner:1.1.1'
66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
67 |
68 | implementation 'com.android.support:multidex:1.0.3'
69 | }
70 | apply plugin: 'com.google.gms.google-services'
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:
--------------------------------------------------------------------------------
1 | package io.flutter.plugins;
2 |
3 | import io.flutter.plugin.common.PluginRegistry;
4 | import io.flutter.plugins.connectivity.ConnectivityPlugin;
5 | import io.flutter.plugins.firebaseauth.FirebaseAuthPlugin;
6 | import io.flutter.plugins.firebase.core.FirebaseCorePlugin;
7 | import io.flutter.plugins.firebase.database.FirebaseDatabasePlugin;
8 | import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin;
9 | import io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin;
10 |
11 | /**
12 | * Generated file. Do not edit.
13 | */
14 | public final class GeneratedPluginRegistrant {
15 | public static void registerWith(PluginRegistry registry) {
16 | if (alreadyRegisteredWith(registry)) {
17 | return;
18 | }
19 | ConnectivityPlugin.registerWith(registry.registrarFor("io.flutter.plugins.connectivity.ConnectivityPlugin"));
20 | FirebaseAuthPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebaseauth.FirebaseAuthPlugin"));
21 | FirebaseCorePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.core.FirebaseCorePlugin"));
22 | FirebaseDatabasePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.database.FirebaseDatabasePlugin"));
23 | FirebaseMessagingPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
24 | SharedPreferencesPlugin.registerWith(registry.registrarFor("io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin"));
25 | }
26 |
27 | private static boolean alreadyRegisteredWith(PluginRegistry registry) {
28 | final String key = GeneratedPluginRegistrant.class.getCanonicalName();
29 | if (registry.hasPlugin(key)) {
30 | return true;
31 | }
32 | registry.registrarFor(key);
33 | return false;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/toastguyz/flutter_occassions/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.toastguyz.flutter_occassions
2 |
3 | import android.os.Bundle
4 |
5 | import io.flutter.app.FlutterActivity
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | GeneratedPluginRegistrant.registerWith(this)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.21'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.3.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:3.2.1'
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 |
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/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-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/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 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Generated.xcconfig:
--------------------------------------------------------------------------------
1 | // This is a generated file; do not edit or check into version control.
2 | FLUTTER_ROOT=D:\Program_Files\FlutterSDK\flutter_windows_v1.7.8+hotfix.4-stable\flutter
3 | FLUTTER_APPLICATION_PATH=G:\Flutter\GitProjects\flutter_samples\flutter_occassions
4 | FLUTTER_TARGET=lib/main.dart
5 | FLUTTER_BUILD_DIR=build
6 | SYMROOT=${SOURCE_ROOT}/../build\ios
7 | FLUTTER_FRAMEWORK_DIR=D:\Program_Files\FlutterSDK\flutter_windows_v1.7.8+hotfix.4-stable\flutter\bin\cache\artifacts\engine\ios
8 | FLUTTER_BUILD_NAME=1.0.0
9 | FLUTTER_BUILD_NUMBER=1
10 |
--------------------------------------------------------------------------------
/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 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
18 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXCopyFilesBuildPhase section */
24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
25 | isa = PBXCopyFilesBuildPhase;
26 | buildActionMask = 2147483647;
27 | dstPath = "";
28 | dstSubfolderSpec = 10;
29 | files = (
30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
32 | );
33 | name = "Embed Frameworks";
34 | runOnlyForDeploymentPostprocessing = 0;
35 | };
36 | /* End PBXCopyFilesBuildPhase section */
37 |
38 | /* Begin PBXFileReference section */
39 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
40 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
41 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
42 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
43 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
44 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
46 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
47 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
48 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
49 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
50 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
51 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
52 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
53 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
54 | /* End PBXFileReference section */
55 |
56 | /* Begin PBXFrameworksBuildPhase section */
57 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
58 | isa = PBXFrameworksBuildPhase;
59 | buildActionMask = 2147483647;
60 | files = (
61 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
62 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
63 | );
64 | runOnlyForDeploymentPostprocessing = 0;
65 | };
66 | /* End PBXFrameworksBuildPhase section */
67 |
68 | /* Begin PBXGroup section */
69 | 9740EEB11CF90186004384FC /* Flutter */ = {
70 | isa = PBXGroup;
71 | children = (
72 | 3B80C3931E831B6300D905FE /* App.framework */,
73 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
74 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
76 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
77 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
78 | );
79 | name = Flutter;
80 | sourceTree = "";
81 | };
82 | 97C146E51CF9000F007C117D = {
83 | isa = PBXGroup;
84 | children = (
85 | 9740EEB11CF90186004384FC /* Flutter */,
86 | 97C146F01CF9000F007C117D /* Runner */,
87 | 97C146EF1CF9000F007C117D /* Products */,
88 | );
89 | sourceTree = "";
90 | };
91 | 97C146EF1CF9000F007C117D /* Products */ = {
92 | isa = PBXGroup;
93 | children = (
94 | 97C146EE1CF9000F007C117D /* Runner.app */,
95 | );
96 | name = Products;
97 | sourceTree = "";
98 | };
99 | 97C146F01CF9000F007C117D /* Runner */ = {
100 | isa = PBXGroup;
101 | children = (
102 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
103 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
104 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
105 | 97C147021CF9000F007C117D /* Info.plist */,
106 | 97C146F11CF9000F007C117D /* Supporting Files */,
107 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
108 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
109 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
110 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
111 | );
112 | path = Runner;
113 | sourceTree = "";
114 | };
115 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
116 | isa = PBXGroup;
117 | children = (
118 | );
119 | name = "Supporting Files";
120 | sourceTree = "";
121 | };
122 | /* End PBXGroup section */
123 |
124 | /* Begin PBXNativeTarget section */
125 | 97C146ED1CF9000F007C117D /* Runner */ = {
126 | isa = PBXNativeTarget;
127 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
128 | buildPhases = (
129 | 9740EEB61CF901F6004384FC /* Run Script */,
130 | 97C146EA1CF9000F007C117D /* Sources */,
131 | 97C146EB1CF9000F007C117D /* Frameworks */,
132 | 97C146EC1CF9000F007C117D /* Resources */,
133 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
134 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
135 | );
136 | buildRules = (
137 | );
138 | dependencies = (
139 | );
140 | name = Runner;
141 | productName = Runner;
142 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
143 | productType = "com.apple.product-type.application";
144 | };
145 | /* End PBXNativeTarget section */
146 |
147 | /* Begin PBXProject section */
148 | 97C146E61CF9000F007C117D /* Project object */ = {
149 | isa = PBXProject;
150 | attributes = {
151 | LastUpgradeCheck = 1020;
152 | ORGANIZATIONNAME = "The Chromium Authors";
153 | TargetAttributes = {
154 | 97C146ED1CF9000F007C117D = {
155 | CreatedOnToolsVersion = 7.3.1;
156 | LastSwiftMigration = 0910;
157 | };
158 | };
159 | };
160 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
161 | compatibilityVersion = "Xcode 3.2";
162 | developmentRegion = en;
163 | hasScannedForEncodings = 0;
164 | knownRegions = (
165 | en,
166 | Base,
167 | );
168 | mainGroup = 97C146E51CF9000F007C117D;
169 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
170 | projectDirPath = "";
171 | projectRoot = "";
172 | targets = (
173 | 97C146ED1CF9000F007C117D /* Runner */,
174 | );
175 | };
176 | /* End PBXProject section */
177 |
178 | /* Begin PBXResourcesBuildPhase section */
179 | 97C146EC1CF9000F007C117D /* Resources */ = {
180 | isa = PBXResourcesBuildPhase;
181 | buildActionMask = 2147483647;
182 | files = (
183 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
184 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
185 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
186 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
187 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
188 | );
189 | runOnlyForDeploymentPostprocessing = 0;
190 | };
191 | /* End PBXResourcesBuildPhase section */
192 |
193 | /* Begin PBXShellScriptBuildPhase section */
194 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
195 | isa = PBXShellScriptBuildPhase;
196 | buildActionMask = 2147483647;
197 | files = (
198 | );
199 | inputPaths = (
200 | );
201 | name = "Thin Binary";
202 | outputPaths = (
203 | );
204 | runOnlyForDeploymentPostprocessing = 0;
205 | shellPath = /bin/sh;
206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
207 | };
208 | 9740EEB61CF901F6004384FC /* Run Script */ = {
209 | isa = PBXShellScriptBuildPhase;
210 | buildActionMask = 2147483647;
211 | files = (
212 | );
213 | inputPaths = (
214 | );
215 | name = "Run Script";
216 | outputPaths = (
217 | );
218 | runOnlyForDeploymentPostprocessing = 0;
219 | shellPath = /bin/sh;
220 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
221 | };
222 | /* End PBXShellScriptBuildPhase section */
223 |
224 | /* Begin PBXSourcesBuildPhase section */
225 | 97C146EA1CF9000F007C117D /* Sources */ = {
226 | isa = PBXSourcesBuildPhase;
227 | buildActionMask = 2147483647;
228 | files = (
229 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
230 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
231 | );
232 | runOnlyForDeploymentPostprocessing = 0;
233 | };
234 | /* End PBXSourcesBuildPhase section */
235 |
236 | /* Begin PBXVariantGroup section */
237 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
238 | isa = PBXVariantGroup;
239 | children = (
240 | 97C146FB1CF9000F007C117D /* Base */,
241 | );
242 | name = Main.storyboard;
243 | sourceTree = "";
244 | };
245 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
246 | isa = PBXVariantGroup;
247 | children = (
248 | 97C147001CF9000F007C117D /* Base */,
249 | );
250 | name = LaunchScreen.storyboard;
251 | sourceTree = "";
252 | };
253 | /* End PBXVariantGroup section */
254 |
255 | /* Begin XCBuildConfiguration section */
256 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
257 | isa = XCBuildConfiguration;
258 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
259 | buildSettings = {
260 | ALWAYS_SEARCH_USER_PATHS = NO;
261 | CLANG_ANALYZER_NONNULL = YES;
262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
263 | CLANG_CXX_LIBRARY = "libc++";
264 | CLANG_ENABLE_MODULES = YES;
265 | CLANG_ENABLE_OBJC_ARC = YES;
266 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
267 | CLANG_WARN_BOOL_CONVERSION = YES;
268 | CLANG_WARN_COMMA = YES;
269 | CLANG_WARN_CONSTANT_CONVERSION = YES;
270 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
271 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
272 | CLANG_WARN_EMPTY_BODY = YES;
273 | CLANG_WARN_ENUM_CONVERSION = YES;
274 | CLANG_WARN_INFINITE_RECURSION = YES;
275 | CLANG_WARN_INT_CONVERSION = YES;
276 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
277 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
278 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
279 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
280 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
281 | CLANG_WARN_STRICT_PROTOTYPES = YES;
282 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
283 | CLANG_WARN_UNREACHABLE_CODE = YES;
284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
285 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
286 | COPY_PHASE_STRIP = NO;
287 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
288 | ENABLE_NS_ASSERTIONS = NO;
289 | ENABLE_STRICT_OBJC_MSGSEND = YES;
290 | GCC_C_LANGUAGE_STANDARD = gnu99;
291 | GCC_NO_COMMON_BLOCKS = YES;
292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
294 | GCC_WARN_UNDECLARED_SELECTOR = YES;
295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
296 | GCC_WARN_UNUSED_FUNCTION = YES;
297 | GCC_WARN_UNUSED_VARIABLE = YES;
298 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
299 | MTL_ENABLE_DEBUG_INFO = NO;
300 | SDKROOT = iphoneos;
301 | TARGETED_DEVICE_FAMILY = "1,2";
302 | VALIDATE_PRODUCT = YES;
303 | };
304 | name = Profile;
305 | };
306 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
307 | isa = XCBuildConfiguration;
308 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
309 | buildSettings = {
310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
312 | DEVELOPMENT_TEAM = S8QB4VV633;
313 | ENABLE_BITCODE = NO;
314 | FRAMEWORK_SEARCH_PATHS = (
315 | "$(inherited)",
316 | "$(PROJECT_DIR)/Flutter",
317 | );
318 | INFOPLIST_FILE = Runner/Info.plist;
319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
320 | LIBRARY_SEARCH_PATHS = (
321 | "$(inherited)",
322 | "$(PROJECT_DIR)/Flutter",
323 | );
324 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterOccassions;
325 | PRODUCT_NAME = "$(TARGET_NAME)";
326 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
327 | SWIFT_VERSION = 4.0;
328 | VERSIONING_SYSTEM = "apple-generic";
329 | };
330 | name = Profile;
331 | };
332 | 97C147031CF9000F007C117D /* Debug */ = {
333 | isa = XCBuildConfiguration;
334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
335 | buildSettings = {
336 | ALWAYS_SEARCH_USER_PATHS = NO;
337 | CLANG_ANALYZER_NONNULL = YES;
338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
339 | CLANG_CXX_LIBRARY = "libc++";
340 | CLANG_ENABLE_MODULES = YES;
341 | CLANG_ENABLE_OBJC_ARC = YES;
342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
343 | CLANG_WARN_BOOL_CONVERSION = YES;
344 | CLANG_WARN_COMMA = YES;
345 | CLANG_WARN_CONSTANT_CONVERSION = YES;
346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
348 | CLANG_WARN_EMPTY_BODY = YES;
349 | CLANG_WARN_ENUM_CONVERSION = YES;
350 | CLANG_WARN_INFINITE_RECURSION = YES;
351 | CLANG_WARN_INT_CONVERSION = YES;
352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
353 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
354 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
357 | CLANG_WARN_STRICT_PROTOTYPES = YES;
358 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
359 | CLANG_WARN_UNREACHABLE_CODE = YES;
360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
361 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
362 | COPY_PHASE_STRIP = NO;
363 | DEBUG_INFORMATION_FORMAT = dwarf;
364 | ENABLE_STRICT_OBJC_MSGSEND = YES;
365 | ENABLE_TESTABILITY = YES;
366 | GCC_C_LANGUAGE_STANDARD = gnu99;
367 | GCC_DYNAMIC_NO_PIC = NO;
368 | GCC_NO_COMMON_BLOCKS = YES;
369 | GCC_OPTIMIZATION_LEVEL = 0;
370 | GCC_PREPROCESSOR_DEFINITIONS = (
371 | "DEBUG=1",
372 | "$(inherited)",
373 | );
374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
376 | GCC_WARN_UNDECLARED_SELECTOR = YES;
377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
378 | GCC_WARN_UNUSED_FUNCTION = YES;
379 | GCC_WARN_UNUSED_VARIABLE = YES;
380 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
381 | MTL_ENABLE_DEBUG_INFO = YES;
382 | ONLY_ACTIVE_ARCH = YES;
383 | SDKROOT = iphoneos;
384 | TARGETED_DEVICE_FAMILY = "1,2";
385 | };
386 | name = Debug;
387 | };
388 | 97C147041CF9000F007C117D /* Release */ = {
389 | isa = XCBuildConfiguration;
390 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
391 | buildSettings = {
392 | ALWAYS_SEARCH_USER_PATHS = NO;
393 | CLANG_ANALYZER_NONNULL = YES;
394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
395 | CLANG_CXX_LIBRARY = "libc++";
396 | CLANG_ENABLE_MODULES = YES;
397 | CLANG_ENABLE_OBJC_ARC = YES;
398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
399 | CLANG_WARN_BOOL_CONVERSION = YES;
400 | CLANG_WARN_COMMA = YES;
401 | CLANG_WARN_CONSTANT_CONVERSION = YES;
402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
404 | CLANG_WARN_EMPTY_BODY = YES;
405 | CLANG_WARN_ENUM_CONVERSION = YES;
406 | CLANG_WARN_INFINITE_RECURSION = YES;
407 | CLANG_WARN_INT_CONVERSION = YES;
408 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
409 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
413 | CLANG_WARN_STRICT_PROTOTYPES = YES;
414 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
415 | CLANG_WARN_UNREACHABLE_CODE = YES;
416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
418 | COPY_PHASE_STRIP = NO;
419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
420 | ENABLE_NS_ASSERTIONS = NO;
421 | ENABLE_STRICT_OBJC_MSGSEND = YES;
422 | GCC_C_LANGUAGE_STANDARD = gnu99;
423 | GCC_NO_COMMON_BLOCKS = YES;
424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
426 | GCC_WARN_UNDECLARED_SELECTOR = YES;
427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
428 | GCC_WARN_UNUSED_FUNCTION = YES;
429 | GCC_WARN_UNUSED_VARIABLE = YES;
430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
431 | MTL_ENABLE_DEBUG_INFO = NO;
432 | SDKROOT = iphoneos;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
434 | TARGETED_DEVICE_FAMILY = "1,2";
435 | VALIDATE_PRODUCT = YES;
436 | };
437 | name = Release;
438 | };
439 | 97C147061CF9000F007C117D /* Debug */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
442 | buildSettings = {
443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444 | CLANG_ENABLE_MODULES = YES;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | ENABLE_BITCODE = NO;
447 | FRAMEWORK_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | INFOPLIST_FILE = Runner/Info.plist;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | LIBRARY_SEARCH_PATHS = (
454 | "$(inherited)",
455 | "$(PROJECT_DIR)/Flutter",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterOccassions;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
462 | SWIFT_VERSION = 4.0;
463 | VERSIONING_SYSTEM = "apple-generic";
464 | };
465 | name = Debug;
466 | };
467 | 97C147071CF9000F007C117D /* Release */ = {
468 | isa = XCBuildConfiguration;
469 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
470 | buildSettings = {
471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
472 | CLANG_ENABLE_MODULES = YES;
473 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
474 | ENABLE_BITCODE = NO;
475 | FRAMEWORK_SEARCH_PATHS = (
476 | "$(inherited)",
477 | "$(PROJECT_DIR)/Flutter",
478 | );
479 | INFOPLIST_FILE = Runner/Info.plist;
480 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
481 | LIBRARY_SEARCH_PATHS = (
482 | "$(inherited)",
483 | "$(PROJECT_DIR)/Flutter",
484 | );
485 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterOccassions;
486 | PRODUCT_NAME = "$(TARGET_NAME)";
487 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
488 | SWIFT_SWIFT3_OBJC_INFERENCE = On;
489 | SWIFT_VERSION = 4.0;
490 | VERSIONING_SYSTEM = "apple-generic";
491 | };
492 | name = Release;
493 | };
494 | /* End XCBuildConfiguration section */
495 |
496 | /* Begin XCConfigurationList section */
497 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
498 | isa = XCConfigurationList;
499 | buildConfigurations = (
500 | 97C147031CF9000F007C117D /* Debug */,
501 | 97C147041CF9000F007C117D /* Release */,
502 | 249021D3217E4FDB00AE95B9 /* Profile */,
503 | );
504 | defaultConfigurationIsVisible = 0;
505 | defaultConfigurationName = Release;
506 | };
507 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
508 | isa = XCConfigurationList;
509 | buildConfigurations = (
510 | 97C147061CF9000F007C117D /* Debug */,
511 | 97C147071CF9000F007C117D /* Release */,
512 | 249021D4217E4FDB00AE95B9 /* Profile */,
513 | );
514 | defaultConfigurationIsVisible = 0;
515 | defaultConfigurationName = Release;
516 | };
517 | /* End XCConfigurationList section */
518 |
519 | };
520 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
521 | }
522 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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/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: [UIApplicationLaunchOptionsKey: 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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/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/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toastguyz/flutter-occassions/26aed1db547d72a34194e3f72c916b98a3fcabc7/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/GeneratedPluginRegistrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #ifndef GeneratedPluginRegistrant_h
6 | #define GeneratedPluginRegistrant_h
7 |
8 | #import
9 |
10 | @interface GeneratedPluginRegistrant : NSObject
11 | + (void)registerWithRegistry:(NSObject*)registry;
12 | @end
13 |
14 | #endif /* GeneratedPluginRegistrant_h */
15 |
--------------------------------------------------------------------------------
/ios/Runner/GeneratedPluginRegistrant.m:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #import "GeneratedPluginRegistrant.h"
6 | #import
7 | #import
8 | #import
9 | #import
10 | #import
11 | #import
12 |
13 | @implementation GeneratedPluginRegistrant
14 |
15 | + (void)registerWithRegistry:(NSObject*)registry {
16 | [FLTConnectivityPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTConnectivityPlugin"]];
17 | [FLTFirebaseAuthPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseAuthPlugin"]];
18 | [FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]];
19 | [FLTFirebaseDatabasePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseDatabasePlugin"]];
20 | [FLTFirebaseMessagingPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseMessagingPlugin"]];
21 | [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/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 | flutter_occassions
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"
--------------------------------------------------------------------------------
/lib/auth/auth_user.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:firebase_messaging/firebase_messaging.dart';
4 | import 'package:flutter/cupertino.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_occassions/auth/sign_in.dart';
7 | import 'package:flutter_occassions/auth/sign_up.dart';
8 | import 'package:flutter_occassions/utils/constants.dart';
9 | import 'package:shared_preferences/shared_preferences.dart';
10 |
11 | class AuthUserPage extends StatefulWidget {
12 | @override
13 | State createState() {
14 | return AuthUserPageState();
15 | }
16 | }
17 |
18 | class AuthUserPageState extends State
19 | with TickerProviderStateMixin {
20 | TabController _tabController;
21 | FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
22 |
23 | @override
24 | void initState() {
25 | super.initState();
26 |
27 | firebaseCloudMessaging_Listeners();
28 | _tabController = new TabController(vsync: this, length: 2);
29 | }
30 |
31 | @override
32 | void dispose() {
33 | _tabController.dispose();
34 | super.dispose();
35 | }
36 |
37 | void firebaseCloudMessaging_Listeners() async {
38 | if (Platform.isIOS) iOS_Permission();
39 |
40 | _firebaseMessaging.getToken().then((token) async {
41 | final SharedPreferences prefs = await SharedPreferences.getInstance();
42 | prefs.setString("userToken", token);
43 | print("Firebase Messaging : " + token);
44 | });
45 |
46 | _firebaseMessaging.configure(
47 | onMessage: (Map message) async {
48 | print('on message $message');
49 | },
50 | onResume: (Map message) async {
51 | print('on resume $message');
52 | },
53 | onLaunch: (Map message) async {
54 | print('on launch $message');
55 | },
56 | );
57 | }
58 |
59 | void iOS_Permission() {
60 | _firebaseMessaging.requestNotificationPermissions(
61 | IosNotificationSettings(sound: true, badge: true, alert: true));
62 | _firebaseMessaging.onIosSettingsRegistered
63 | .listen((IosNotificationSettings settings) {
64 | print("Settings registered: $settings");
65 | });
66 | }
67 |
68 | @override
69 | Widget build(BuildContext context) {
70 | TabController _tabController = TabController(vsync: this, length: 2);
71 | return Scaffold(
72 | appBar: AppBar(
73 | title: Text(
74 | "Holidays",
75 | style: TextStyle(
76 | color: dateBackgroundColor,
77 | ),
78 | ),
79 | bottom: TabBar(
80 | controller: _tabController,
81 | tabs: [
82 | Tab(
83 | text: "SIGN IN",
84 | ),
85 | Tab(
86 | text: "SIGN UP",
87 | ),
88 | ],
89 | labelColor: dateBackgroundColor,
90 | unselectedLabelColor: Colors.grey,
91 | indicatorColor: dateBackgroundColor,
92 | ),
93 | backgroundColor: Colors.white,
94 | ),
95 | body: TabBarView(
96 | controller: _tabController,
97 | children: [
98 | SignInPage(),
99 | SignUpPage(),
100 | ],
101 | ),
102 | );
103 | }
104 | }
105 |
106 | /*class AuthUserPageState extends State
107 | with SingleTickerProviderStateMixin {
108 | TabController tabController;
109 |
110 | @override
111 | void initState() {
112 | super.initState();
113 |
114 | tabController = TabController(vsync: this, length: 2);
115 | }
116 |
117 | @override
118 | void dispose() {
119 | tabController.dispose();
120 | super.dispose();
121 | }
122 |
123 | @override
124 | Widget build(BuildContext context) {
125 | return Scaffold(
126 | appBar: TabBar(
127 | labelPadding: MediaQuery.of(context).padding,
128 | tabs: [
129 | Tab(
130 | text: "SIGN IN",
131 | ),
132 | Tab(
133 | text: "SIGN UP",
134 | ),
135 | ],
136 | labelColor: dateBackgroundColor,
137 | unselectedLabelColor: Colors.grey,
138 | indicatorColor: dateBackgroundColor,
139 | controller: tabController,
140 | ),
141 | body: TabBarView(
142 | controller: tabController,
143 | children: [
144 | Center(
145 | child: Container(
146 | child: Text("SIGN IN"),
147 | ),
148 | ),
149 | Center(
150 | child: Container(
151 | child: Text("SIGN UP"),
152 | ),
153 | ),
154 | ],
155 | ),
156 | );
157 | }
158 | }*/
159 |
160 | /*class DecoratedTabBar extends StatelessWidget implements PreferredSizeWidget {
161 | DecoratedTabBar({@required this.tabBar, @required this.decoration});
162 |
163 | final TabBar tabBar;
164 | final BoxDecoration decoration;
165 |
166 | @override
167 | Size get preferredSize => tabBar.preferredSize;
168 |
169 | @override
170 | Widget build(BuildContext context) {
171 | return Stack(
172 | children: [
173 | Positioned.fill(child: Container(decoration: decoration)),
174 | tabBar,
175 | ],
176 | );
177 | }
178 | }*/
179 |
180 | /*class AuthUserPageState extends State
181 | with SingleTickerProviderStateMixin {
182 | TabController tabController;
183 |
184 | @override
185 | void initState() {
186 | super.initState();
187 |
188 | tabController = TabController(length: 2, vsync: this);
189 | }
190 |
191 | @override
192 | void dispose() {
193 | tabController.dispose();
194 | super.dispose();
195 | }
196 |
197 | Widget getTabBar() {
198 | return TabBar(controller: tabController, tabs: [
199 | Tab(
200 | text: "SIGN IN",
201 | ),
202 | Tab(
203 | text: "SIGN UP",
204 | ),
205 | ]);
206 | }
207 |
208 | Widget getTabBarPages() {
209 | return TabBarView(controller: tabController, children: [
210 | Container(
211 | child: Text("SIGN IN"),
212 | ),
213 | Container(
214 | child: Text("SIGN UP"),
215 | ),
216 | Container(color: Colors.red),
217 | Container(color: Colors.green),
218 | ]);
219 | }
220 |
221 | @override
222 | Widget build(BuildContext context) {
223 | return Scaffold(
224 | appBar: AppBar(
225 |
226 | flexibleSpace: SafeArea(
227 | child: getTabBar(),
228 | ),
229 | ),
230 | body: getTabBarPages());
231 | }
232 | }*/
233 |
--------------------------------------------------------------------------------
/lib/auth/sign_in.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:firebase_auth/firebase_auth.dart';
4 | import 'package:firebase_database/firebase_database.dart';
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter/services.dart';
8 | import 'package:flutter_occassions/utils/constants.dart';
9 | import 'package:flutter_occassions/utils/network_check.dart';
10 | import 'package:shared_preferences/shared_preferences.dart';
11 |
12 | enum authProblems { UserNotFound, PasswordNotValid, NetworkError }
13 |
14 | class SignInPage extends StatefulWidget {
15 | @override
16 | State createState() {
17 | return SignInPageState();
18 | }
19 | }
20 |
21 | class SignInPageState extends State
22 | with SingleTickerProviderStateMixin {
23 | final TextEditingController _emailController = TextEditingController();
24 | final TextEditingController _passwordController = TextEditingController();
25 |
26 | final GlobalKey _formKey = GlobalKey();
27 | final Map _formData = {
28 | "email": null,
29 | "password": null,
30 | "name": null,
31 | "group": null,
32 | "deviceType": null,
33 | "deviceToken": null,
34 | "online": false,
35 | "statusUpdatedAt": null,
36 | "userApprovalStatus": 1,
37 | "createdAt": null,
38 | "updatedAt": null,
39 | };
40 |
41 | FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
42 | bool isAuthenticating = false;
43 |
44 | Widget _buildEmailTextField() {
45 | return TextFormField(
46 | controller: _emailController,
47 | decoration: InputDecoration(
48 | border: OutlineInputBorder(
49 | borderRadius: BorderRadius.circular(10.0),
50 | borderSide: BorderSide(
51 | width: 0,
52 | style: BorderStyle.none,
53 | ),
54 | ),
55 | hintText: "E-mail",
56 | hintStyle: TextStyle(
57 | color: Colors.grey[400],
58 | ),
59 | filled: true,
60 | fillColor: dateBackgroundColor,
61 | ),
62 | style: TextStyle(color: Colors.white),
63 | keyboardType: TextInputType.emailAddress,
64 | validator: (String email) {
65 | if (email.isEmpty ||
66 | !RegExp(r"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?")
67 | .hasMatch(email)) {
68 | return 'Please enter a valid email';
69 | }
70 | },
71 | onSaved: (String email) {
72 | _formData['email'] = email;
73 | },
74 | );
75 | }
76 |
77 | Widget _buildPasswordTextField() {
78 | return TextFormField(
79 | controller: _passwordController,
80 | decoration: InputDecoration(
81 | border: OutlineInputBorder(
82 | borderRadius: BorderRadius.circular(10.0),
83 | borderSide: BorderSide(
84 | width: 0,
85 | style: BorderStyle.none,
86 | ),
87 | ),
88 | hintText: "Password",
89 | hintStyle: TextStyle(
90 | color: Colors.grey[400],
91 | ),
92 | filled: true,
93 | fillColor: dateBackgroundColor,
94 | ),
95 | style: TextStyle(color: Colors.white),
96 | obscureText: true,
97 | keyboardType: TextInputType.text,
98 | validator: (String password) {
99 | if (password.isEmpty || password.length < 6) {
100 | return 'Password invalid';
101 | }
102 | },
103 | onSaved: (String password) {
104 | _formData['password'] = password;
105 | },
106 | );
107 | }
108 |
109 | void _submitAuthForm() async {
110 | if (!_formKey.currentState.validate()) {
111 | return;
112 | }
113 | _formKey.currentState.save();
114 |
115 | NetworkCheck networkCheck = new NetworkCheck();
116 | networkCheck.checkInternet((isNetworkPresent) async {
117 | if (!isNetworkPresent) {
118 | final snackBar =
119 | SnackBar(content: Text('Please check your internet connection !!'));
120 |
121 | Scaffold.of(context).showSnackBar(snackBar);
122 | return;
123 | } else {
124 | setState(() {
125 | isAuthenticating = true;
126 | });
127 | }
128 | });
129 |
130 | String firebaseUserID = "";
131 | try {
132 | _firebaseAuth
133 | .signInWithEmailAndPassword(
134 | email: _formData["email"], password: _formData["password"])
135 | .then((FirebaseUser firebaseUser) async {
136 | firebaseUserID = firebaseUser.uid;
137 | print('Signed in: $firebaseUserID');
138 |
139 | final SharedPreferences prefs = await SharedPreferences.getInstance();
140 | final group = prefs.getString("userCompanyCode");
141 |
142 | final userReference = FirebaseDatabase.instance
143 | .reference()
144 | .child("Users")
145 | .limitToFirst(1)
146 | .orderByChild("email")
147 | .equalTo(_formData["email"]);
148 |
149 | userReference.once().then((DataSnapshot snapShot) {
150 | print("User Data : ${snapShot.value}");
151 | String firebaseGroup = "";
152 | for (var value in snapShot.value.values) {
153 | firebaseGroup = value['group'];
154 | print("Found Group : ${value['group']}");
155 | }
156 |
157 | if (!firebaseGroup.isEmpty && firebaseGroup == group) {
158 | setState(() {
159 | isAuthenticating = false;
160 | });
161 |
162 | prefs.setString("userEmail", firebaseUser.email);
163 | prefs.setString("userID", firebaseUserID);
164 |
165 | Navigator.pushReplacementNamed(context, '/dashboard');
166 | } else {
167 | setState(() {
168 | isAuthenticating = false;
169 | });
170 |
171 | Navigator.pushReplacementNamed(context, '/');
172 | }
173 | });
174 |
175 | /*Navigator.push(
176 | context,
177 | MaterialPageRoute(builder: (context) => HolidayListPage()),
178 | );*/
179 | }).catchError((onError) {
180 | print("Detail Message : ${onError.message}");
181 | setState(() {
182 | isAuthenticating = false;
183 | });
184 |
185 | final snackBar = SnackBar(content: Text(onError.message));
186 | Scaffold.of(context).showSnackBar(snackBar);
187 | });
188 | } catch (e) {
189 | print('Error: $e');
190 |
191 | setState(() {
192 | isAuthenticating = false;
193 | });
194 | }
195 |
196 | /*try {
197 | String firebaseUserID = "";
198 | FirebaseUser firebaseUser =
199 | await _firebaseAuth.signInWithEmailAndPassword(
200 | email: _formData["email"], password: _formData["password"]);
201 | firebaseUserID = firebaseUser.uid;
202 | print('Signed in: $firebaseUserID');
203 |
204 | final SharedPreferences prefs = await SharedPreferences.getInstance();
205 | prefs.setString("userEmail", firebaseUser.email);
206 | prefs.setString("userID", firebaseUserID);
207 |
208 | setState(() {
209 | isAuthenticating = false;
210 | });
211 |
212 | Navigator.push(
213 | context,
214 | MaterialPageRoute(builder: (context) => HolidayListPage()),
215 | );
216 | } catch (e) {
217 | print('Error: $e');
218 |
219 | setState(() {
220 | isAuthenticating = false;
221 | });
222 | }*/
223 | }
224 |
225 | Widget _buildFormSubmitButton() {
226 | return Container(
227 | width: double.infinity,
228 | height: 50.0,
229 | child: RaisedButton(
230 | padding: EdgeInsets.all(10.0),
231 | textColor: Colors.white,
232 | child: Text(
233 | 'CONTINUE',
234 | style: TextStyle(
235 | fontSize: 18.0,
236 | ),
237 | ),
238 | shape:
239 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
240 | onPressed: () => _submitAuthForm(),
241 | ),
242 | );
243 | }
244 |
245 | Widget _buildForgotPasswordButton() {
246 | return FlatButton(
247 | onPressed: () {},
248 | child: Padding(
249 | padding: EdgeInsets.all(10.0),
250 | child: Text(
251 | "FORGOT PASSWORD",
252 | style: TextStyle(
253 | color: holidayGlobalBackgroundColor,
254 | fontSize: 15.0,
255 | fontWeight: FontWeight.w400,
256 | ),
257 | ),
258 | ),
259 | );
260 | }
261 |
262 | @override
263 | Widget build(BuildContext context) {
264 | final double deviceWidth = MediaQuery.of(context).size.width;
265 | final double targetWidth = deviceWidth > 550.0 ? 500.0 : deviceWidth * 0.95;
266 |
267 | return Container(
268 | padding: EdgeInsets.symmetric(horizontal: 30.0),
269 | decoration: new BoxDecoration(
270 | // color: Colors.lightGreen,
271 | color: Colors.white,
272 | ),
273 | child: Center(
274 | child: SingleChildScrollView(
275 | child: Container(
276 | width: targetWidth,
277 | child: Form(
278 | key: _formKey,
279 | child: Column(
280 | children: [
281 | _buildEmailTextField(),
282 | SizedBox(
283 | height: 20.0,
284 | ),
285 | _buildPasswordTextField(),
286 | SizedBox(
287 | height: 20.0,
288 | ),
289 | _buildForgotPasswordButton(),
290 | SizedBox(
291 | height: 20.0,
292 | ),
293 | isAuthenticating
294 | ? CircularProgressIndicator()
295 | : _buildFormSubmitButton(),
296 | ],
297 | ),
298 | ),
299 | ),
300 | ),
301 | ),
302 | );
303 | }
304 | }
305 |
--------------------------------------------------------------------------------
/lib/auth/sign_up.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:firebase_database/firebase_database.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter_occassions/utils/constants.dart';
6 | import 'package:flutter_occassions/utils/network_check.dart';
7 | import 'package:shared_preferences/shared_preferences.dart';
8 |
9 | class SignUpPage extends StatefulWidget {
10 | @override
11 | State createState() {
12 | return SignUpPageState();
13 | }
14 | }
15 |
16 | class SignUpPageState extends State {
17 | final TextEditingController _emailController = TextEditingController();
18 | final TextEditingController _passwordController = TextEditingController();
19 | final TextEditingController _confirmPasswordController =
20 | TextEditingController();
21 |
22 | final GlobalKey _formKey = GlobalKey();
23 | final Map _formData = {
24 | "email": null,
25 | "password": null,
26 | "name": null,
27 | "group": null,
28 | "deviceType": null,
29 | "deviceToken": null,
30 | "online": false,
31 | "statusUpdatedAt": null,
32 | "userApprovalStatus": 1,
33 | "createdAt": null,
34 | "updatedAt": null,
35 | };
36 |
37 | final userReference = FirebaseDatabase.instance.reference().child("Users");
38 | FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
39 | bool isAuthenticating = false;
40 |
41 | Widget _buildEmailTextField() {
42 | return TextFormField(
43 | style: TextStyle(color: Colors.white),
44 | controller: _emailController,
45 | decoration: InputDecoration(
46 | border: OutlineInputBorder(
47 | borderRadius: BorderRadius.circular(10.0),
48 | borderSide: BorderSide(
49 | width: 0,
50 | style: BorderStyle.none,
51 | ),
52 | ),
53 | hintText: "E-mail",
54 | hintStyle: TextStyle(
55 | color: Colors.grey[400],
56 | ),
57 | filled: true,
58 | fillColor: dateBackgroundColor,
59 | ),
60 | keyboardType: TextInputType.emailAddress,
61 | validator: (String email) {
62 | if (email.isEmpty ||
63 | !RegExp(r"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?")
64 | .hasMatch(email)) {
65 | return 'Please enter a valid email';
66 | }
67 | },
68 | onSaved: (String email) {
69 | _formData['email'] = email;
70 | },
71 | );
72 | }
73 |
74 | Widget _buildPasswordTextField() {
75 | return TextFormField(
76 | style: TextStyle(color: Colors.white),
77 | controller: _passwordController,
78 | decoration: InputDecoration(
79 | border: OutlineInputBorder(
80 | borderRadius: BorderRadius.circular(10.0),
81 | borderSide: BorderSide(
82 | width: 0,
83 | style: BorderStyle.none,
84 | ),
85 | ),
86 | hintText: "Password",
87 | hintStyle: TextStyle(
88 | color: Colors.grey[400],
89 | ),
90 | filled: true,
91 | fillColor: dateBackgroundColor,
92 | ),
93 | obscureText: true,
94 | keyboardType: TextInputType.text,
95 | validator: (String password) {
96 | if (password.isEmpty || password.length < 6) {
97 | return 'Password invalid';
98 | }
99 | },
100 | onSaved: (String password) {
101 | _formData['password'] = password;
102 | },
103 | );
104 | }
105 |
106 | Widget _buildConfirmPasswordTextField() {
107 | return TextFormField(
108 | style: TextStyle(color: Colors.white),
109 | controller: _confirmPasswordController,
110 | decoration: InputDecoration(
111 | border: OutlineInputBorder(
112 | borderRadius: BorderRadius.circular(10.0),
113 | borderSide: BorderSide(
114 | width: 0,
115 | style: BorderStyle.none,
116 | ),
117 | ),
118 | hintText: "Confirm Password",
119 | hintStyle: TextStyle(
120 | color: Colors.grey[400],
121 | ),
122 | filled: true,
123 | fillColor: dateBackgroundColor,
124 | labelStyle: TextStyle(color: Colors.white),
125 | ),
126 | keyboardType: TextInputType.text,
127 | obscureText: true,
128 | validator: (String value) {
129 | if (_passwordController.text != value) {
130 | return 'Passwords do not match.';
131 | }
132 | },
133 | );
134 | }
135 |
136 | Widget _buildFormSubmitButton() {
137 | return Container(
138 | width: double.infinity,
139 | height: 50.0,
140 | child: RaisedButton(
141 | padding: EdgeInsets.all(10.0),
142 | textColor: Colors.white,
143 | child: Text('CONTINUE',style: TextStyle(fontSize: 18.0,),),
144 | shape:
145 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
146 | onPressed: () => _submitAuthForm(),
147 | ),
148 | );
149 | }
150 |
151 | void _submitAuthForm() async {
152 | if (!_formKey.currentState.validate()) {
153 | return;
154 | }
155 | _formKey.currentState.save();
156 |
157 | NetworkCheck networkCheck = new NetworkCheck();
158 | networkCheck.checkInternet((isNetworkPresent) async {
159 | if (!isNetworkPresent) {
160 | final snackBar = SnackBar(content: Text('Please check your internet connection !!'));
161 |
162 | Scaffold.of(context).showSnackBar(snackBar);
163 | return;
164 | } else {
165 | setState(() {
166 | isAuthenticating = true;
167 | });
168 | }
169 | });
170 |
171 | String firebaseUserID = "";
172 | try {
173 | _firebaseAuth
174 | .createUserWithEmailAndPassword(
175 | email: _formData["email"], password: _formData["password"])
176 | .then((FirebaseUser firebaseUser) async {
177 | firebaseUserID = firebaseUser.uid;
178 | print('Signed up user: $firebaseUserID');
179 |
180 | try {
181 | final SharedPreferences prefs = await SharedPreferences.getInstance();
182 | prefs.setString("userEmail", firebaseUser.email);
183 | prefs.setString("userID", firebaseUserID);
184 |
185 | String firebaseToken = prefs.getString("userToken");
186 | print("firebaseToken : $firebaseToken");
187 |
188 | final group = prefs.getString("userCompanyCode");
189 |
190 | var targetPlatform =
191 | Theme.of(context).platform == TargetPlatform.android
192 | ? "Android"
193 | : "iOS";
194 |
195 | /*DateTime currentTime = DateTime.now();
196 | var dateFormat = new DateFormat('dd-MM-yyyyTHH:mm:ss');
197 | String formattedDate = dateFormat.format(currentTime);*/
198 |
199 | await userReference.push().set({
200 | "name": _formData["name"],
201 | "email": firebaseUser.email,
202 | "photo": "-",
203 | "group": group.isEmpty ? "-" : group,
204 | "deviceType": targetPlatform,
205 | "deviceToken": firebaseToken.isEmpty ? "-" : firebaseToken,
206 | "online": false,
207 | "statusUpdatedAt": DateTime.now().millisecondsSinceEpoch,
208 | "userApprovalStatus": 1,
209 | "updatedAt": DateTime.now().millisecondsSinceEpoch,
210 | "createdAt": DateTime.now().millisecondsSinceEpoch,
211 | "userID": firebaseUserID,
212 | });
213 |
214 | print("success!!!");
215 |
216 | setState(() {
217 | isAuthenticating = false;
218 | });
219 |
220 | Navigator.pushReplacementNamed(context, '/dashboard');
221 |
222 | /*Navigator.push(
223 | context,
224 | MaterialPageRoute(builder: (context) => HolidayListPage()),
225 | );*/
226 | } catch (e) {
227 | setState(() {
228 | isAuthenticating = false;
229 | });
230 |
231 | print("Failure Message : " + e.toString());
232 | print("failed!!!");
233 | }
234 | }).catchError((onError) {
235 | print("Detail Message : ${onError.message}");
236 |
237 | setState(() {
238 | isAuthenticating = false;
239 | });
240 |
241 | final snackBar = SnackBar(content: Text(onError.message));
242 | Scaffold.of(context).showSnackBar(snackBar);
243 | });
244 | } catch (e) {
245 | print('Error: $e');
246 |
247 | setState(() {
248 | isAuthenticating = false;
249 | });
250 | }
251 |
252 | /*String firebaseUserID = "";
253 | try {
254 | FirebaseUser firebaseUser =
255 | await _firebaseAuth.createUserWithEmailAndPassword(
256 | email: _formData["email"], password: _formData["password"]);
257 | firebaseUserID = firebaseUser.uid;
258 | print('Signed up user: $firebaseUserID');
259 |
260 | final SharedPreferences prefs = await SharedPreferences.getInstance();
261 | prefs.setString("userEmail", firebaseUser.email);
262 | prefs.setString("userID", firebaseUserID);
263 |
264 | String firebaseToken = prefs.getString("userToken");
265 |
266 | try {
267 | var targetPlatform =
268 | Theme.of(context).platform == TargetPlatform.android
269 | ? "Android"
270 | : "iOS";
271 |
272 | DateTime currentTime = DateTime.now();
273 | var dateFormat = new DateFormat('dd-MM-yyyyTHH:mm:ss');
274 | String formattedDate = dateFormat.format(currentTime);
275 |
276 | await userReference.push().set({
277 | "name": _formData["name"],
278 | "email": firebaseUser.email,
279 | "photo": "-",
280 | "group": "-",
281 | "deviceType": targetPlatform,
282 | "deviceToken": firebaseToken,
283 | "online": false,
284 | "statusUpdatedAt": DateTime.now().millisecondsSinceEpoch,
285 | "userApprovalStatus": 1,
286 | "updatedAt": DateTime.now().millisecondsSinceEpoch,
287 | "createdAt": DateTime.now().millisecondsSinceEpoch,
288 | "userID": firebaseUserID,
289 | });
290 |
291 | print("success!!!");
292 | } catch (e) {
293 | print("Failure Message : " + e.toString());
294 | print("failed!!!");
295 | }
296 |
297 | setState(() {
298 | isAuthenticating = false;
299 | });
300 |
301 | Navigator.push(
302 | context,
303 | MaterialPageRoute(builder: (context) => HolidayListPage()),
304 | );
305 | } catch (e) {
306 | print('Error: $e');
307 |
308 | setState(() {
309 | isAuthenticating = false;
310 | });
311 | }*/
312 | }
313 |
314 | @override
315 | Widget build(BuildContext context) {
316 | final double deviceWidth = MediaQuery.of(context).size.width;
317 | final double targetWidth = deviceWidth > 550.0 ? 500.0 : deviceWidth * 0.95;
318 |
319 | return Container(
320 | padding: EdgeInsets.symmetric(horizontal: 30.0),
321 | decoration: new BoxDecoration(
322 | color: Colors.white,
323 | ),
324 | child: Center(
325 | child: SingleChildScrollView(
326 | child: Container(
327 | width: targetWidth,
328 | child: Form(
329 | key: _formKey,
330 | child: Column(
331 | children: [
332 | _buildEmailTextField(),
333 | SizedBox(
334 | height: 20.0,
335 | ),
336 | _buildPasswordTextField(),
337 | SizedBox(
338 | height: 20.0,
339 | ),
340 | _buildConfirmPasswordTextField(),
341 | SizedBox(
342 | height: 20.0,
343 | ),
344 | isAuthenticating
345 | ? CircularProgressIndicator()
346 | : _buildFormSubmitButton(),
347 | ],
348 | ),
349 | ),
350 | ),
351 | ),
352 | ),
353 | );
354 | }
355 | }
356 |
--------------------------------------------------------------------------------
/lib/holiday/holiday_list.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_database/firebase_database.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/services.dart';
5 | import 'package:flutter_occassions/models/header_item_list.dart';
6 | import 'package:flutter_occassions/models/holiday_list_model.dart';
7 | import 'package:flutter_occassions/utils/network_check.dart';
8 | import 'package:intl/intl.dart';
9 | import 'package:flutter_occassions/utils/constants.dart';
10 | import 'package:shared_preferences/shared_preferences.dart';
11 |
12 | class HolidayListPage extends StatefulWidget {
13 | @override
14 | State createState() {
15 | return HolidayListPageState();
16 | }
17 | }
18 |
19 | class HolidayListPageState extends State {
20 | bool isLoading = false;
21 |
22 | // final holidayReference = FirebaseDatabase.instance.reference().child("Holiday");
23 | List holidayList = [];
24 | List finalHolidayList = [];
25 |
26 | @override
27 | void initState() {
28 | super.initState();
29 |
30 | // addDataToFirebase();
31 | getHolidays();
32 | }
33 |
34 | @override
35 | Widget build(BuildContext context) {
36 | return Scaffold(
37 | appBar: AppBar(
38 | brightness: Brightness.light,
39 | titleSpacing: 0.0,
40 | title: new Transform(
41 | transform: new Matrix4.translationValues(-15.0, 0.0, 0.0),
42 | child: Text(
43 | "HOLIDAYS",
44 | style: TextStyle(
45 | color: dateBackgroundColor,
46 | ),
47 | ),
48 | ),
49 | elevation: 0.0,
50 | leading: IconButton(
51 | icon: Icon(
52 | Icons.menu,
53 | color: dateBackgroundColor,
54 | ),
55 | onPressed: () {},
56 | ),
57 | actions: [
58 | IconButton(
59 | icon: Icon(
60 | Icons.share,
61 | color: holidayTodayBackgroundColor,
62 | ),
63 | onPressed: () {},
64 | ),
65 | ],
66 | backgroundColor: Colors.white,
67 | ),
68 | // body: Container(),
69 | body: getHolidayListView(),
70 | );
71 | }
72 |
73 | void addDataToFirebase() async {
74 | final holidayReference = FirebaseDatabase.instance
75 | .reference()
76 | .child("Holiday")
77 | .child("UPCOMING");
78 |
79 | holidayReference.push().set({
80 | "name": "Company Holiday",
81 | "description": "Testing Holiday Data.",
82 | "photo":
83 | "https://images.pexels.com/photos/461198/pexels-photo-461198.jpeg",
84 | "tags": "#Diwali#Celebration",
85 | "date": 1562586617169,
86 | "updatedAt": 1562586617169,
87 | "createdAt": 1562586617169,
88 | }).then((_) {
89 | print("Transaction Completed");
90 | });
91 |
92 | holidayReference.push().set({
93 | "name": "Company Holiday",
94 | "description": "Testing Holiday Data.",
95 | "photo":
96 | "https://images.pexels.com/photos/461198/pexels-photo-461198.jpeg",
97 | "tags": "#Diwali#Celebration",
98 | "date": 1562653800000,
99 | "updatedAt": 1562653800000,
100 | "createdAt": 1562653800000,
101 | }).then((_) {
102 | print("Transaction Completed");
103 | });
104 | }
105 |
106 | void getHolidays() async {
107 | NetworkCheck networkCheck = new NetworkCheck();
108 | networkCheck.checkInternet((isNetworkPresent) async {
109 | if (!isNetworkPresent) {
110 | final snackBar =
111 | SnackBar(content: Text('Please check your internet connection !!'));
112 |
113 | Scaffold.of(context).showSnackBar(snackBar);
114 | return;
115 | } else {
116 | setState(() {
117 | isLoading = true;
118 | });
119 | }
120 | });
121 |
122 | try {
123 | final SharedPreferences prefs = await SharedPreferences.getInstance();
124 | final group = prefs.getString("userCompanyCode");
125 | final holidayReference =
126 | FirebaseDatabase.instance.reference().child("Holiday").child(group);
127 |
128 | await holidayReference.once().then((DataSnapshot snapshot) {
129 | print('HolidayList : ${snapshot.value}');
130 |
131 | for (var value in snapshot.value.values) {
132 | holidayList.add(new HolidayModel.fromJson(value));
133 | }
134 |
135 | holidayList.sort((a, b) => a.HolidayDate.compareTo(b.HolidayDate));
136 |
137 | var dateFormat = new DateFormat("dd-MM-yyyy");
138 | String today = dateFormat.format(DateTime.now());
139 | var monthFormatter = new DateFormat('MMMM');
140 | String todayMonth = monthFormatter.format(DateTime.now());
141 | var dayFormatter = new DateFormat('dd');
142 | String todayDay = dayFormatter.format(DateTime.now());
143 |
144 | for (int i = 0; i < holidayList.length; i++) {
145 | if (holidayList[i].HolidayDate.day == DateTime.now().day) {
146 | finalHolidayList.add(new HolidayHeadingModel("TODAY"));
147 | finalHolidayList.add(new HolidayItemModel(
148 | holidayList[i].Name,
149 | holidayList[i].Description,
150 | holidayList[i].Photo,
151 | holidayList[i].Tags,
152 | holidayList[i].Date,
153 | holidayList[i].UpdatedAt,
154 | holidayList[i].CreatedAt,
155 | todayMonth,
156 | todayDay,
157 | 0));
158 | break;
159 | }
160 | }
161 |
162 | DateTime currentDay = dateFormat.parse(today);
163 | int futureFlag = 0;
164 | for (int i = 0; i < holidayList.length; i++) {
165 | // DateTime nextDay = dateFormat.parse(holidayList[i].Date);
166 | DateTime nextDay = holidayList[i].HolidayDate;
167 | String futureMonth =
168 | monthFormatter.format(holidayList[i].HolidayDate);
169 | String futureDay = dayFormatter.format(holidayList[i].HolidayDate);
170 |
171 | if (holidayList[i].HolidayDate.day == DateTime.now().day) {
172 | continue;
173 | }
174 |
175 | if (nextDay.isAfter(currentDay)) {
176 | if (futureFlag == 0) {
177 | finalHolidayList.add(new HolidayHeadingModel("NEXT"));
178 | finalHolidayList.add(new HolidayItemModel(
179 | holidayList[i].Name,
180 | holidayList[i].Description,
181 | holidayList[i].Photo,
182 | holidayList[i].Tags,
183 | holidayList[i].Date,
184 | holidayList[i].UpdatedAt,
185 | holidayList[i].CreatedAt,
186 | futureMonth,
187 | futureDay,
188 | 1));
189 | futureFlag = 1;
190 | } else {
191 | if (futureFlag == 1) {
192 | finalHolidayList.add(new HolidayHeadingModel("UPCOMING"));
193 | finalHolidayList.add(new HolidayItemModel(
194 | holidayList[i].Name,
195 | holidayList[i].Description,
196 | holidayList[i].Photo,
197 | holidayList[i].Tags,
198 | holidayList[i].Date,
199 | holidayList[i].UpdatedAt,
200 | holidayList[i].CreatedAt,
201 | futureMonth,
202 | futureDay,
203 | 2));
204 | futureFlag = 2;
205 | } else {
206 | finalHolidayList.add(new HolidayItemModel(
207 | holidayList[i].Name,
208 | holidayList[i].Description,
209 | holidayList[i].Photo,
210 | holidayList[i].Tags,
211 | holidayList[i].Date,
212 | holidayList[i].UpdatedAt,
213 | holidayList[i].CreatedAt,
214 | futureMonth,
215 | futureDay,
216 | 2));
217 | }
218 | }
219 | }
220 | }
221 |
222 | int pastFlag = 0;
223 | for (int i = 0; i < holidayList.length; i++) {
224 | // DateTime pastDay = dateFormat.parse(holidayList[i].Date);
225 | DateTime pastDay = holidayList[i].HolidayDate;
226 | String goneMonth = monthFormatter.format(pastDay);
227 | String goneDay = dayFormatter.format(pastDay);
228 |
229 | if (pastDay.isBefore(currentDay)) {
230 | if (pastFlag == 0) {
231 | finalHolidayList.add(new HolidayHeadingModel("PAST"));
232 | finalHolidayList.add(new HolidayItemModel(
233 | holidayList[i].Name,
234 | holidayList[i].Description,
235 | holidayList[i].Photo,
236 | holidayList[i].Tags,
237 | holidayList[i].Date,
238 | holidayList[i].UpdatedAt,
239 | holidayList[i].CreatedAt,
240 | goneMonth,
241 | goneDay,
242 | 3));
243 | pastFlag = 1;
244 | } else {
245 | finalHolidayList.add(new HolidayItemModel(
246 | holidayList[i].Name,
247 | holidayList[i].Description,
248 | holidayList[i].Photo,
249 | holidayList[i].Tags,
250 | holidayList[i].Date,
251 | holidayList[i].UpdatedAt,
252 | holidayList[i].CreatedAt,
253 | goneMonth,
254 | goneDay,
255 | 3));
256 | }
257 | }
258 | }
259 |
260 | setState(() {
261 | isLoading = false;
262 | });
263 | });
264 | } catch (e) {
265 | print(e.toString());
266 | }
267 | }
268 |
269 | /*Widget getHolidayListView() {
270 | return finalHolidayList == null || finalHolidayList.length == 0
271 | ? Center(
272 | child: CircularProgressIndicator(),
273 | )
274 | : ListView.builder(
275 | itemCount: finalHolidayList.length,
276 | itemBuilder: (BuildContext context, int index) {
277 | final item = finalHolidayList[index];
278 | if (item is HolidayHeadingModel) {
279 | */ /*return ListTile(
280 | title: Text(
281 | item.heading,
282 | style: Theme.of(context).textTheme.headline,
283 | ),
284 | );*/ /*
285 |
286 | return ListTile(
287 | title: Text(item.heading,
288 | style: TextStyle(
289 | fontWeight: FontWeight.w200,
290 | fontSize: 18.0,
291 | )),
292 | );
293 | } else if (item is HolidayItemModel) {
294 | return ListTile(
295 | leading: CircleAvatar(
296 | backgroundImage: NetworkImage(item.Photo),
297 | ),
298 | title: Text(item.Name),
299 | subtitle: Text(item.Date),
300 | );
301 | }
302 | });
303 | }*/
304 |
305 | /*Widget getHolidayListView() {
306 | return isLoading
307 | ? Center(
308 | child: CircularProgressIndicator(),
309 | )
310 | : ListView.builder(
311 | itemCount: finalHolidayList.length,
312 | itemBuilder: (BuildContext context, int index) {
313 | final item = finalHolidayList[index];
314 | if (item is HolidayHeadingModel) {
315 | return Container(
316 | alignment: Alignment.centerLeft,
317 | height: 40.0,
318 | padding: EdgeInsets.symmetric(horizontal: 20.0),
319 | child: Text(item.heading,
320 | textAlign: TextAlign.start,
321 | style: TextStyle(
322 | fontWeight: FontWeight.w200,
323 | fontSize: 18.0,
324 | )),
325 | );
326 | } else if (item is HolidayItemModel) {
327 | return Container(
328 | height: 60.0,
329 | margin: EdgeInsets.only(
330 | top: 5.0,
331 | bottom: 5.0,
332 | ),
333 | child: Row(
334 | children: [
335 | new Expanded(
336 | flex: 4,
337 | child: Container(
338 | alignment: Alignment.center,
339 | decoration: BoxDecoration(
340 | color: dateBackgroundColor,
341 | ),
342 | child: new Column(
343 | mainAxisAlignment: MainAxisAlignment.center,
344 | children: [
345 | new Text(
346 | item.Day,
347 | style: TextStyle(
348 | fontWeight: FontWeight.bold,
349 | fontSize: 30.0,
350 | color: Colors.white,
351 | ),
352 | textScaleFactor: 1.0,
353 | textAlign: TextAlign.left,
354 | ),
355 | new Text(
356 | item.Month,
357 | textScaleFactor: 0.5,
358 | textAlign: TextAlign.right,
359 | style: new TextStyle(
360 | color: Colors.white,
361 | ),
362 | ),
363 | ],
364 | ),
365 | ),
366 | ),
367 | SizedBox(
368 | width: 2.0,
369 | ),
370 | Expanded(
371 | flex: 13,
372 | child: Container(
373 | padding: EdgeInsets.only(
374 | left: 8.0,
375 | ),
376 | alignment: Alignment.centerLeft,
377 | decoration: BoxDecoration(
378 | color: item.holidayColor == 0
379 | ? holidayTodayBackgroundColor
380 | : item.holidayColor == 1
381 | ? holidayNextBackgroundColor
382 | : holidayGlobalBackgroundColor,
383 | ),
384 | child: new Text(
385 | item.Name,
386 | textScaleFactor: 1.5,
387 | textAlign: TextAlign.start,
388 | style: TextStyle(
389 | color: item.holidayColor == 0
390 | ? Colors.white
391 | : dateBackgroundColor,
392 | ),
393 | ),
394 | ),
395 | ),
396 | new Expanded(
397 | flex: 3,
398 | child: IconButton(
399 | onPressed: () {},
400 | icon: Icon(
401 | Icons.navigate_next,
402 | size: 35.0,
403 | ),
404 | ),
405 | ),
406 | ],
407 | ),
408 | );
409 | }
410 | });
411 | }*/
412 |
413 | Widget getHolidayListView() {
414 | return isLoading
415 | ? Center(
416 | child: CircularProgressIndicator(),
417 | )
418 | : ListView.builder(
419 | itemCount: finalHolidayList.length,
420 | itemBuilder: (BuildContext context, int index) {
421 | final item = finalHolidayList[index];
422 | if (item is HolidayHeadingModel) {
423 | return Container(
424 | alignment: Alignment.centerLeft,
425 | height: 60.0,
426 | padding:
427 | EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
428 | child: Text(item.heading,
429 | textAlign: TextAlign.start,
430 | style: TextStyle(
431 | fontWeight: FontWeight.w200,
432 | fontSize: 25.0,
433 | )),
434 | );
435 | } else if (item is HolidayItemModel) {
436 | return Container(
437 | height: 60.0,
438 | margin: EdgeInsets.only(
439 | top: 3.0,
440 | ),
441 | child: Row(
442 | children: [
443 | new Expanded(
444 | flex: 2,
445 | child: Container(
446 | alignment: Alignment.center,
447 | decoration: BoxDecoration(
448 | color: dateBackgroundColor,
449 | ),
450 | child: new Column(
451 | mainAxisAlignment: MainAxisAlignment.center,
452 | children: [
453 | new Text(
454 | item.Day,
455 | style: TextStyle(
456 | fontWeight: FontWeight.bold,
457 | fontSize: 30.0,
458 | color: Colors.white,
459 | ),
460 | textScaleFactor: 1.0,
461 | textAlign: TextAlign.left,
462 | ),
463 | new Text(
464 | item.Month,
465 | textScaleFactor: 0.5,
466 | textAlign: TextAlign.right,
467 | style: new TextStyle(
468 | color: Colors.white,
469 | ),
470 | ),
471 | ],
472 | ),
473 | ),
474 | ),
475 | SizedBox(
476 | width: 2.0,
477 | ),
478 | Expanded(
479 | flex: 9,
480 | child: Container(
481 | padding: EdgeInsets.only(
482 | left: 8.0,
483 | ),
484 | alignment: Alignment.centerLeft,
485 | decoration: BoxDecoration(
486 | color: item.holidayColor == 0
487 | ? holidayTodayBackgroundColor
488 | : item.holidayColor == 1
489 | ? holidayNextBackgroundColor
490 | : holidayGlobalBackgroundColor,
491 | ),
492 | child: Row(
493 | children: [
494 | Expanded(
495 | flex: 9,
496 | child: Text(
497 | item.Name,
498 | textScaleFactor: 1.5,
499 | textAlign: TextAlign.start,
500 | style: TextStyle(
501 | color: item.holidayColor == 0
502 | ? Colors.white
503 | : item.holidayColor == 1
504 | ? Colors.black
505 | : dateBackgroundColor,
506 | ),
507 | ),
508 | ),
509 | Expanded(
510 | flex: 2,
511 | child: Icon(
512 | Icons.arrow_forward_ios,
513 | color: dateBackgroundColor,
514 | size: 20.0,
515 | ),
516 | ),
517 | ],
518 | ),
519 |
520 | /*child: Text(
521 | item.Name,
522 | textScaleFactor: 1.5,
523 | textAlign: TextAlign.start,
524 | style: TextStyle(
525 | color: item.holidayColor == 0
526 | ? Colors.white
527 | : item.holidayColor == 1
528 | ? Colors.black
529 | : dateBackgroundColor,
530 | ),
531 | ),*/
532 | ),
533 | ),
534 | ],
535 | ),
536 | );
537 | }
538 | });
539 | }
540 | }
541 |
--------------------------------------------------------------------------------
/lib/home/home.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_database/firebase_database.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_occassions/utils/constants.dart';
4 | import 'package:flutter_occassions/utils/network_check.dart';
5 | import 'package:shared_preferences/shared_preferences.dart';
6 |
7 | class HomePage extends StatefulWidget {
8 | @override
9 | State createState() {
10 | return HomePageState();
11 | }
12 | }
13 |
14 | class HomePageState extends State {
15 | final TextEditingController holidayCodeController = TextEditingController();
16 | final GlobalKey _formKey = GlobalKey();
17 | final GlobalKey _scaffoldkey = new GlobalKey();
18 | var holidayFocusNode = new FocusNode();
19 | bool isLoading = false;
20 |
21 | Widget _buildLabelField() {
22 | return Text(
23 | "CODE",
24 | style: TextStyle(
25 | color: dateBackgroundColor,
26 | fontWeight: FontWeight.w400,
27 | fontSize: 25.0,
28 | ),
29 | );
30 | }
31 |
32 | Widget _buildHolidayFormField() {
33 | return Container(
34 | child: Row(
35 | children: [
36 | Expanded(
37 | flex: 5,
38 | child: Form(
39 | key: _formKey,
40 | child: TextFormField(
41 | controller: holidayCodeController,
42 | maxLength: 10,
43 | focusNode: holidayFocusNode,
44 | decoration: InputDecoration(
45 | counterText: "",
46 | border: InputBorder.none,
47 | hintText: "",
48 | hintStyle: TextStyle(
49 | color: Colors.grey,
50 | fontSize: 20.0,
51 | ),
52 | ),
53 | textAlign: TextAlign.end,
54 | validator: ((String holidayCode) {
55 | if (holidayCode.isEmpty) {
56 | return 'Company code is required !!';
57 | }
58 | }),
59 | style: TextStyle(
60 | fontSize: 18.0,
61 | ),
62 | ),
63 | ),
64 | ),
65 | Expanded(
66 | flex: 5,
67 | child: GestureDetector(
68 | onTap: () {
69 | holidayFocusNode.unfocus();
70 | FocusScope.of(context).requestFocus(holidayFocusNode);
71 | },
72 | child: Text(
73 | "| holidays",
74 | style: TextStyle(
75 | color: Colors.grey,
76 | fontSize: 20.0,
77 | ),
78 | ),
79 | ),
80 | ),
81 | ],
82 | ),
83 | );
84 | }
85 |
86 | /*Widget _buildHolidayFormField() {
87 | return Padding(
88 | padding: EdgeInsets.all(
89 | 5.0,
90 | ),
91 | child: Form(
92 | key: _formKey,
93 | child: TextFormField(
94 | controller: holidayCodeController,
95 | maxLength: 10,
96 | decoration: InputDecoration(
97 | counterText: "",
98 | border: UnderlineInputBorder(
99 | borderSide: new BorderSide(
100 | color: Colors.grey,
101 | ),
102 | ),
103 | hintText: "holidays",
104 | hintStyle: TextStyle(
105 | color: Colors.grey,
106 | fontSize: 20.0,
107 | ),
108 | ),
109 | textAlign: TextAlign.center,
110 | validator: ((String holidayCode) {
111 | if (holidayCode.isEmpty) {
112 | return 'Company code is required !!';
113 | }
114 | }),
115 | style: TextStyle(
116 | fontSize: 18.0,
117 | ),
118 | ),
119 | ),
120 | );
121 | }*/
122 |
123 | Widget _buildCodeField() {
124 | return Container(
125 | padding: EdgeInsets.only(
126 | left: 5.0,
127 | top: 10.0,
128 | right: 5.0,
129 | bottom: 10.0,
130 | ),
131 | width: double.infinity,
132 | alignment: Alignment.topLeft,
133 | child: Text(
134 | "* Please provide your company code",
135 | style: TextStyle(
136 | color: dateBackgroundColor,
137 | fontWeight: FontWeight.w200,
138 | fontSize: 12.0,
139 | ),
140 | textAlign: TextAlign.start,
141 | ),
142 | );
143 | }
144 |
145 | Widget _buildSubmitButton() {
146 | return RaisedButton(
147 | padding: EdgeInsets.all(10.0),
148 | onPressed: () {
149 | if (!_formKey.currentState.validate()) {
150 | return;
151 | }
152 | _formKey.currentState.save();
153 |
154 | NetworkCheck networkCheck = new NetworkCheck();
155 | networkCheck.checkInternet((isNetworkPresent) async {
156 | if (!isNetworkPresent) {
157 | final snackBar = SnackBar(
158 | content: Text('Please check your internet connection !!'));
159 |
160 | _scaffoldkey.currentState.showSnackBar(snackBar);
161 | return;
162 | } else {
163 | setState(() {
164 | isLoading = true;
165 | });
166 | }
167 | });
168 |
169 | getFirebaseCompanyHolidayData(holidayCodeController.text);
170 | },
171 | color: dateBackgroundColor,
172 | child: Text(
173 | "SUBMIT",
174 | style: TextStyle(
175 | color: Colors.white,
176 | fontSize: 18.0,
177 | letterSpacing: 1.2,
178 | fontWeight: FontWeight.bold,
179 | ),
180 | ),
181 | );
182 | }
183 |
184 | void getFirebaseCompanyHolidayData(String holidayCode) async {
185 | try {
186 | final holidayReference = FirebaseDatabase.instance
187 | .reference()
188 | .child("Holiday")
189 | .child(holidayCode);
190 |
191 | holidayReference
192 | .limitToFirst(1)
193 | .once()
194 | .then((DataSnapshot snapShot) async {
195 | if (snapShot != null && snapShot.value != null) {
196 | print("values : if Block");
197 |
198 | final SharedPreferences prefs = await SharedPreferences.getInstance();
199 | prefs.setString("userCompanyCode", holidayCode);
200 |
201 | setState(() {
202 | isLoading = false;
203 | });
204 |
205 | Navigator.pushReplacementNamed(context, '/auth');
206 | } else {
207 | print("values : else Block");
208 |
209 | setState(() {
210 | isLoading = false;
211 | });
212 |
213 | final snackBar = SnackBar(content: Text("No Match Found !!"));
214 | _scaffoldkey.currentState.showSnackBar(snackBar);
215 | }
216 | }).catchError((onError) {
217 | print("values : ${onError}");
218 | setState(() {
219 | isLoading = false;
220 | });
221 | });
222 | } catch (e) {
223 | print("Data Fetch : ${e.toString()}");
224 | e.toString();
225 |
226 | setState(() {
227 | isLoading = false;
228 | });
229 | }
230 | }
231 |
232 | _authenticateUserAndNavigate() async {
233 | final SharedPreferences prefs = await SharedPreferences.getInstance();
234 | var userEmail = prefs.getString("userEmail");
235 | final group = prefs.getString("userCompanyCode");
236 | if (userEmail!=null && userEmail.isNotEmpty && group!=null && group.isNotEmpty) {
237 | Navigator.pushReplacementNamed(context, '/dashboard');
238 | }
239 | }
240 |
241 | @override
242 | void initState() {
243 | super.initState();
244 |
245 | _authenticateUserAndNavigate();
246 | }
247 |
248 | @override
249 | Widget build(BuildContext context) {
250 | return Scaffold(
251 | key: _scaffoldkey,
252 | body: Center(
253 | child: SingleChildScrollView(
254 | child: Container(
255 | padding: EdgeInsets.all(
256 | 20.0,
257 | ),
258 | child: Column(
259 | children: [
260 | _buildLabelField(),
261 | SizedBox(
262 | height: 10.0,
263 | ),
264 | _buildHolidayFormField(),
265 | Container(
266 | height: 1.5,
267 | color: dateBackgroundColor,
268 | ),
269 | _buildCodeField(),
270 | isLoading ? CircularProgressIndicator() : _buildSubmitButton(),
271 | ],
272 | ),
273 | ),
274 | ),
275 | ),
276 | );
277 | }
278 | }
279 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:flutter_occassions/auth/auth_user.dart';
5 | import 'package:flutter_occassions/holiday/holiday_list.dart';
6 | import 'package:flutter_occassions/home/home.dart';
7 | import 'package:flutter_occassions/utils/constants.dart';
8 |
9 | void main() {
10 | runApp(MyApp());
11 | }
12 |
13 | class MyApp extends StatelessWidget {
14 | @override
15 | Widget build(BuildContext context) {
16 | return MaterialApp(
17 | debugShowCheckedModeBanner: false,
18 | title: 'Flutter Occassions',
19 | theme: ThemeData(
20 | brightness: Brightness.light,
21 | cursorColor: activeColor,
22 | primaryColor: activeColor,
23 | accentColor: holidayTodayBackgroundColor,
24 | buttonColor: holidayTodayBackgroundColor),
25 | // home: HomePage(),
26 | routes: {
27 | '/': (BuildContext context) => HomePage(),
28 | '/auth': (BuildContext context) => AuthUserPage(),
29 | '/dashboard': (BuildContext context) => HolidayListPage(),
30 | },
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/models/header_item_list.dart:
--------------------------------------------------------------------------------
1 | abstract class HeaderItemModel {}
2 |
3 | class HolidayHeadingModel implements HeaderItemModel {
4 | final String heading;
5 |
6 | HolidayHeadingModel(this.heading);
7 | }
8 |
9 | // A ListItem that contains data to display a message.
10 | class HolidayItemModel implements HeaderItemModel {
11 | String Name;
12 | String Description;
13 | String Photo;
14 | String Tags;
15 | int Date;
16 | int UpdatedAt;
17 | int CreatedAt;
18 | String Month;
19 | String Day;
20 | int holidayColor;
21 |
22 | HolidayItemModel(this.Name, this.Description, this.Photo, this.Tags,
23 | this.Date, this.UpdatedAt, this.CreatedAt, this.Month, this.Day,this.holidayColor);
24 |
25 | HolidayItemModel.fromJson(var value) {
26 | this.Name = value['name'];
27 | this.Description = value['description'];
28 | this.Photo = value['photo'];
29 | this.Tags = value['tags'];
30 | this.Date = value['date'];
31 | this.UpdatedAt = value['updatedAt'];
32 | this.CreatedAt = value['createdAt'];
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/models/holiday_list_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:intl/intl.dart';
2 |
3 | class HolidayModel {
4 | String Name;
5 | String Description;
6 | String Photo;
7 | String Tags;
8 | int Date;
9 | int UpdatedAt;
10 | int CreatedAt;
11 | String Month;
12 | String Day;
13 | DateTime HolidayDate;
14 | // var dateFormat = new DateFormat("dd-MM-yyyy HH:mm:ss");
15 |
16 | HolidayModel(this.Name, this.Description, this.Photo, this.Tags, this.Date,
17 | this.UpdatedAt, this.CreatedAt, this.Month, this.Day);
18 |
19 | HolidayModel.fromJson(var value) {
20 | this.Name = value['name'];
21 | this.Description = value['description'];
22 | this.Photo = value['photo'];
23 | this.Tags = value['tags'];
24 | this.Date = value['date'];
25 | this.UpdatedAt = value['updatedAt'];
26 | this.CreatedAt = value['createdAt'];
27 | this.HolidayDate = new DateTime.fromMillisecondsSinceEpoch(value['date'] * 1000);
28 |
29 | /*this.HolidayDate =
30 | new DateTime.fromMillisecondsSinceEpoch(this.Date, isUtc: true);
31 | print("Date : ${value['date']}");
32 | print("HolidayDate : ${this.HolidayDate}");*/
33 |
34 | /*var date = new DateTime.fromMillisecondsSinceEpoch(value['date'] * 1000);
35 | print("finalDate : $date");*/
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/utils/constants.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | final dateBackgroundColor = const Color(0xff324756);
6 | final holidayTodayBackgroundColor = const Color(0xffD97D54);
7 | final holidayNextBackgroundColor = const Color(0xffB9B2A2);
8 | final holidayGlobalBackgroundColor = const Color(0xffE6E6E6);
9 | final holidayTextColor = const Color(0xff1B1C20);
10 | final activeColor = const Color(0xff6f6f6f);
--------------------------------------------------------------------------------
/lib/utils/network_check.dart:
--------------------------------------------------------------------------------
1 | import 'package:connectivity/connectivity.dart';
2 |
3 | class NetworkCheck {
4 | Future check() async {
5 | var connectivityResult = await (Connectivity().checkConnectivity());
6 | if (connectivityResult == ConnectivityResult.mobile) {
7 | return true;
8 | } else if (connectivityResult == ConnectivityResult.wifi) {
9 | return true;
10 | }
11 | return false;
12 | }
13 |
14 | dynamic checkInternet(Function func) {
15 | check().then((internet) {
16 | if (internet != null && internet) {
17 | func(true);
18 | }
19 | else{
20 | func(false);
21 | }
22 | });
23 | }
24 | }
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.3.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.5"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | connectivity:
33 | dependency: "direct main"
34 | description:
35 | name: connectivity
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "0.4.4"
39 | cupertino_icons:
40 | dependency: "direct main"
41 | description:
42 | name: cupertino_icons
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "0.1.2"
46 | firebase_auth:
47 | dependency: "direct main"
48 | description:
49 | name: firebase_auth
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "0.11.1+12"
53 | firebase_core:
54 | dependency: transitive
55 | description:
56 | name: firebase_core
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "0.4.0+9"
60 | firebase_database:
61 | dependency: "direct main"
62 | description:
63 | name: firebase_database
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "3.0.7"
67 | firebase_messaging:
68 | dependency: "direct main"
69 | description:
70 | name: firebase_messaging
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "5.1.6"
74 | flutter:
75 | dependency: "direct main"
76 | description: flutter
77 | source: sdk
78 | version: "0.0.0"
79 | flutter_test:
80 | dependency: "direct dev"
81 | description: flutter
82 | source: sdk
83 | version: "0.0.0"
84 | intl:
85 | dependency: "direct main"
86 | description:
87 | name: intl
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "0.15.8"
91 | matcher:
92 | dependency: transitive
93 | description:
94 | name: matcher
95 | url: "https://pub.dartlang.org"
96 | source: hosted
97 | version: "0.12.5"
98 | meta:
99 | dependency: transitive
100 | description:
101 | name: meta
102 | url: "https://pub.dartlang.org"
103 | source: hosted
104 | version: "1.1.7"
105 | path:
106 | dependency: transitive
107 | description:
108 | name: path
109 | url: "https://pub.dartlang.org"
110 | source: hosted
111 | version: "1.6.4"
112 | pedantic:
113 | dependency: transitive
114 | description:
115 | name: pedantic
116 | url: "https://pub.dartlang.org"
117 | source: hosted
118 | version: "1.8.0+1"
119 | platform:
120 | dependency: transitive
121 | description:
122 | name: platform
123 | url: "https://pub.dartlang.org"
124 | source: hosted
125 | version: "2.2.1"
126 | quiver:
127 | dependency: transitive
128 | description:
129 | name: quiver
130 | url: "https://pub.dartlang.org"
131 | source: hosted
132 | version: "2.0.5"
133 | shared_preferences:
134 | dependency: "direct main"
135 | description:
136 | name: shared_preferences
137 | url: "https://pub.dartlang.org"
138 | source: hosted
139 | version: "0.5.3+4"
140 | sky_engine:
141 | dependency: transitive
142 | description: flutter
143 | source: sdk
144 | version: "0.0.99"
145 | source_span:
146 | dependency: transitive
147 | description:
148 | name: source_span
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.5.5"
152 | stack_trace:
153 | dependency: transitive
154 | description:
155 | name: stack_trace
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "1.9.3"
159 | stream_channel:
160 | dependency: transitive
161 | description:
162 | name: stream_channel
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "2.0.0"
166 | string_scanner:
167 | dependency: transitive
168 | description:
169 | name: string_scanner
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "1.0.5"
173 | term_glyph:
174 | dependency: transitive
175 | description:
176 | name: term_glyph
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "1.1.0"
180 | test_api:
181 | dependency: transitive
182 | description:
183 | name: test_api
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "0.2.5"
187 | typed_data:
188 | dependency: transitive
189 | description:
190 | name: typed_data
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "1.1.6"
194 | vector_math:
195 | dependency: transitive
196 | description:
197 | name: vector_math
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "2.0.8"
201 | sdks:
202 | dart: ">=2.2.2 <3.0.0"
203 | flutter: ">=1.5.0 <2.0.0"
204 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_occassions
2 | description: A new Flutter application.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter:
21 | sdk: flutter
22 |
23 | # The following adds the Cupertino Icons font to your application.
24 | # Use with the CupertinoIcons class for iOS style icons.
25 | cupertino_icons: ^0.1.2
26 | firebase_database: ^3.0.3
27 | firebase_auth: ^0.11.1+7
28 | shared_preferences: ^0.5.3+1
29 | intl: ^0.15.8
30 | firebase_messaging: 5.1.6
31 | connectivity: ^0.4.3+2
32 |
33 | dev_dependencies:
34 | flutter_test:
35 | sdk: flutter
36 |
37 |
38 | # For information on the generic Dart part of this file, see the
39 | # following page: https://dart.dev/tools/pub/pubspec
40 |
41 | # The following section is specific to Flutter.
42 | flutter:
43 |
44 | # The following line ensures that the Material Icons font is
45 | # included with your application, so that you can use the icons in
46 | # the material Icons class.
47 | uses-material-design: true
48 |
49 | # To add assets to your application, add an assets section, like this:
50 | # assets:
51 | # - images/a_dot_burr.jpeg
52 | # - images/a_dot_ham.jpeg
53 |
54 | # An image asset can refer to one or more resolution-specific "variants", see
55 | # https://flutter.dev/assets-and-images/#resolution-aware.
56 |
57 | # For details regarding adding assets from package dependencies, see
58 | # https://flutter.dev/assets-and-images/#from-packages
59 |
60 | # To add custom fonts to your application, add a fonts section here,
61 | # in this "flutter" section. Each entry in this list should have a
62 | # "family" key with the font family name, and a "fonts" key with a
63 | # list giving the asset and other descriptors for the font. For
64 | # example:
65 | # fonts:
66 | # - family: Schyler
67 | # fonts:
68 | # - asset: fonts/Schyler-Regular.ttf
69 | # - asset: fonts/Schyler-Italic.ttf
70 | # style: italic
71 | # - family: Trajan Pro
72 | # fonts:
73 | # - asset: fonts/TrajanPro.ttf
74 | # - asset: fonts/TrajanPro_Bold.ttf
75 | # weight: 700
76 | #
77 | # For details regarding fonts from package dependencies,
78 | # see https://flutter.dev/custom-fonts/#from-packages
79 |
--------------------------------------------------------------------------------
/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:flutter_occassions/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 |
--------------------------------------------------------------------------------