├── android ├── settings_aar.gradle ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── 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 │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── flutter_booking_app_event_creator │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 29.png │ │ │ ├── 40.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 180.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-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ └── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme └── .gitignore ├── lib ├── utils │ ├── styles.dart │ └── constants.dart ├── views │ ├── pages │ │ ├── MainScreen │ │ │ ├── Widgets │ │ │ │ ├── drawerDivider_widget.dart │ │ │ │ ├── overAllStatsTile_widget.dart │ │ │ │ ├── EventItem │ │ │ │ │ ├── eventName_widget.dart │ │ │ │ │ ├── activeEventTile_widget.dart │ │ │ │ │ ├── cancelledEventTile_widget.dart │ │ │ │ │ ├── eventStatusText_widget.dart │ │ │ │ │ ├── addEventButton_widget.dart │ │ │ │ │ ├── detailsText_widget.dart │ │ │ │ │ ├── dateAndTime_widget.dart │ │ │ │ │ └── locationAndEdit_widget.dart │ │ │ │ ├── aboutTheUserTile_widget.dart │ │ │ │ ├── pastEventTile_widget.dart │ │ │ │ ├── createNewEventsTile_widget.dart │ │ │ │ └── drawerHeader_widget.dart │ │ │ └── mainScreen_screen.dart │ │ ├── SettingsScreen │ │ │ ├── Widgets │ │ │ │ ├── divider_widget.dart │ │ │ │ ├── demo_widget.dart │ │ │ │ ├── Logout │ │ │ │ │ └── logout_widget.dart │ │ │ │ └── ShareTheApp │ │ │ │ │ └── shareTheApp_widget.dart │ │ │ └── settingScreen_screen.dart │ │ ├── ActiveEvents │ │ │ ├── EventDetails_screen │ │ │ │ ├── Widgets │ │ │ │ │ ├── dividerEventDetail_widget.dart │ │ │ │ │ ├── editEventText_widget.dart │ │ │ │ │ └── itemTextEventDetails_widgets.dart │ │ │ │ └── eventDetails_screen.dart │ │ │ ├── Widgets │ │ │ │ ├── noEventsExists.dart │ │ │ │ ├── noActiveOrCancelledItem_widget.dart │ │ │ │ └── activeListItem_widget.dart │ │ │ └── activeEvents_screen.dart │ │ ├── LoginScreen │ │ │ ├── Widgets │ │ │ │ ├── newuserText_widget.dart │ │ │ │ ├── signUpButton_widget.dart │ │ │ │ ├── loginWithGoogleButton_widget.dart │ │ │ │ └── loginButton_widget.dart │ │ │ └── login_screen.dart │ │ ├── EditName │ │ │ ├── Widgets │ │ │ │ ├── userNameText_widget.dart │ │ │ │ ├── editButton_widget.dart │ │ │ │ └── txtField_inputDecoration.dart │ │ │ └── editName_screen.dart │ │ ├── SignUpScreen │ │ │ ├── Widgets │ │ │ │ ├── alreadyAUserText_widget.dart │ │ │ │ ├── loginButton_widget.dart │ │ │ │ ├── signUpWithGoogleButton_widget.dart │ │ │ │ └── signUpButtonSingUpScreen_widget.dart │ │ │ └── signUp_screen.dart │ │ ├── EditEvent │ │ │ └── Widgets │ │ │ │ └── itemText_widget.dart │ │ ├── AboutTheApp │ │ │ ├── Widgets │ │ │ │ ├── appIcon_widget.dart │ │ │ │ ├── versionsText_widget.dart │ │ │ │ └── aboutTheAppText_widget.dart │ │ │ └── aboutTheApp_screen.dart │ │ ├── AddEventsScreen │ │ │ └── Widgets │ │ │ │ ├── chooseText_widget.dart │ │ │ │ ├── linkAreNotEditableText_widget.dart │ │ │ │ └── textForField_inputDecoration.dart │ │ ├── AboutTheUser │ │ │ ├── Widgets │ │ │ │ ├── editYourUserNameText_widget.dart │ │ │ │ ├── emailText_widget.dart │ │ │ │ └── nameText_widget.dart │ │ │ └── aboutTheUser_screen.dart │ │ ├── ContactUs │ │ │ ├── Widgets │ │ │ │ ├── overwrittenText_widget.dart │ │ │ │ └── contactUs_widget.dart │ │ │ └── contactUs_screen.dart │ │ ├── FrequentlyAskedQuestions │ │ │ └── Widgets │ │ │ │ ├── answerText_widget.dart │ │ │ │ └── questionText_widget.dart │ │ ├── LoginSignUpScreen │ │ │ ├── Widget │ │ │ │ ├── backgroundCont_widget.dart │ │ │ │ ├── loginButton_widget.dart │ │ │ │ ├── signUpButton_widget.dart │ │ │ │ └── imageCircle_widget.dart │ │ │ └── loginSignup_screen.dart │ │ ├── HelpAndSupport │ │ │ ├── helpAndSupport_screen.dart │ │ │ └── Widgets │ │ │ │ └── helpAndSupport_body_widget.dart │ │ ├── WhatsNew │ │ │ ├── Widgets │ │ │ │ └── whatsNewItem_widget.dart │ │ │ └── whatsNew_screen.dart │ │ ├── NoInternetConnection │ │ │ └── noInternetConnection_screen.dart │ │ ├── PastEvents │ │ │ └── pastEvents_screen.dart │ │ ├── CancelledEvents │ │ │ └── cancelledEvents_screen.dart │ │ ├── OverallStats │ │ │ └── overallStats_screen.dart │ │ └── RegisteredUsers │ │ │ └── registeredUsers_screen.dart │ └── auth │ │ ├── login_auth.dart │ │ ├── signup_auth.dart │ │ └── googleLogin_auth.dart ├── repositories │ ├── numericCheck.dart │ ├── changeUserDisplayName.dart │ ├── subToTopic_fcm.dart │ ├── mailTo_harsh.dart │ └── logoutUser.dart ├── api │ └── WhatsNew │ │ └── whatsNew_api.dart ├── responses │ ├── checkConnection.dart │ ├── createBlankDataEntry.dart │ ├── sendFcmMessage.dart │ ├── addProblemsToFireStore.dart │ ├── updateEventDataToFireStore.dart │ └── addDataToFireStore.dart ├── models │ ├── newEvent_model.dart │ └── databaseModel.json ├── blocs │ └── mainScreen_bloc.dart └── main.dart ├── .metadata ├── .gitignore ├── test └── widget_test.dart ├── README.md └── pubspec.yaml /android/settings_aar.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /lib/utils/styles.dart: -------------------------------------------------------------------------------- 1 | // Hold all the variables/values related to styles which won't be changing throughout the app. 2 | 3 | class Styles {} 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/android/app/src/main/res/drawable/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/drawerDivider_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget drawerDivider_widget() { 4 | return Divider( 5 | color: Colors.orange, 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /lib/views/pages/SettingsScreen/Widgets/divider_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget dividerSettingScreen() { 4 | return Divider( 5 | color: Colors.black, 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harshkumarkhatri/Booking-App-Event-Creator/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/views/pages/ActiveEvents/EventDetails_screen/Widgets/dividerEventDetail_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget dividerEventDetail() { 4 | return Divider( 5 | color: Colors.black, 6 | height: 20.0, 7 | ); 8 | } 9 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_booking_app_event_creator/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_booking_app_event_creator 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /lib/repositories/numericCheck.dart: -------------------------------------------------------------------------------- 1 | // This function checks if the output generated is of form number or not. 2 | 3 | bool isNumeric(String result) { 4 | if (result == null) { 5 | return false; 6 | } 7 | return double.tryParse(result) != null; 8 | } 9 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Dec 17 22:25:02 IST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/api/WhatsNew/whatsNew_api.dart: -------------------------------------------------------------------------------- 1 | // Fetches the data related to whats new features are added in the app from the aws api 2 | import 'package:flutter_booking_app_event_creator/utils/impData.dart'; 3 | import 'package:http/http.dart' as http; 4 | 5 | Future fetchAlbum() { 6 | return http.get(impData().whatsNewAPIURL); 7 | } 8 | -------------------------------------------------------------------------------- /.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: 14e22d7a43f2c760f5eeaaa3d556308285bae9e8 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /lib/views/pages/LoginScreen/Widgets/newuserText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget newUserText() { 4 | return Container( 5 | child: Center( 6 | child: Text( 7 | "New User?", 8 | style: TextStyle( 9 | color: Colors.orange, 10 | ), 11 | ), 12 | ), 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /lib/views/pages/EditName/Widgets/userNameText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget userNameText_widget(String userName) { 4 | return Container( 5 | child: Text( 6 | userName, 7 | style: TextStyle( 8 | fontSize: 24.0, 9 | fontWeight: FontWeight.w600, 10 | ), 11 | ), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /lib/views/pages/SignUpScreen/Widgets/alreadyAUserText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget alreadyAUserText() { 4 | return Container( 5 | child: Center( 6 | child: Text( 7 | "Already a User?", 8 | style: TextStyle( 9 | color: Colors.black, 10 | ), 11 | ), 12 | ), 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /lib/views/pages/EditEvent/Widgets/itemText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget itemText(String text) { 4 | return Container( 5 | alignment: Alignment.centerLeft, 6 | child: Text( 7 | text, 8 | style: TextStyle( 9 | fontSize: 18.0, 10 | fontWeight: FontWeight.w500, 11 | ), 12 | ), 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /lib/views/pages/AboutTheApp/Widgets/appIcon_widget.dart: -------------------------------------------------------------------------------- 1 | // App icon widget for about the app screen 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | Widget appIcon_widget() { 6 | return Container( 7 | height: 128.0, 8 | width: 128.0, 9 | decoration: BoxDecoration( 10 | shape: BoxShape.circle, 11 | color: Colors.black, 12 | ), 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/repositories/changeUserDisplayName.dart: -------------------------------------------------------------------------------- 1 | // This change the name of the user and set the name to new name entered through the text field. 2 | 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | 5 | void changeUserDisplayName(dispName) { 6 | final FirebaseAuth auth = FirebaseAuth.instance; 7 | 8 | final User _user = auth.currentUser; 9 | _user.updateProfile(displayName: dispName); 10 | } 11 | -------------------------------------------------------------------------------- /lib/views/pages/ActiveEvents/EventDetails_screen/Widgets/editEventText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget editEventText_widget() { 4 | return Container( 5 | alignment: Alignment.center, 6 | child: Text( 7 | "Events can be edited clicking the edit/pen icon on bottom right on main screen.", 8 | textAlign: TextAlign.center, 9 | ), 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/repositories/subToTopic_fcm.dart: -------------------------------------------------------------------------------- 1 | // This function add all the event creators to a particular topic 'eventCreators' and then we can send FCM notifications to this topic 2 | 3 | import 'package:firebase_messaging/firebase_messaging.dart'; 4 | 5 | final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); 6 | 7 | void subToTopic_fcm() { 8 | _firebaseMessaging.subscribeToTopic('eventCreators'); 9 | } 10 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/responses/checkConnection.dart: -------------------------------------------------------------------------------- 1 | // This functions checks if a user is connected to wifi or mobile network 2 | 3 | import 'package:connectivity/connectivity.dart'; 4 | 5 | Future checkConn() async { 6 | var connectivityResult = await (Connectivity().checkConnectivity()); 7 | if (connectivityResult == ConnectivityResult.mobile) { 8 | return "mobile"; 9 | } else if (connectivityResult == ConnectivityResult.wifi) { 10 | return "wifi"; 11 | } 12 | return "none"; 13 | } 14 | -------------------------------------------------------------------------------- /lib/views/pages/AddEventsScreen/Widgets/chooseText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget chooseText(String text) { 4 | return Padding( 5 | padding: const EdgeInsets.only(top: 12.0), 6 | child: Container( 7 | alignment: Alignment.centerLeft, 8 | padding: EdgeInsets.only(top: 6.0), 9 | child: Text( 10 | text, 11 | style: TextStyle( 12 | color: Colors.black, 13 | ), 14 | ), 15 | ), 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /lib/repositories/mailTo_harsh.dart: -------------------------------------------------------------------------------- 1 | // This send a mail to the specified email id. The email will be sent if an event creator needs some extra support for his event. 2 | 3 | import 'package:mailto/mailto.dart'; 4 | import 'package:url_launcher/url_launcher.dart'; 5 | 6 | launchMailto() async { 7 | final mailtoLink = Mailto( 8 | to: ['mailharshkhatri@gmai.com'], 9 | subject: 'Help & Support', 10 | ); 11 | 12 | // This is done with the help of URL launcher 13 | await launch('$mailtoLink'); 14 | } 15 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/repositories/logoutUser.dart: -------------------------------------------------------------------------------- 1 | // Logs the user out and sets the email and uid back to null 2 | 3 | import 'package:flutter_booking_app_event_creator/views/pages/LoginSignUpScreen/loginSignup_screen.dart'; 4 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | void loggingOut() async { 8 | final FlutterSecureStorage storage = FlutterSecureStorage(); 9 | storage.write(key: "email", value: null); 10 | storage.write(key: "uid", value: null); 11 | Get.offAll(LoginSignUpScreen()); 12 | } 13 | -------------------------------------------------------------------------------- /lib/views/pages/AboutTheUser/Widgets/editYourUserNameText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/utils/constants.dart'; 3 | 4 | Widget editYourUserNameText_widget() { 5 | return Padding( 6 | padding: const EdgeInsets.only(top: 18.0), 7 | child: Text( 8 | Constants.editYourUserNameText, 9 | textAlign: TextAlign.center, 10 | style: TextStyle( 11 | color: Colors.black, 12 | fontSize: 16.0, 13 | fontWeight: FontWeight.w500, 14 | ), 15 | ), 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /lib/views/pages/ActiveEvents/Widgets/noEventsExists.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget noEventsExists(BuildContext context, String text) { 4 | return Container( 5 | height: MediaQuery.of(context).size.height, 6 | width: MediaQuery.of(context).size.width, 7 | decoration: BoxDecoration(color: Colors.orange), 8 | alignment: Alignment.topCenter, 9 | child: Text( 10 | text, 11 | style: TextStyle( 12 | color: Colors.black, 13 | fontSize: 18.0, 14 | fontWeight: FontWeight.w600, 15 | ), 16 | ), 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/overAllStatsTile_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/OverallStats/overallStats_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget overAllStateTile() { 6 | return ListTile( 7 | tileColor: Colors.black, 8 | title: Text( 9 | 'Overall Stats', 10 | style: TextStyle( 11 | color: Colors.orange, 12 | fontWeight: FontWeight.w600, 13 | ), 14 | ), 15 | onTap: () { 16 | Get.to(OverallStats()); 17 | }, 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /lib/views/pages/AboutTheApp/Widgets/versionsText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/utils/constants.dart'; 3 | 4 | Widget versionText_widget() { 5 | return Padding( 6 | padding: const EdgeInsets.only(top: 36.0), 7 | child: Container( 8 | child: Text( 9 | Constants.versionText, 10 | style: TextStyle( 11 | color: Colors.black, 12 | fontSize: 14.0, 13 | fontWeight: FontWeight.w600, 14 | letterSpacing: 1.3, 15 | ), 16 | ), 17 | ), 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/EventItem/eventName_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Widget eventName_widget(dynamic snapshot, int index, String email) { 5 | FieldPath field = FieldPath.fromString(email); 6 | 7 | return Container( 8 | child: Text( 9 | snapshot.data["${index + 1}_${field.hashCode}"]['eventName'].toString(), 10 | style: TextStyle( 11 | color: Colors.orange, 12 | fontSize: 18.0, 13 | fontWeight: FontWeight.w700, 14 | ), 15 | ), 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /lib/views/pages/AddEventsScreen/Widgets/linkAreNotEditableText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/utils/constants.dart'; 3 | 4 | Widget linkAreNotEditablet_widget() { 5 | return Container( 6 | alignment: Alignment.centerLeft, 7 | padding: EdgeInsets.only( 8 | top: 4.0, 9 | ), 10 | child: Text( 11 | Constants.linkAreNotEditableText, 12 | style: TextStyle( 13 | color: Colors.black, 14 | fontSize: 14.0, 15 | fontWeight: FontWeight.w500, 16 | ), 17 | ), 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /lib/views/pages/ActiveEvents/Widgets/noActiveOrCancelledItem_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget noActiveOrCancelleditem_widget(String text) { 4 | return Container( 5 | decoration: BoxDecoration( 6 | color: Colors.orange, 7 | ), 8 | padding: EdgeInsets.only(top: 15.0), 9 | alignment: Alignment.topCenter, 10 | child: Text( 11 | text, 12 | textAlign: TextAlign.center, 13 | style: TextStyle( 14 | color: Colors.black, 15 | fontSize: 18.0, 16 | fontWeight: FontWeight.w600, 17 | ), 18 | ), 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/aboutTheUserTile_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/AboutTheUser/aboutTheUser_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget aboutTheUserTile() { 6 | return ListTile( 7 | tileColor: Colors.black, 8 | title: Text( 9 | 'About the User', 10 | style: TextStyle( 11 | color: Colors.orange, 12 | fontWeight: FontWeight.w600, 13 | ), 14 | ), 15 | onTap: () { 16 | Get.back(); 17 | Get.to(AboutTheUser()); 18 | }, 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/pastEventTile_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/PastEvents/pastEvents_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget pastEventTile() { 6 | return ListTile( 7 | tileColor: Colors.black, 8 | title: Text( 9 | ' Past Events', 10 | style: TextStyle( 11 | color: Colors.orange, 12 | fontWeight: FontWeight.w600, 13 | ), 14 | ), 15 | onTap: () { 16 | Get.back(); 17 | Get.to(PastEventsScreen()); 18 | }, 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/createNewEventsTile_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/AddEventsScreen/addEvents_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget createNewEventTile() { 6 | return ListTile( 7 | tileColor: Colors.black, 8 | title: Text( 9 | 'Create New Events', 10 | style: TextStyle( 11 | color: Colors.orange, 12 | fontWeight: FontWeight.w600, 13 | ), 14 | ), 15 | onTap: () { 16 | Get.back(); 17 | Get.to(AddEvents()); 18 | }, 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /lib/views/pages/ContactUs/Widgets/overwrittenText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget overwrittenText_widget() { 4 | return Padding( 5 | padding: const EdgeInsets.only(top: 12.0), 6 | child: Container( 7 | child: Text( 8 | "At a time you can only have one contact request.\nMaking a new contact request will overwrite your current request.", 9 | style: TextStyle( 10 | color: Colors.black, 11 | fontSize: 16.0, 12 | fontWeight: FontWeight.w500, 13 | ), 14 | textAlign: TextAlign.center, 15 | ), 16 | ), 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/EventItem/activeEventTile_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/activeEvents_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget activeEventTile() { 6 | return ListTile( 7 | tileColor: Colors.black, 8 | title: Text( 9 | ' Active Events', 10 | style: TextStyle( 11 | color: Colors.orange, 12 | fontWeight: FontWeight.w600, 13 | ), 14 | ), 15 | onTap: () { 16 | Get.back(); 17 | Get.to(ActiveEventsScreen()); 18 | }, 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/EventItem/cancelledEventTile_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/CancelledEvents/cancelledEvents_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget cancelledEventTile() { 6 | return ListTile( 7 | tileColor: Colors.black, 8 | title: Text( 9 | ' Cancelled Events', 10 | style: TextStyle( 11 | color: Colors.orange, 12 | fontWeight: FontWeight.w600, 13 | ), 14 | ), 15 | onTap: () { 16 | Get.back(); 17 | Get.to(CancelledEventsScreen()); 18 | }, 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /lib/views/pages/FrequentlyAskedQuestions/Widgets/answerText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget answerText_widget(String text) { 4 | return new AnimatedContainer( 5 | decoration: BoxDecoration( 6 | color: Colors.black, 7 | ), 8 | duration: const Duration(milliseconds: 120), 9 | child: Padding( 10 | padding: const EdgeInsets.all(8.0), 11 | child: new Text( 12 | text, 13 | style: TextStyle( 14 | color: Colors.orange, 15 | fontSize: 16.0, 16 | fontWeight: FontWeight.w300, 17 | letterSpacing: 0.6, 18 | height: 1.1, 19 | ), 20 | ), 21 | ), 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /lib/views/pages/AboutTheApp/Widgets/aboutTheAppText_widget.dart: -------------------------------------------------------------------------------- 1 | // About the app text widget for about the app screen 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_booking_app_event_creator/utils/constants.dart'; 5 | 6 | Widget aboutTheAppText_widget() { 7 | return Padding( 8 | padding: const EdgeInsets.only(top: 8.0), 9 | child: Container( 10 | child: Text( 11 | Constants.aboutTheAppText, 12 | style: TextStyle( 13 | color: Colors.black, 14 | fontSize: 20.0, 15 | fontWeight: FontWeight.w600, 16 | letterSpacing: 1.4, 17 | height: 1.5, 18 | ), 19 | textAlign: TextAlign.center, 20 | ), 21 | ), 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /lib/responses/createBlankDataEntry.dart: -------------------------------------------------------------------------------- 1 | // This function creates a new blank data entry as soon as the user logs into the app 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | CollectionReference users = Firestore.instance.collection("eventList"); 8 | 9 | void createBlankDataEntry( 10 | uid, 11 | ) async { 12 | try { 13 | final FirebaseAuth auth = FirebaseAuth.instance; 14 | final User _user = auth.currentUser; 15 | 16 | users.document(uid).set({}); 17 | 18 | // Get.back(); 19 | } catch (e) { 20 | Get.snackbar("Error", 21 | "Unable to add a new event at the moment.\nPleae try after some time"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/views/pages/LoginSignUpScreen/Widget/backgroundCont_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget backgroundContainers(context) { 4 | return Container( 5 | height: MediaQuery.of(context).size.height, 6 | width: MediaQuery.of(context).size.width, 7 | child: Column( 8 | children: [ 9 | Container( 10 | alignment: Alignment.bottomCenter, 11 | color: Colors.orange, 12 | height: 225.0, 13 | child: Container( 14 | height: 65.0, 15 | width: 65.0, 16 | ), 17 | ), 18 | Expanded( 19 | child: Container( 20 | color: Colors.black, 21 | ), 22 | ), 23 | ], 24 | ), 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/EventItem/eventStatusText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Widget eventStatusText_widget(dynamic snapshot, int index, String email) { 5 | FieldPath field = FieldPath.fromString(email); 6 | 7 | return Padding( 8 | padding: const EdgeInsets.only(top: 4.0), 9 | child: Container( 10 | child: Text( 11 | "Event Status:-" + 12 | snapshot.data["${index + 1}_${field.hashCode}"]['eventStatus'] 13 | .toString() 14 | .toUpperCase(), 15 | style: TextStyle( 16 | color: Colors.orange, 17 | fontWeight: FontWeight.w700, 18 | ), 19 | ), 20 | ), 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /lib/models/newEvent_model.dart: -------------------------------------------------------------------------------- 1 | // Demo model for how the new event should be like. 2 | 3 | class NewEventModel { 4 | final String contactEmail; 5 | final String date; 6 | final String eventCity; 7 | final String eventState; 8 | final String eventName; 9 | final String eventStatus; 10 | final String eventType; 11 | final String expectedAudience; 12 | final String fullUserName; 13 | final String phoneNumber; 14 | final String time; 15 | 16 | NewEventModel( 17 | this.contactEmail, 18 | this.date, 19 | this.eventCity, 20 | this.eventState, 21 | this.eventName, 22 | this.eventStatus, 23 | this.eventType, 24 | this.expectedAudience, 25 | this.fullUserName, 26 | this.phoneNumber, 27 | this.time); 28 | } 29 | -------------------------------------------------------------------------------- /lib/views/pages/AboutTheUser/Widgets/emailText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Widget emailText_widget(User user) { 5 | return Container( 6 | padding: EdgeInsets.only( 7 | top: 15.0, 8 | bottom: 15.0, 9 | left: 4.0, 10 | right: 4.0, 11 | ), 12 | alignment: Alignment.center, 13 | decoration: BoxDecoration( 14 | color: Colors.black, 15 | borderRadius: BorderRadius.circular( 16 | 14.0, 17 | ), 18 | ), 19 | child: Text( 20 | "Email:- " + user.email ?? "email", 21 | style: TextStyle( 22 | color: Colors.orange, 23 | fontSize: 18.0, 24 | fontWeight: FontWeight.w600, 25 | ), 26 | ), 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.4' 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 | -------------------------------------------------------------------------------- /lib/views/pages/EditName/Widgets/editButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget editButton_widget(BuildContext context) { 4 | return Padding( 5 | padding: const EdgeInsets.only(top: 15.0), 6 | child: Container( 7 | alignment: Alignment.center, 8 | height: 45.0, 9 | width: MediaQuery.of(context).size.width, 10 | decoration: BoxDecoration( 11 | color: Colors.black, 12 | borderRadius: BorderRadius.circular( 13 | 14.0, 14 | ), 15 | ), 16 | child: Text( 17 | "Edit", 18 | style: TextStyle( 19 | color: Colors.orange, 20 | fontSize: 18.0, 21 | fontWeight: FontWeight.w600, 22 | letterSpacing: 1.3, 23 | ), 24 | ), 25 | ), 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /lib/models/databaseModel.json: -------------------------------------------------------------------------------- 1 | 2 | 3 | { 4 | "_comment":"Demo Database model for how the database should look like", 5 | "uid":{ 6 | "1":{ 7 | "contactEmail":"", 8 | "date":"", 9 | "eventCity":"", 10 | "eventState":"", 11 | "eventType":"", 12 | "expectedAudience":"", 13 | "fullUserName":"", 14 | "phoneNumber":"", 15 | "eventStatus":"" 16 | }, 17 | "2":{ 18 | "contactEmail":"", 19 | "date":"", 20 | "eventCity":"", 21 | "eventState":"", 22 | "eventType":"", 23 | "expectedAudience":"", 24 | "fullUserName":"", 25 | "phoneNumber":"", 26 | "eventStatus":"" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /lib/views/pages/EditName/Widgets/txtField_inputDecoration.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | InputDecoration textField_inputDecoration() { 4 | return InputDecoration( 5 | border: OutlineInputBorder( 6 | borderSide: BorderSide( 7 | color: Colors.black, 8 | ), 9 | ), 10 | enabledBorder: OutlineInputBorder( 11 | borderSide: BorderSide( 12 | color: Colors.black, 13 | ), 14 | ), 15 | focusedErrorBorder: OutlineInputBorder( 16 | borderSide: BorderSide( 17 | color: Colors.black, 18 | ), 19 | ), 20 | focusedBorder: OutlineInputBorder( 21 | borderSide: BorderSide( 22 | color: Colors.black, 23 | ), 24 | ), 25 | icon: Icon( 26 | Icons.supervised_user_circle_outlined, 27 | ), 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /lib/views/pages/AddEventsScreen/Widgets/textForField_inputDecoration.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | InputDecoration textFormField_inputDecoration( 4 | String labelText, String helperText) { 5 | return InputDecoration( 6 | alignLabelWithHint: true, 7 | focusColor: Colors.black, 8 | enabledBorder: UnderlineInputBorder( 9 | borderSide: BorderSide(color: Colors.black), 10 | ), 11 | focusedBorder: UnderlineInputBorder( 12 | borderSide: BorderSide(color: Colors.black), 13 | ), 14 | border: UnderlineInputBorder( 15 | borderSide: BorderSide(color: Colors.black), 16 | ), 17 | labelText: labelText, 18 | labelStyle: TextStyle(color: Colors.black), 19 | helperText: helperText, 20 | errorStyle: TextStyle(color: Colors.black, fontSize: 16.0), 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /lib/views/pages/FrequentlyAskedQuestions/Widgets/questionText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget questionText_widget(String text) { 4 | return Container( 5 | decoration: BoxDecoration( 6 | color: Colors.black, 7 | ), 8 | alignment: Alignment.centerLeft, 9 | child: Padding( 10 | padding: EdgeInsets.all( 11 | 8.0, 12 | ), 13 | child: Row( 14 | children: [ 15 | Expanded( 16 | child: Text( 17 | text, 18 | style: TextStyle( 19 | fontSize: 18.0, 20 | color: Colors.orange, 21 | ), 22 | ), 23 | ), 24 | Icon( 25 | Icons.arrow_circle_down, 26 | color: Colors.orange, 27 | ), 28 | ], 29 | ), 30 | ), 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/EventItem/addEventButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/AddEventsScreen/addEvents_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget addEventButton() { 6 | return RaisedButton( 7 | onPressed: () { 8 | Get.to(AddEvents()); 9 | }, 10 | color: Colors.black, 11 | textColor: Colors.orange, 12 | shape: RoundedRectangleBorder( 13 | borderRadius: BorderRadius.circular( 14 | 14.0, 15 | ), 16 | ), 17 | elevation: 12.0, 18 | child: Container( 19 | child: Text( 20 | "Add event".toUpperCase(), 21 | style: TextStyle( 22 | fontSize: 16.0, 23 | fontWeight: FontWeight.w700, 24 | letterSpacing: 1.5, 25 | ), 26 | ), 27 | ), 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /lib/views/pages/AboutTheUser/Widgets/nameText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Widget nameText_widget(User user) { 5 | return Container( 6 | padding: EdgeInsets.only( 7 | top: 15.0, 8 | bottom: 15.0, 9 | left: 4.0, 10 | right: 4.0, 11 | ), 12 | alignment: Alignment.center, 13 | decoration: BoxDecoration( 14 | color: Colors.black, 15 | borderRadius: BorderRadius.circular( 16 | 14, 17 | ), 18 | ), 19 | child: Text( 20 | user.displayName == "" || user.displayName == null 21 | ? "Name:- " + "No display name found" 22 | : "Name:- " + user.displayName, 23 | style: TextStyle( 24 | color: Colors.orange, 25 | fontSize: 18.0, 26 | fontWeight: FontWeight.w600, 27 | ), 28 | ), 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/EventItem/detailsText_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/RegisteredUsers/registeredUsers_screen.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | Widget detailsText_widget(dynamic snapshot, int index, String email) { 7 | FieldPath field = FieldPath.fromString(email); 8 | 9 | return GestureDetector( 10 | onTap: () { 11 | Get.to(RegisteredUsers(snapshot, index, email)); 12 | }, 13 | child: Padding( 14 | padding: const EdgeInsets.only(top: 8.0), 15 | child: Container( 16 | child: Text( 17 | "Registered Users", 18 | style: TextStyle( 19 | color: Colors.orange, 20 | fontWeight: FontWeight.w700, 21 | fontSize: 20.0, 22 | ), 23 | ), 24 | ), 25 | ), 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/drawerHeader_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget drawerHeader(String email) { 4 | return Container( 5 | height: 80.0, 6 | child: DrawerHeader( 7 | child: Container( 8 | child: Column( 9 | crossAxisAlignment: CrossAxisAlignment.start, 10 | mainAxisAlignment: MainAxisAlignment.spaceAround, 11 | children: [ 12 | Flexible( 13 | child: Text( 14 | email ?? "Email", 15 | style: TextStyle( 16 | color: Colors.black, 17 | fontSize: 16.0, 18 | fontWeight: FontWeight.w600, 19 | ), 20 | overflow: TextOverflow.fade, 21 | ), 22 | ), 23 | ], 24 | ), 25 | ), 26 | ), 27 | decoration: BoxDecoration( 28 | color: Colors.orange, 29 | ), 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /lib/views/pages/SettingsScreen/Widgets/demo_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | Widget demoWidget(IconData icon, String text, Widget page) { 5 | return GestureDetector( 6 | behavior: HitTestBehavior.opaque, 7 | onTap: () { 8 | Get.to(page); 9 | }, 10 | child: Container( 11 | alignment: Alignment.centerLeft, 12 | height: 45.0, 13 | child: Row( 14 | children: [ 15 | Padding( 16 | padding: const EdgeInsets.only(right: 15.0), 17 | child: Icon(icon), 18 | ), 19 | Text( 20 | text, 21 | style: TextStyle( 22 | fontSize: 18.0, 23 | fontWeight: FontWeight.w600, 24 | ), 25 | ), 26 | Spacer(), 27 | Icon( 28 | Icons.arrow_forward_ios, 29 | ), 30 | ], 31 | ), 32 | ), 33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /lib/views/pages/ContactUs/Widgets/contactUs_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget contactUs_widget(BuildContext context) { 4 | return Container( 5 | width: MediaQuery.of(context).size.width, 6 | height: 55.0, 7 | decoration: BoxDecoration( 8 | borderRadius: BorderRadius.circular(12), 9 | gradient: LinearGradient( 10 | begin: Alignment.bottomCenter, 11 | end: Alignment.topCenter, 12 | colors: [ 13 | Colors.black.withOpacity(0.6), 14 | Colors.black.withOpacity(0.7), 15 | Colors.black.withOpacity(0.8), 16 | ], 17 | ), 18 | ), 19 | child: Center( 20 | child: Text( 21 | "Submit", 22 | style: TextStyle( 23 | fontSize: 32.0, 24 | fontWeight: FontWeight.w700, 25 | letterSpacing: 1.6, 26 | color: Colors.orange.withOpacity(0.6), 27 | ), 28 | ), 29 | ), 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /lib/views/auth/login_auth.dart: -------------------------------------------------------------------------------- 1 | // This adds login authentication with email and pasword in our app. 2 | 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 5 | 6 | Future signin(email, password, formKey) async { 7 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance; 8 | final formState = formKey.currentState; 9 | 10 | // Validating formstate 11 | if (formState.validate()) { 12 | formState.save(); 13 | 14 | // Trying to log in 15 | try { 16 | UserCredential result = (await _firebaseAuth.signInWithEmailAndPassword( 17 | email: email, password: password)); 18 | 19 | // Flutter secure storage 20 | final FlutterSecureStorage storage = FlutterSecureStorage(); 21 | storage.write(key: "email", value: result.user.email); 22 | storage.write(key: "uid", value: result.user.uid); 23 | 24 | return "Success"; 25 | } catch (e) { 26 | return "Fail"; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Google services file for ios 44 | ios/Runner/GoogleService-Info.plist 45 | 46 | # Google services file for android 47 | android/app/google-services.json 48 | 49 | # FCM key and API urls's 50 | lib/utils/impData.dart -------------------------------------------------------------------------------- /lib/views/pages/ActiveEvents/EventDetails_screen/Widgets/itemTextEventDetails_widgets.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget itemTextEventDetails_widget(String item, String contactEmail) { 4 | return Row( 5 | children: [ 6 | Container( 7 | child: Text( 8 | item, 9 | maxLines: 9, 10 | style: TextStyle( 11 | color: Colors.black, 12 | fontSize: 18.0, 13 | fontWeight: FontWeight.w500, 14 | ), 15 | overflow: TextOverflow.ellipsis, 16 | ), 17 | ), 18 | Spacer(), 19 | Flexible( 20 | child: Container( 21 | child: Text( 22 | contactEmail, 23 | maxLines: 9, 24 | overflow: TextOverflow.ellipsis, 25 | style: TextStyle( 26 | color: Colors.black, 27 | fontSize: 18.0, 28 | fontWeight: FontWeight.w500, 29 | ), 30 | ), 31 | ), 32 | ) 33 | ], 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /lib/views/pages/HelpAndSupport/helpAndSupport_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/HelpAndSupport/Widgets/helpAndSupport_body_widget.dart'; 3 | 4 | class HelpAndSupportScreen extends StatefulWidget { 5 | @override 6 | _HelpAndSupportScreenState createState() => _HelpAndSupportScreenState(); 7 | } 8 | 9 | class _HelpAndSupportScreenState extends State { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | appBar: AppBar( 14 | backgroundColor: Colors.black.withOpacity( 15 | 0.9, 16 | ), 17 | iconTheme: IconThemeData( 18 | color: Colors.orange, 19 | ), 20 | centerTitle: true, 21 | title: Text( 22 | "Help & Support", 23 | style: TextStyle( 24 | color: Colors.orange, 25 | ), 26 | ), 27 | ), 28 | body: helpAndSupport_body_widget(context), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/views/pages/SettingsScreen/Widgets/Logout/logout_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/repositories/logoutUser.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget logout_widget(IconData icon, String text) { 6 | return GestureDetector( 7 | behavior: HitTestBehavior.opaque, 8 | onTap: () { 9 | loggingOut(); 10 | }, 11 | child: Container( 12 | alignment: Alignment.centerLeft, 13 | height: 45.0, 14 | child: Row( 15 | children: [ 16 | Padding( 17 | padding: const EdgeInsets.only(right: 15.0), 18 | child: Icon(icon), 19 | ), 20 | Text( 21 | text, 22 | style: TextStyle( 23 | fontSize: 18.0, 24 | fontWeight: FontWeight.w600, 25 | ), 26 | ), 27 | Spacer(), 28 | Icon( 29 | Icons.arrow_forward_ios, 30 | ), 31 | ], 32 | ), 33 | ), 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/responses/sendFcmMessage.dart: -------------------------------------------------------------------------------- 1 | // This function sends a FCM notifications to the users who are subscribed to ;eventCreators' topic. 2 | 3 | import 'dart:convert'; 4 | import 'package:flutter_booking_app_event_creator/utils/impData.dart'; 5 | import 'package:http/http.dart'; 6 | 7 | Future sendFcmMessage(String title, String message) async { 8 | try { 9 | var url = 'https://fcm.googleapis.com/fcm/send'; 10 | var header = { 11 | "Content-Type": "application/json", 12 | "Authorization": "key=${impData().fcmKey}", 13 | }; 14 | var request = { 15 | "notification": { 16 | "title": title, 17 | "text": message, 18 | "sound": "default", 19 | "color": "#990000", 20 | }, 21 | "priority": "high", 22 | "to": "/topics/eventCreators", 23 | }; 24 | 25 | var client = new Client(); 26 | var response = 27 | await client.post(url, headers: header, body: json.encode(request)); 28 | return true; 29 | } catch (e, s) { 30 | return false; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/views/auth/signup_auth.dart: -------------------------------------------------------------------------------- 1 | // This adds the sign up with email and password in our app. 2 | 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter_booking_app_event_creator/responses/createBlankDataEntry.dart'; 5 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 6 | 7 | Future signUp(email, password, formKey) async { 8 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance; 9 | final formState = formKey.currentState; 10 | if (formState.validate()) { 11 | formState.save(); 12 | 13 | // Trying to sign up 14 | try { 15 | UserCredential result = (await _firebaseAuth 16 | .createUserWithEmailAndPassword(email: email, password: password)); 17 | 18 | final FlutterSecureStorage storage = FlutterSecureStorage(); 19 | storage.write(key: "email", value: result.user.email); 20 | storage.write(key: "uid", value: result.user.uid); 21 | createBlankDataEntry(result.user.uid); 22 | return "Success"; 23 | } catch (e) { 24 | return "Fail"; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/views/pages/SettingsScreen/Widgets/ShareTheApp/shareTheApp_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:share/share.dart'; 3 | 4 | Widget shareTheApp_widget(IconData icon, String text) { 5 | return GestureDetector( 6 | behavior: HitTestBehavior.opaque, 7 | onTap: () { 8 | Share.share( 9 | "Want to create and manage your events at a place? \nDownload the app now: https://bit.ly/iamharsh", 10 | subject: "Managing Events Effectivly", 11 | ); 12 | }, 13 | child: Container( 14 | alignment: Alignment.centerLeft, 15 | height: 45.0, 16 | child: Row( 17 | children: [ 18 | Padding( 19 | padding: const EdgeInsets.only( 20 | right: 15.0, 21 | ), 22 | child: Icon(icon), 23 | ), 24 | Text( 25 | text, 26 | style: TextStyle( 27 | fontSize: 18.0, 28 | fontWeight: FontWeight.w600, 29 | ), 30 | ), 31 | Spacer(), 32 | Icon( 33 | Icons.arrow_forward_ios, 34 | ), 35 | ], 36 | ), 37 | ), 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /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_booking_app_event_creator/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 | -------------------------------------------------------------------------------- /lib/views/pages/LoginScreen/Widgets/signUpButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/SignUpScreen/signUp_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget signUpButton() { 6 | return GestureDetector( 7 | onTap: () { 8 | Get.off(SignUpScreen()); 9 | }, 10 | child: Padding( 11 | padding: const EdgeInsets.only( 12 | bottom: 58.0, 13 | top: 25.0, 14 | ), 15 | child: Container( 16 | height: 55.0, 17 | decoration: BoxDecoration( 18 | borderRadius: BorderRadius.circular(12), 19 | gradient: LinearGradient( 20 | begin: Alignment.bottomCenter, 21 | end: Alignment.topCenter, 22 | colors: [ 23 | Colors.orange[400], 24 | Colors.orange, 25 | Colors.orange[600], 26 | ], 27 | ), 28 | ), 29 | child: Center( 30 | child: Text( 31 | "Sign Up", 32 | style: TextStyle( 33 | fontSize: 32.0, 34 | fontWeight: FontWeight.w700, 35 | letterSpacing: 1.6, 36 | color: Colors.black, 37 | ), 38 | ), 39 | ), 40 | ), 41 | ), 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /lib/views/pages/LoginSignUpScreen/Widget/loginButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/LoginScreen/login_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget loginButton(context) { 6 | return GestureDetector( 7 | onTap: () { 8 | Get.to(LoginScreen()); 9 | }, 10 | child: Padding( 11 | padding: const EdgeInsets.only(bottom: 8.0), 12 | child: Container( 13 | height: 60.0, 14 | width: MediaQuery.of(context).size.width, 15 | decoration: BoxDecoration( 16 | borderRadius: BorderRadius.circular(12), 17 | gradient: LinearGradient( 18 | begin: Alignment.bottomCenter, 19 | end: Alignment.topCenter, 20 | colors: [ 21 | Colors.orange[400], 22 | Colors.orange, 23 | Colors.orange[600], 24 | ], 25 | ), 26 | ), 27 | child: Center( 28 | child: Text( 29 | "Login", 30 | style: TextStyle( 31 | color: Colors.black, 32 | fontSize: 24.0, 33 | fontWeight: FontWeight.w600, 34 | letterSpacing: 1.2, 35 | ), 36 | ), 37 | ), 38 | ), 39 | ), 40 | ); 41 | } 42 | -------------------------------------------------------------------------------- /lib/views/pages/SignUpScreen/Widgets/loginButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/LoginScreen/login_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget loginButtonSignUpScreen() { 6 | return GestureDetector( 7 | onTap: () { 8 | Get.off(LoginScreen()); 9 | }, 10 | child: Padding( 11 | padding: const EdgeInsets.only(bottom: 58.0, top: 25.0), 12 | child: Container( 13 | height: 55, 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(12.0), 16 | gradient: LinearGradient( 17 | begin: Alignment.bottomCenter, 18 | end: Alignment.topCenter, 19 | colors: [ 20 | Colors.black.withOpacity(0.4), 21 | Colors.black.withOpacity(0.5), 22 | Colors.black.withOpacity(0.6), 23 | ], 24 | ), 25 | ), 26 | child: Center( 27 | child: Text( 28 | "Login", 29 | style: TextStyle( 30 | fontSize: 32.0, 31 | fontWeight: FontWeight.w700, 32 | letterSpacing: 1.6, 33 | color: Colors.orange, 34 | ), 35 | ), 36 | ), 37 | ), 38 | ), 39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /lib/views/pages/LoginSignUpScreen/Widget/signUpButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/SignUpScreen/signUp_screen.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | Widget signupButton(context) { 6 | return GestureDetector( 7 | onTap: () { 8 | Get.to(SignUpScreen()); 9 | }, 10 | child: Padding( 11 | padding: const EdgeInsets.only(bottom: 8.0), 12 | child: Container( 13 | height: 60.0, 14 | width: MediaQuery.of(context).size.width, 15 | decoration: BoxDecoration( 16 | borderRadius: BorderRadius.circular(12), 17 | gradient: LinearGradient( 18 | begin: Alignment.bottomCenter, 19 | end: Alignment.topCenter, 20 | colors: [ 21 | Colors.orange[400], 22 | Colors.orange, 23 | Colors.orange[600], 24 | ], 25 | ), 26 | ), 27 | child: Center( 28 | child: Text( 29 | "Sign Up", 30 | style: TextStyle( 31 | color: Colors.black, 32 | fontSize: 24.0, 33 | fontWeight: FontWeight.w600, 34 | letterSpacing: 1.2, 35 | ), 36 | ), 37 | ), 38 | ), 39 | ), 40 | ); 41 | } 42 | -------------------------------------------------------------------------------- /lib/views/auth/googleLogin_auth.dart: -------------------------------------------------------------------------------- 1 | // This adds google login authentication for our app. 2 | 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 5 | import 'package:google_sign_in/google_sign_in.dart'; 6 | 7 | Future handleSignIn() async { 8 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance; 9 | 10 | try { 11 | GoogleSignInAccount googleSignInAccount = await _handleGoogleSignIn(); 12 | final googleAuth = await googleSignInAccount.authentication; 13 | final googleAuthCred = GoogleAuthProvider.getCredential( 14 | idToken: googleAuth.idToken, accessToken: googleAuth.accessToken); 15 | final user = await _firebaseAuth.signInWithCredential(googleAuthCred); 16 | 17 | final FlutterSecureStorage storage = FlutterSecureStorage(); 18 | storage.write(key: "email", value: user.user.email); 19 | storage.write(key: "uid", value: user.user.uid); 20 | return "Success"; 21 | } catch (error) { 22 | return "Fail"; 23 | } 24 | 25 | return "Fail"; 26 | } 27 | 28 | // Sign in with google 29 | Future _handleGoogleSignIn() async { 30 | GoogleSignIn googleSignIn = GoogleSignIn(scopes: ['email', 'profile']); 31 | GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn(); 32 | return googleSignInAccount; 33 | } 34 | -------------------------------------------------------------------------------- /lib/views/pages/WhatsNew/Widgets/whatsNewItem_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | Widget whatsNewItem_widget(var json, int index) { 4 | return Container( 5 | padding: EdgeInsets.only( 6 | top: 18.0, 7 | ), 8 | child: Column( 9 | children: [ 10 | Container( 11 | alignment: Alignment.centerLeft, 12 | child: Text( 13 | json["${index + 1}"]['heading'], 14 | style: TextStyle( 15 | shadows: [Shadow(color: Colors.black, offset: Offset(0, -5))], 16 | decoration: TextDecoration.underline, 17 | decorationColor: Colors.black45, 18 | decorationThickness: 4.0, 19 | decorationStyle: TextDecorationStyle.dashed, 20 | color: Colors.transparent, 21 | fontSize: 20.0, 22 | fontWeight: FontWeight.w700, 23 | ), 24 | ), 25 | ), 26 | Padding( 27 | padding: const EdgeInsets.only( 28 | bottom: 8.0, 29 | ), 30 | child: Text( 31 | json["${index + 1}"]['body'], 32 | style: TextStyle( 33 | color: Colors.black, 34 | fontSize: 16.0, 35 | fontWeight: FontWeight.w600, 36 | ), 37 | ), 38 | ), 39 | ], 40 | ), 41 | ); 42 | } 43 | -------------------------------------------------------------------------------- /lib/responses/addProblemsToFireStore.dart: -------------------------------------------------------------------------------- 1 | // This function adds the problem which users are facing to firestore in the 'contactUs' collection 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 7 | import 'package:get/get.dart'; 8 | 9 | CollectionReference users = Firestore.instance.collection("contactUs"); 10 | 11 | void addProblemsToFireStore(String name, String desc) async { 12 | try { 13 | if (name == null || desc == null) { 14 | } else { 15 | final FirebaseAuth auth = FirebaseAuth.instance; 16 | final User _user = auth.currentUser; 17 | FlutterSecureStorage storage = FlutterSecureStorage(); 18 | String email = await storage.read(key: "email"); 19 | users.document(email).set({ 20 | "name": name, 21 | "desc": desc, 22 | "status": "unanswered", 23 | }); 24 | Get.back(); 25 | Get.snackbar( 26 | "Contact request added", 27 | "You will be getting a mail on your registered email address.", 28 | snackPosition: SnackPosition.BOTTOM, 29 | backgroundColor: Colors.black, 30 | colorText: Colors.orange, 31 | duration: Duration( 32 | seconds: 5, 33 | ), 34 | ); 35 | } 36 | } catch (e) {} 37 | } 38 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/EventItem/dateAndTime_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | Widget dateAndTime_widget(dynamic snapshot, int index, String email) { 5 | FieldPath field = FieldPath.fromString(email); 6 | return Container( 7 | child: Row( 8 | mainAxisAlignment: MainAxisAlignment.spaceAround, 9 | children: [ 10 | Icon(Icons.calendar_today, color: Colors.orange), 11 | Container( 12 | padding: EdgeInsets.only( 13 | left: 8.0, 14 | ), 15 | child: Text( 16 | snapshot.data["${index + 1}_${field.hashCode}"]['date'].toString(), 17 | style: TextStyle( 18 | color: Colors.orange, 19 | fontWeight: FontWeight.w600, 20 | fontSize: 14.0, 21 | ), 22 | ), 23 | ), 24 | Spacer(), 25 | Container( 26 | padding: EdgeInsets.only( 27 | right: 8.0, 28 | ), 29 | child: Text( 30 | snapshot.data["${index + 1}_${field.hashCode}"]['time'].toString(), 31 | style: TextStyle( 32 | color: Colors.orange, 33 | fontWeight: FontWeight.w600, 34 | fontSize: 14.0, 35 | ), 36 | ), 37 | ), 38 | Icon( 39 | Icons.lock_clock, 40 | color: Colors.orange, 41 | ), 42 | ], 43 | ), 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /lib/views/pages/LoginSignUpScreen/loginSignup_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/LoginSignUpScreen/Widget/backgroundCont_widget.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/LoginSignUpScreen/Widget/imageCircle_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/LoginSignUpScreen/Widget/loginButton_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/LoginSignUpScreen/Widget/signUpButton_widget.dart'; 6 | 7 | class LoginSignUpScreen extends StatefulWidget { 8 | @override 9 | _LoginSignUpScreenState createState() => _LoginSignUpScreenState(); 10 | } 11 | 12 | class _LoginSignUpScreenState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | double dist = MediaQuery.of(context).size.height / 3; 16 | return Scaffold( 17 | body: Stack( 18 | children: [ 19 | backgroundContainers(context), 20 | imageCircle(context), 21 | Padding( 22 | padding: const EdgeInsets.only(left: 15.0, right: 15.0), 23 | child: Container( 24 | height: MediaQuery.of(context).size.height, 25 | width: MediaQuery.of(context).size.width, 26 | child: Column( 27 | mainAxisAlignment: MainAxisAlignment.end, 28 | children: [loginButton(context), signupButton(context)], 29 | ), 30 | ), 31 | ) 32 | ], 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/Widgets/EventItem/locationAndEdit_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/EditEvent/editEvent_screen.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | Widget locationAndEdit_widget(dynamic snapshot, int index, String email) { 7 | FieldPath field = FieldPath.fromString(email); 8 | 9 | return Padding( 10 | padding: const EdgeInsets.only(top: 4.0), 11 | child: Row( 12 | children: [ 13 | Icon(Icons.location_on, color: Colors.orange), 14 | Flexible( 15 | child: Container( 16 | padding: EdgeInsets.only( 17 | left: 8.0, 18 | ), 19 | child: Text( 20 | snapshot.data['${index + 1}_${field.hashCode}']['eventCity'] 21 | .toString() + 22 | ", " + 23 | snapshot.data['${index + 1}_${field.hashCode}']["eventState"] 24 | .toString(), 25 | style: TextStyle( 26 | color: Colors.orange, 27 | fontWeight: FontWeight.w600, 28 | ), 29 | overflow: TextOverflow.ellipsis, 30 | ), 31 | ), 32 | ), 33 | Spacer(), 34 | GestureDetector( 35 | onTap: () { 36 | Get.to(EditEventScreen(index: index + 1)); 37 | }, 38 | child: Icon( 39 | Icons.edit, 40 | color: Colors.orange, 41 | ), 42 | ) 43 | ], 44 | ), 45 | ); 46 | } 47 | -------------------------------------------------------------------------------- /lib/views/pages/LoginScreen/Widgets/loginWithGoogleButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/auth/googleLogin_auth.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/mainScreen_screen.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | Widget loginWithGoogleButton() { 7 | return GestureDetector( 8 | onTap: () { 9 | Future output = handleSignIn(); 10 | output.then((value) { 11 | value == "Success" 12 | ? Get.offAll(MainScreen()) 13 | : Get.snackbar("Unsuccessful Login", "Please try again."); 14 | }); 15 | }, 16 | child: Padding( 17 | padding: const EdgeInsets.only(bottom: 25.0), 18 | child: Container( 19 | height: 55, 20 | decoration: BoxDecoration( 21 | borderRadius: BorderRadius.circular( 22 | 12.0, 23 | ), 24 | gradient: LinearGradient( 25 | begin: Alignment.bottomCenter, 26 | end: Alignment.topCenter, 27 | colors: [ 28 | Colors.orange[400], 29 | Colors.orange, 30 | Colors.orange[600], 31 | ], 32 | ), 33 | ), 34 | child: Center( 35 | child: Text( 36 | "Login with Google", 37 | style: TextStyle( 38 | fontSize: 32.0, 39 | fontWeight: FontWeight.w700, 40 | letterSpacing: 1.6, 41 | color: Colors.black, 42 | ), 43 | ), 44 | ), 45 | ), 46 | ), 47 | ); 48 | } 49 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"}]} -------------------------------------------------------------------------------- /lib/views/pages/SignUpScreen/Widgets/signUpWithGoogleButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/auth/googleLogin_auth.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/mainScreen_screen.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | Widget signUpWithGoogleButton() { 7 | return GestureDetector( 8 | onTap: () { 9 | Future output = handleSignIn(); 10 | output.then((value) { 11 | value == "Success" 12 | ? Get.offAll(MainScreen()) 13 | : Get.snackbar("Unsuccessful Singup", "Please try again."); 14 | }); 15 | }, 16 | child: Padding( 17 | padding: const EdgeInsets.only(bottom: 25.0), 18 | child: Container( 19 | height: 55, 20 | decoration: BoxDecoration( 21 | borderRadius: BorderRadius.circular( 22 | 12.0, 23 | ), 24 | gradient: LinearGradient( 25 | begin: Alignment.bottomCenter, 26 | end: Alignment.topCenter, 27 | colors: [ 28 | Colors.black.withOpacity(0.4), 29 | Colors.black.withOpacity(0.5), 30 | Colors.black.withOpacity(0.6), 31 | ], 32 | ), 33 | ), 34 | child: Center( 35 | child: Text( 36 | "Sign Up with Google", 37 | style: TextStyle( 38 | fontSize: 28.0, 39 | fontWeight: FontWeight.w700, 40 | letterSpacing: 1.6, 41 | color: Colors.orange, 42 | ), 43 | ), 44 | ), 45 | ), 46 | ), 47 | ); 48 | } 49 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/utils/constants.dart: -------------------------------------------------------------------------------- 1 | // Holds all the values/variables which won't be changing throughout the app 2 | 3 | class Constants { 4 | static List stateList = [ 5 | "Andhra Pradesh", 6 | "Arunachal Pradesh", 7 | 'Assam', 8 | "Bihar", 9 | "Chhattisgarh", 10 | "Goa", 11 | "Gujrat", 12 | "Haryana", 13 | "Himachal Pradesh", 14 | "Jharkhand", 15 | "Karnataka", 16 | "Kerala", 17 | "Madhya Pradesh", 18 | "Maharashtra", 19 | "Manipur", 20 | "Meghalaya", 21 | "Mizoram", 22 | "Nagaland", 23 | "Odisha", 24 | "Punjab", 25 | "Rajasthan", 26 | "Sikkim", 27 | "Tamil Nadu", 28 | "Telangana", 29 | "Tripura", 30 | "Uttar Pradesh", 31 | "Uttarakhand", 32 | "West Bengal" 33 | ]; 34 | 35 | static List eventTypes = [ 36 | "Exhibition", 37 | "Info Session", 38 | "Online Streaming", 39 | "Workshop", 40 | "E-Sports", 41 | "BootCamp", 42 | "Speaker Session", 43 | ]; 44 | 45 | static const editYourUserNameText = 46 | "You can edit your username through the\n\"Edit My Name\" option in Settings."; 47 | static const versionText = "Version 1.0.0"; 48 | static const aboutTheAppText = 49 | "Eventizer is an app that helps you to create or schedule your events on the go and let people know about the events which you are organizing. hrough this app you can let masses know about your event and increase the reach of your event. Every time a new event is created, users will be getting a notification/mail about it and then they can register for your event."; 50 | static const linkAreNotEditableText = 51 | "Event link cannot be changed later. Make sure to include 'http' or 'https' at the begining"; 52 | } 53 | -------------------------------------------------------------------------------- /lib/views/pages/AboutTheApp/aboutTheApp_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/AboutTheApp/Widgets/aboutTheAppText_widget.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/AboutTheApp/Widgets/appIcon_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/AboutTheApp/Widgets/versionsText_widget.dart'; 5 | 6 | class AboutTheAppScreen extends StatefulWidget { 7 | @override 8 | _AboutTheAppScreenState createState() => _AboutTheAppScreenState(); 9 | } 10 | 11 | class _AboutTheAppScreenState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar( 16 | backgroundColor: Colors.black.withOpacity( 17 | 0.9, 18 | ), 19 | iconTheme: IconThemeData( 20 | color: Colors.orange, 21 | ), 22 | centerTitle: true, 23 | title: Text( 24 | "About The App", 25 | style: TextStyle( 26 | color: Colors.orange, 27 | ), 28 | ), 29 | ), 30 | body: Container( 31 | height: MediaQuery.of(context).size.height, 32 | width: MediaQuery.of(context).size.width, 33 | decoration: BoxDecoration( 34 | color: Colors.orange, 35 | ), 36 | child: Padding( 37 | padding: const EdgeInsets.only( 38 | left: 16.0, 39 | right: 15.0, 40 | top: 15.0, 41 | ), 42 | child: SingleChildScrollView( 43 | child: Column( 44 | children: [ 45 | appIcon_widget(), 46 | aboutTheAppText_widget(), 47 | versionText_widget(), 48 | ], 49 | ), 50 | ), 51 | ), 52 | )); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/views/pages/SignUpScreen/Widgets/signUpButtonSingUpScreen_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/auth/signup_auth.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/mainScreen_screen.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | Widget signUpButtonSignUpScreen(BuildContext context, 7 | GlobalKey _formKey, String email, String password) { 8 | return GestureDetector( 9 | onTap: () { 10 | if (_formKey.currentState.validate()) {} 11 | Future op = signUp(email, password, _formKey); 12 | 13 | op.then( 14 | (value) { 15 | value == "Success" 16 | ? Get.offAll(MainScreen()) 17 | : Get.snackbar("SignUp Error", "Please try again later.", 18 | snackPosition: SnackPosition.BOTTOM); 19 | }, 20 | ); 21 | }, 22 | child: Padding( 23 | padding: const EdgeInsets.only(bottom: 25.0), 24 | child: Container( 25 | width: MediaQuery.of(context).size.width, 26 | height: 55.0, 27 | decoration: BoxDecoration( 28 | borderRadius: BorderRadius.circular( 29 | 12.0, 30 | ), 31 | gradient: LinearGradient( 32 | begin: Alignment.bottomCenter, 33 | end: Alignment.topCenter, 34 | colors: [ 35 | Colors.black.withOpacity(0.4), 36 | Colors.black.withOpacity(0.5), 37 | Colors.black.withOpacity(0.6), 38 | ], 39 | ), 40 | ), 41 | child: Center( 42 | child: Text( 43 | "Sign Up", 44 | style: TextStyle( 45 | fontSize: 32.0, 46 | fontWeight: FontWeight.w700, 47 | letterSpacing: 1.6, 48 | color: Colors.orange, 49 | ), 50 | ), 51 | ), 52 | ), 53 | ), 54 | ); 55 | } 56 | -------------------------------------------------------------------------------- /lib/views/pages/LoginScreen/Widgets/loginButton_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/auth/login_auth.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/mainScreen_screen.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | Widget loginButtonLoginScreen(BuildContext context, 7 | GlobalKey _formKey, String email, String password) { 8 | return GestureDetector( 9 | onTap: () { 10 | if (_formKey.currentState.validate()) {} 11 | Future output = signin(email, password, _formKey); 12 | output.then( 13 | (value) { 14 | value == "Success" 15 | ? Get.offAll(MainScreen()) 16 | : Get.snackbar("Login Error", "Please try again later", 17 | snackPosition: SnackPosition.BOTTOM); 18 | }, 19 | ); 20 | signin(email, password, _formKey) == "Success" 21 | ? Get.offAll(MainScreen()) 22 | : null; 23 | }, 24 | child: Padding( 25 | padding: const EdgeInsets.only(bottom: 25.0), 26 | child: Container( 27 | width: MediaQuery.of(context).size.width, 28 | height: 55.0, 29 | decoration: BoxDecoration( 30 | borderRadius: BorderRadius.circular(12), 31 | gradient: LinearGradient( 32 | begin: Alignment.bottomCenter, 33 | end: Alignment.topCenter, 34 | colors: [ 35 | Colors.orange[400], 36 | Colors.orange, 37 | Colors.orange[600], 38 | ], 39 | ), 40 | ), 41 | child: Center( 42 | child: Text( 43 | "Login", 44 | style: TextStyle( 45 | fontSize: 32.0, 46 | fontWeight: FontWeight.w700, 47 | letterSpacing: 1.6, 48 | color: Colors.black, 49 | ), 50 | ), 51 | ), 52 | ), 53 | ), 54 | ); 55 | } 56 | -------------------------------------------------------------------------------- /lib/blocs/mainScreen_bloc.dart: -------------------------------------------------------------------------------- 1 | // Bloc for the main screen which continously updates the event when a new event is added or deleted 2 | 3 | import 'dart:async'; 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:get/get.dart'; 7 | 8 | enum MainScreenActions { Fetch } 9 | 10 | class MainScreenBloc { 11 | final streamController = StreamController(); 12 | StreamSink get mainScreenSink => streamController.sink; 13 | Stream get mainScreenStream => streamController.stream; 14 | 15 | final eventController = StreamController(); 16 | StreamSink get eventSink => eventController.sink; 17 | Stream get eventStream => eventController.stream; 18 | 19 | MainScreenBloc() { 20 | eventStream.listen((event) async { 21 | if (event == MainScreenActions.Fetch) { 22 | try { 23 | final FirebaseAuth auth = FirebaseAuth.instance; 24 | 25 | final User user = auth.currentUser; 26 | final _data = await Firestore.instance 27 | .collection("eventList") 28 | .document(user.email) 29 | .get(); 30 | final demoThing = await Firestore.instance 31 | .collection("eventList") 32 | .document(user.email) 33 | .get() 34 | .then((value) { 35 | if (value.data() != null) { 36 | mainScreenSink.add(value.data()); 37 | } else { 38 | mainScreenSink.addError( 39 | "No Event Found.\nStart creating your first event."); 40 | } 41 | }); 42 | } catch (e) { 43 | // To check if the state is bad 44 | // If we have bad state, we will not display the snackbar 45 | if (e.toString().substring(0, 3) != "Bad") 46 | Get.snackbar("Error", "Something wrong. Please restart the app."); 47 | } 48 | } 49 | }); 50 | } 51 | 52 | void dispose() { 53 | streamController.close(); 54 | eventController.close(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_core/firebase_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/repositories/subToTopic_fcm.dart'; 4 | import 'package:flutter_booking_app_event_creator/responses/checkConnection.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/LoginSignUpScreen/loginSignup_screen.dart'; 6 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/mainScreen_screen.dart'; 7 | import 'package:flutter_booking_app_event_creator/views/pages/NoInternetConnection/noInternetConnection_screen.dart'; 8 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 9 | import 'package:get/get.dart'; 10 | 11 | Future main() async { 12 | WidgetsFlutterBinding.ensureInitialized(); 13 | 14 | final FlutterSecureStorage storage = FlutterSecureStorage(); 15 | String email = await storage.read(key: "email"); 16 | String uid = await storage.read(key: "uid"); 17 | WidgetsFlutterBinding.ensureInitialized(); 18 | await Firebase.initializeApp(); 19 | 20 | runApp(MyApp(email)); 21 | } 22 | 23 | class MyApp extends StatefulWidget { 24 | MyApp(String this.email); 25 | String email; 26 | 27 | @override 28 | _MyAppState createState() => _MyAppState(); 29 | } 30 | 31 | class _MyAppState extends State { 32 | String connection = null; 33 | 34 | @override 35 | void initState() { 36 | super.initState(); 37 | checkConn().then((value) { 38 | setState(() { 39 | connection = value; 40 | }); 41 | }); 42 | subToTopic_fcm(); 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return GetMaterialApp( 48 | debugShowCheckedModeBanner: false, 49 | title: 'Eventizer', 50 | theme: ThemeData( 51 | canvasColor: Colors.black, 52 | primarySwatch: Colors.blue, 53 | visualDensity: VisualDensity.adaptivePlatformDensity, 54 | ), 55 | home: connection == null 56 | ? CircularProgressIndicator() 57 | : connection == "none" 58 | ? NoInternetConnectionScreen() 59 | : widget.email == null 60 | ? LoginSignUpScreen() 61 | : MainScreen()); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /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 | Eventizer 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 | CFBundleURLTypes 47 | 48 | 49 | CFBundleTypeRole 50 | Editor 51 | CFBundleURLSchemes 52 | 53 | 54 | 55 | com.googleusercontent.apps.861823949799-vc35cprkp249096uujjn0vvnmcvjppkn 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /lib/views/pages/LoginSignUpScreen/Widget/imageCircle_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:math' as math; 3 | 4 | Widget imageCircle(context) { 5 | return Stack( 6 | children: [ 7 | Container( 8 | height: MediaQuery.of(context).size.height, 9 | width: MediaQuery.of(context).size.width, 10 | child: Column( 11 | crossAxisAlignment: CrossAxisAlignment.center, 12 | children: [ 13 | Padding( 14 | padding: const EdgeInsets.only(top: 170.0), 15 | child: Container( 16 | height: 110.0, 17 | width: 110.0, 18 | decoration: BoxDecoration( 19 | color: Colors.orange, 20 | shape: BoxShape.circle, 21 | ), 22 | ), 23 | ), 24 | ], 25 | ), 26 | ), 27 | Container( 28 | height: MediaQuery.of(context).size.height, 29 | width: MediaQuery.of(context).size.width, 30 | child: Column( 31 | crossAxisAlignment: CrossAxisAlignment.center, 32 | children: [ 33 | Padding( 34 | padding: const EdgeInsets.only(top: 170.0), 35 | child: MyArc( 36 | diameter: 114.0, 37 | ), 38 | ), 39 | ], 40 | ), 41 | ), 42 | ], 43 | ); 44 | } 45 | 46 | class MyPainter extends CustomPainter { 47 | @override 48 | void paint(Canvas canvas, Size size) { 49 | Paint paint = Paint()..color = Colors.black; 50 | canvas.drawArc( 51 | Rect.fromCenter( 52 | center: Offset(size.height / 2, size.width / 2), 53 | height: size.height, 54 | width: size.width, 55 | ), 56 | math.pi, 57 | math.pi, 58 | false, 59 | paint, 60 | ); 61 | } 62 | 63 | @override 64 | bool shouldRepaint(CustomPainter oldDelegate) => false; 65 | } 66 | 67 | class MyArc extends StatelessWidget { 68 | final double diameter; 69 | 70 | const MyArc({Key key, this.diameter = 200}) : super(key: key); 71 | 72 | @override 73 | Widget build(BuildContext context) { 74 | return CustomPaint( 75 | painter: MyPainter(), 76 | size: Size(diameter, diameter), 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /lib/views/pages/AboutTheUser/aboutTheUser_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/AboutTheUser/Widgets/editYourUserNameText_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/AboutTheUser/Widgets/emailText_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/AboutTheUser/Widgets/nameText_widget.dart'; 6 | 7 | class AboutTheUser extends StatefulWidget { 8 | @override 9 | _AboutTheUserState createState() => _AboutTheUserState(); 10 | } 11 | 12 | class _AboutTheUserState extends State { 13 | final FirebaseAuth auth = FirebaseAuth.instance; 14 | User user; 15 | 16 | void inputData() { 17 | final User _user = auth.currentUser; 18 | 19 | setState(() { 20 | user = _user; 21 | }); 22 | } 23 | 24 | @override 25 | void initState() { 26 | // TODO: implement initState 27 | super.initState(); 28 | inputData(); 29 | } 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Scaffold( 34 | appBar: AppBar( 35 | iconTheme: IconThemeData( 36 | color: Colors.orange, 37 | ), 38 | backgroundColor: Colors.black.withOpacity(0.9), 39 | elevation: 0.0, 40 | title: Text( 41 | "About the User", 42 | style: TextStyle( 43 | color: Colors.orange, 44 | ), 45 | ), 46 | centerTitle: true, 47 | ), 48 | body: Container( 49 | width: MediaQuery.of(context).size.width, 50 | height: MediaQuery.of(context).size.height, 51 | decoration: BoxDecoration( 52 | color: Colors.orange, 53 | ), 54 | child: Padding( 55 | padding: const EdgeInsets.only( 56 | left: 15.0, 57 | right: 15.0, 58 | top: 25.0, 59 | ), 60 | child: Column( 61 | crossAxisAlignment: CrossAxisAlignment.center, 62 | children: [ 63 | emailText_widget(user), 64 | SizedBox(height: 25.0), 65 | nameText_widget(user), 66 | editYourUserNameText_widget(), 67 | ], 68 | ), 69 | ), 70 | ), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /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: 'com.google.gms.google-services' 26 | apply plugin: 'kotlin-android' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | 31 | defaultConfig { 32 | multiDexEnabled true 33 | } 34 | 35 | compileSdkVersion 29 36 | 37 | sourceSets { 38 | main.java.srcDirs += 'src/main/kotlin' 39 | } 40 | 41 | lintOptions { 42 | disable 'InvalidPackage' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.flutter_booking_app_event_creator" 48 | minSdkVersion 18 49 | targetSdkVersion 29 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | } 53 | 54 | buildTypes { 55 | release { 56 | // TODO: Add your own signing config for the release build. 57 | // Signing with the debug keys for now, so `flutter run --release` works. 58 | signingConfig signingConfigs.debug 59 | } 60 | } 61 | } 62 | 63 | flutter { 64 | source '../..' 65 | } 66 | 67 | dependencies { 68 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 69 | implementation platform('com.google.firebase:firebase-bom:26.1.1') 70 | implementation 'com.android.support:multidex:1.0.3' 71 | implementation 'com.google.android.gms:play-services-basement:17.4.0' 72 | implementation 'com.google.firebase:firebase-messaging:21.0.1' 73 | 74 | 75 | } 76 | -------------------------------------------------------------------------------- /lib/views/pages/WhatsNew/whatsNew_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_booking_app_event_creator/api/WhatsNew/whatsNew_api.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/WhatsNew/Widgets/whatsNewItem_widget.dart'; 6 | import 'package:http/http.dart' as http; 7 | 8 | class WhatsNewScreen extends StatefulWidget { 9 | @override 10 | _WhatsNewScreenState createState() => _WhatsNewScreenState(); 11 | } 12 | 13 | class _WhatsNewScreenState extends State { 14 | Future futureAlbum; 15 | 16 | @override 17 | void initState() { 18 | super.initState(); 19 | futureAlbum = fetchAlbum(); 20 | } 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return Scaffold( 25 | appBar: AppBar( 26 | backgroundColor: Colors.black.withOpacity( 27 | 0.9, 28 | ), 29 | iconTheme: IconThemeData( 30 | color: Colors.orange, 31 | ), 32 | centerTitle: true, 33 | title: Text( 34 | "What's New", 35 | style: TextStyle( 36 | color: Colors.orange, 37 | ), 38 | ), 39 | ), 40 | body: FutureBuilder( 41 | future: futureAlbum, 42 | builder: (context, snapshot) { 43 | var json; 44 | if (snapshot.data != null) { 45 | json = jsonDecode(snapshot.data.body); 46 | } 47 | 48 | if (snapshot.hasData) { 49 | return Container( 50 | height: MediaQuery.of(context).size.height, 51 | width: MediaQuery.of(context).size.width, 52 | decoration: BoxDecoration( 53 | color: Colors.orange, 54 | ), 55 | child: ListView.builder( 56 | padding: const EdgeInsets.only( 57 | left: 15.0, 58 | right: 15.0, 59 | ), 60 | itemCount: json.keys.length, 61 | itemBuilder: (BuildContext context, int index) { 62 | return whatsNewItem_widget(json, index); 63 | }), 64 | ); 65 | } else if (snapshot.hasError) { 66 | return Center(child: CircularProgressIndicator()); 67 | } 68 | 69 | // By default, show a loading spinner. 70 | return Center(child: CircularProgressIndicator()); 71 | }, 72 | ), 73 | ); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/responses/updateEventDataToFireStore.dart: -------------------------------------------------------------------------------- 1 | // This function updates the data related to an event in the firestore. 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:flutter_booking_app_event_creator/blocs/mainScreen_bloc.dart'; 6 | import 'package:get/get.dart'; 7 | 8 | CollectionReference users = Firestore.instance.collection("eventList"); 9 | 10 | void updateEventDataToFireStore( 11 | email, 12 | String fullUserName, 13 | String contactEmail, 14 | String phoneNumber, 15 | String eventCity, 16 | String eventState, 17 | String eventType, 18 | String expectedAudience, 19 | String date, 20 | String time, 21 | String eventName, 22 | String eventStatus, 23 | String eventURL, 24 | List registeredUsers, 25 | int currentEventCount) async { 26 | try { 27 | if (fullUserName == null || 28 | contactEmail == null || 29 | phoneNumber == null || 30 | eventState == null || 31 | eventCity == null || 32 | eventType == null || 33 | expectedAudience == null || 34 | date == null || 35 | time == null || 36 | eventName == null) { 37 | } else { 38 | final FirebaseAuth auth = FirebaseAuth.instance; 39 | final User _user = auth.currentUser; 40 | int lengthOfData; 41 | final demoThing = await Firestore.instance 42 | .collection("eventList") 43 | .document(_user.email) 44 | .get() 45 | .then((value) { 46 | int length; 47 | if (value.data() == null) { 48 | length = 0; 49 | } else { 50 | length = value.data().length; 51 | } 52 | lengthOfData = length + 1; 53 | }) ?? 54 | null; 55 | FieldPath field = FieldPath.fromString(_user.email); 56 | users.document(_user.email).update({ 57 | "${currentEventCount}_${field.hashCode}": { 58 | "fullUserName": fullUserName, 59 | "contactEmail": contactEmail, 60 | "phoneNumber": phoneNumber, 61 | "eventState": eventState, 62 | "eventCity": eventCity, 63 | "eventType": eventType, 64 | "expectedAudience": expectedAudience, 65 | "date": date, 66 | "time": time, 67 | "eventStatus": eventStatus, 68 | "eventName": eventName, 69 | "eventURL": eventURL, 70 | "registeredUsers": registeredUsers, 71 | }, 72 | }); 73 | } 74 | 75 | Get.back(); 76 | final mainScreen_bloc = MainScreenBloc(); 77 | mainScreen_bloc.eventSink.add(MainScreenActions.Fetch); 78 | } catch (e) { 79 | Get.snackbar("Error", 80 | "Unable to add a new event at the moment.\nPleae try after some time"); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /lib/responses/addDataToFireStore.dart: -------------------------------------------------------------------------------- 1 | // This function adds the new event to firestore 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:firebase_auth/firebase_auth.dart'; 5 | import 'package:flutter_booking_app_event_creator/blocs/mainScreen_bloc.dart'; 6 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 7 | import 'package:get/get.dart'; 8 | 9 | import 'sendFcmMessage.dart'; 10 | 11 | CollectionReference users = Firestore.instance.collection("eventList"); 12 | 13 | void addingDataToFireStore( 14 | uid, 15 | String fullUserName, 16 | String contactEmail, 17 | String phoneNumber, 18 | String eventCity, 19 | String eventState, 20 | String eventType, 21 | String expectedAudience, 22 | String date, 23 | String time, 24 | String eventName, 25 | String eventURL) async { 26 | try { 27 | if (fullUserName == null || 28 | contactEmail == null || 29 | phoneNumber == null || 30 | eventState == null || 31 | eventCity == null || 32 | eventType == null || 33 | expectedAudience == null || 34 | date == null || 35 | time == null || 36 | eventName == null) { 37 | } else { 38 | final FirebaseAuth auth = FirebaseAuth.instance; 39 | final User _user = auth.currentUser; 40 | final FlutterSecureStorage storage = FlutterSecureStorage(); 41 | String email = await storage.read(key: "email"); 42 | int lengthOfData; 43 | final demoThing = await Firestore.instance 44 | .collection("eventList") 45 | .document(email) 46 | .get() 47 | .then((value) { 48 | int length; 49 | if (value.data() == null) { 50 | length = 0; 51 | } else { 52 | length = value.data().length; 53 | } 54 | lengthOfData = length + 1; 55 | }) ?? 56 | null; 57 | FieldPath field = FieldPath.fromString(email); 58 | users.document(email).updateData({ 59 | "${lengthOfData.toString()}_${field.hashCode}" ?? "1_${field.hashCode}": 60 | { 61 | "fullUserName": fullUserName, 62 | "contactEmail": contactEmail, 63 | "phoneNumber": phoneNumber, 64 | "eventState": eventState, 65 | "eventCity": eventCity, 66 | "eventType": eventType, 67 | "expectedAudience": expectedAudience, 68 | "date": date, 69 | "time": time, 70 | "eventStatus": "active", 71 | "eventName": eventName, 72 | "eventURL": eventURL, 73 | "registeredUsers": [] 74 | }, 75 | }); 76 | } 77 | sendFcmMessage( 78 | "New Event Published", "Check out $eventName and register for it."); 79 | Get.back(); 80 | final mainScreen_bloc = MainScreenBloc(); 81 | mainScreen_bloc.eventSink.add(MainScreenActions.Fetch); 82 | } catch (e) { 83 | Get.snackbar("Error", 84 | "Unable to add a new event at the moment.\nPleae try after some time"); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lib/views/pages/HelpAndSupport/Widgets/helpAndSupport_body_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/repositories/mailTo_harsh.dart'; 3 | 4 | Widget helpAndSupport_body_widget(BuildContext context) { 5 | return Container( 6 | height: MediaQuery.of(context).size.height, 7 | width: MediaQuery.of(context).size.width, 8 | decoration: BoxDecoration(color: Colors.orange), 9 | child: Padding( 10 | padding: const EdgeInsets.only( 11 | left: 15.0, 12 | right: 15.0, 13 | top: 15.0, 14 | ), 15 | child: Column( 16 | children: [ 17 | Container( 18 | height: 256.0, 19 | width: 256.0, 20 | decoration: BoxDecoration(shape: BoxShape.circle), 21 | child: Image.network( 22 | "https://res.cloudinary.com/harshkumarkhatri/image/upload/v1611391578/Support-512_suwagi.png"), 23 | ), 24 | Text( 25 | "Want some help or support for your personal event?", 26 | style: TextStyle( 27 | color: Colors.black, 28 | fontSize: 18.0, 29 | fontWeight: FontWeight.w500, 30 | letterSpacing: 1.4, 31 | height: 1.3, 32 | ), 33 | textAlign: TextAlign.center, 34 | ), 35 | GestureDetector( 36 | behavior: HitTestBehavior.opaque, 37 | onTap: () { 38 | launchMailto(); 39 | }, 40 | child: Padding( 41 | padding: const EdgeInsets.only(top: 18.0), 42 | child: RichText( 43 | textAlign: TextAlign.center, 44 | text: TextSpan(children: [ 45 | TextSpan( 46 | text: "Write us at", 47 | style: TextStyle( 48 | color: Colors.black, 49 | fontSize: 18.0, 50 | fontWeight: FontWeight.w500, 51 | letterSpacing: 1.4, 52 | height: 1.3, 53 | ), 54 | ), 55 | TextSpan( 56 | text: " mailharshkhatri@gmail.com", 57 | style: TextStyle( 58 | color: Colors.black, 59 | fontSize: 18.0, 60 | fontWeight: FontWeight.w700, 61 | letterSpacing: 1.4, 62 | height: 1.3, 63 | )) 64 | ]), 65 | ), 66 | )), 67 | Spacer(), 68 | Padding( 69 | padding: const EdgeInsets.only(bottom: 8.0), 70 | child: Text( 71 | "Always happy to help you:)", 72 | style: TextStyle( 73 | color: Colors.black, 74 | fontWeight: FontWeight.w500, 75 | letterSpacing: 1.4, 76 | height: 1.3, 77 | ), 78 | textAlign: TextAlign.center, 79 | ), 80 | ), 81 | ], 82 | ), 83 | ), 84 | ); 85 | } 86 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Evntizer-Event Creators Section 2 | 3 | [![forthebadge](https://forthebadge.com/images/badges/built-by-developers.svg)](https://forthebadge.com) 4 | [![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com) 5 | [![forthebadge](https://forthebadge.com/images/badges/made-with-reason.svg)](https://forthebadge.com) 6 | [![forthebadge](https://forthebadge.com/images/badges/open-source.svg)](https://forthebadge.com) 7 | [![forthebadge](https://forthebadge.com/images/badges/you-didnt-ask-for-this.svg)](https://forthebadge.com) 8 | 9 | 10 | ## Introduction 📌 11 | 12 | Eventizer is an app to help you create and manage events on the go without any hassle. 13 | 14 | ## Technology Stack 🏁 15 | 16 | - [Flutter](https://flutter.dev/) 17 | - [Firebase](https://firebase.google.com/) 18 | - [Flutter Secure Storage](https://pub.dev/packages/flutter_secure_storage) 19 | - [Getx](https://pub.dev/packages/get) 20 | - [AWS](https://aws.amazon.com/) 21 | - [HTTP](https://pub.dev/packages/http) 22 | - [Intl](https://pub.dev/packages/intl) 23 | - [URL Launcher](https://pub.dev/packages/url_launcher) 24 | - [Share](https://pub.dev/packages/share) 25 | - [Connectivity](https://pub.dev/packages/connectivity) 26 | 27 | ## Why this Project? 🏃‍♂️ 28 | 29 | A lot of things go in organizing a successful event and being a community person, i know that. 30 | 31 | To handle the problem of the people who are not that good at organizing an event, i have created Eventizer which will help them get their event up and running with a few click along with providing them with a better reach for their events. 32 | 33 | This app is the **event creator** section for Eventizer and through this app/section the communities or folks from the communities can create their event and see the mails of the people who have registered for their events. 34 | 35 | Every time a user is registering, he will be be getting a mail for the same with all the details related to the event. 36 | 37 | Sometimes, there are unfortunate conditions due to which an event needs to be updated or cancelled. The also allows you to do that. 38 | 39 | Every participant will get a mail when you update or cancel you event which keeps the attendees updated as well with the event schedule. 40 | 41 | ## Project Walkthrough 42 | - API-All files related to API loading 43 | - Bloc-Bloc pattern implemented here 44 | - Models-Demo models related to data being stored in database 45 | - Repositories-Functions related to firebase 46 | - Responses-Some more functions 47 | - Utilities 48 | - View 49 | - Auth-Authentication part 50 | - Pages-All the screen/pages within the app 51 | - Partials 52 | 53 | ## 👀 Build Instructions 54 | 55 | - Clone the Repository: `git clone https://github.com/harshkumarkhatri/Booking-App-Event-Creator` 56 | - `cd` into the Repository: `cd Booking-App-Event-Creator` 57 | - Enable stable channel: 58 | ``` 59 | $ flutter channel beta 60 | ``` 61 | - Check for the Devices configured for Flutter Web: `flutter devices` 62 | - Run the App in Release Mode: `flutter run` 63 | - Generate a Build: `flutter build apk --split-per-abi` 64 | 65 | 66 | ## Contributors ✨ 67 | 68 | - [Harsh Kumar Khatri](https://github.com/harshkumarkhatri) -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 15 | 22 | 23 | 24 | 25 | 26 | 30 | 34 | 39 | 43 | 44 | 45 | 46 | 47 | 48 | 50 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /lib/views/pages/NoInternetConnection/noInternetConnection_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NoInternetConnectionScreen extends StatefulWidget { 4 | @override 5 | _NoInternetConnectionScreenState createState() => 6 | _NoInternetConnectionScreenState(); 7 | } 8 | 9 | class _NoInternetConnectionScreenState 10 | extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | title: Text( 16 | "No internet connection", 17 | style: TextStyle( 18 | color: Colors.orange, 19 | ), 20 | ), 21 | centerTitle: true, 22 | backgroundColor: Colors.black, 23 | ), 24 | body: Container( 25 | decoration: BoxDecoration( 26 | color: Colors.orange, 27 | ), 28 | alignment: Alignment.center, 29 | child: Column( 30 | mainAxisAlignment: MainAxisAlignment.center, 31 | children: [ 32 | Icon( 33 | Icons.wifi, 34 | color: Colors.black, 35 | size: 80.0, 36 | ), 37 | Padding( 38 | padding: const EdgeInsets.only(top: 18.0), 39 | child: Text( 40 | "No Connection", 41 | style: TextStyle( 42 | fontSize: 28.0, 43 | fontWeight: FontWeight.w700, 44 | ), 45 | ), 46 | ), 47 | RichText( 48 | textAlign: TextAlign.center, 49 | text: TextSpan( 50 | children: [ 51 | TextSpan( 52 | text: "Check your ", 53 | style: TextStyle( 54 | color: Colors.black, 55 | fontSize: 18.0, 56 | fontWeight: FontWeight.w500, 57 | ), 58 | ), 59 | TextSpan( 60 | text: "Wifi ", 61 | style: TextStyle( 62 | color: Colors.black, 63 | fontSize: 20.0, 64 | fontWeight: FontWeight.w700, 65 | ), 66 | ), 67 | TextSpan( 68 | text: "or ", 69 | style: TextStyle( 70 | color: Colors.black, 71 | fontSize: 18.0, 72 | fontWeight: FontWeight.w500, 73 | ), 74 | ), 75 | TextSpan( 76 | text: "Mobile ", 77 | style: TextStyle( 78 | color: Colors.black, 79 | fontSize: 20.0, 80 | fontWeight: FontWeight.w700, 81 | ), 82 | ), 83 | TextSpan( 84 | text: "connection.", 85 | style: TextStyle( 86 | color: Colors.black, 87 | fontSize: 18.0, 88 | fontWeight: FontWeight.w500, 89 | ), 90 | ), 91 | ], 92 | ), 93 | ), 94 | ], 95 | ), 96 | ), 97 | ); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_booking_app_event_creator 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^1.0.0 31 | get: ^3.22.2 32 | firebase_core: ^0.5.3 33 | firebase_auth: ^0.18.4+1 34 | google_sign_in: ^4.5.6 35 | shared_preferences: ^0.5.12+4 36 | cloud_firestore: 37 | flutter_secure_storage: ^3.3.5 38 | share: ^0.6.5+4 39 | http: ^0.12.2 40 | intl: ^0.16.1 41 | connectivity: ^2.0.2 42 | mailto: ^1.1.0 43 | url_launcher: ^5.7.10 44 | firebase_messaging: ^7.0.3 45 | 46 | dev_dependencies: 47 | flutter_test: 48 | sdk: flutter 49 | 50 | # For information on the generic Dart part of this file, see the 51 | # following page: https://dart.dev/tools/pub/pubspec 52 | 53 | # The following section is specific to Flutter. 54 | flutter: 55 | 56 | # The following line ensures that the Material Icons font is 57 | # included with your application, so that you can use the icons in 58 | # the material Icons class. 59 | uses-material-design: true 60 | 61 | # To add assets to your application, add an assets section, like this: 62 | # assets: 63 | # - images/a_dot_burr.jpeg 64 | # - images/a_dot_ham.jpeg 65 | 66 | # An image asset can refer to one or more resolution-specific "variants", see 67 | # https://flutter.dev/assets-and-images/#resolution-aware. 68 | 69 | # For details regarding adding assets from package dependencies, see 70 | # https://flutter.dev/assets-and-images/#from-packages 71 | 72 | # To add custom fonts to your application, add a fonts section here, 73 | # in this "flutter" section. Each entry in this list should have a 74 | # "family" key with the font family name, and a "fonts" key with a 75 | # list giving the asset and other descriptors for the font. For 76 | # example: 77 | # fonts: 78 | # - family: Schyler 79 | # fonts: 80 | # - asset: fonts/Schyler-Regular.ttf 81 | # - asset: fonts/Schyler-Italic.ttf 82 | # style: italic 83 | # - family: Trajan Pro 84 | # fonts: 85 | # - asset: fonts/TrajanPro.ttf 86 | # - asset: fonts/TrajanPro_Bold.ttf 87 | # weight: 700 88 | # 89 | # For details regarding fonts from package dependencies, 90 | # see https://flutter.dev/custom-fonts/#from-packages 91 | -------------------------------------------------------------------------------- /lib/views/pages/ActiveEvents/EventDetails_screen/eventDetails_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/EventDetails_screen/Widgets/dividerEventDetail_widget.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/EventDetails_screen/Widgets/editEventText_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/EventDetails_screen/Widgets/itemTextEventDetails_widgets.dart'; 5 | 6 | class EventDetailsScreen extends StatefulWidget { 7 | EventDetailsScreen({this.data}); 8 | Map data; 9 | 10 | @override 11 | _EventDetailsScreenState createState() => _EventDetailsScreenState(); 12 | } 13 | 14 | class _EventDetailsScreenState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: AppBar( 19 | iconTheme: IconThemeData( 20 | color: Colors.orange, 21 | ), 22 | centerTitle: true, 23 | backgroundColor: Colors.black, 24 | title: Text( 25 | widget.data["eventName"].toString().toUpperCase(), 26 | style: TextStyle( 27 | color: Colors.orange, 28 | ), 29 | ), 30 | ), 31 | body: Container( 32 | height: MediaQuery.of(context).size.height, 33 | width: MediaQuery.of(context).size.width, 34 | decoration: BoxDecoration( 35 | color: Colors.orange, 36 | ), 37 | child: SingleChildScrollView( 38 | child: Padding( 39 | padding: const EdgeInsets.only( 40 | left: 15.0, 41 | right: 15.0, 42 | top: 8.0, 43 | ), 44 | child: Column( 45 | children: [ 46 | itemTextEventDetails_widget( 47 | "User Name", 48 | widget.data['fullUserName'], 49 | ), 50 | dividerEventDetail(), 51 | itemTextEventDetails_widget( 52 | "Contact Email", 53 | widget.data['contactEmail'], 54 | ), 55 | dividerEventDetail(), 56 | itemTextEventDetails_widget( 57 | "Phone Number", 58 | widget.data['phoneNumber'], 59 | ), 60 | dividerEventDetail(), 61 | itemTextEventDetails_widget( 62 | "Location", 63 | widget.data['eventState'] + ", " + widget.data['eventCity'], 64 | ), 65 | dividerEventDetail(), 66 | itemTextEventDetails_widget( 67 | "Event Type", 68 | widget.data['eventType'], 69 | ), 70 | dividerEventDetail(), 71 | itemTextEventDetails_widget( 72 | "Expected Audience", 73 | widget.data['expectedAudience'], 74 | ), 75 | dividerEventDetail(), 76 | itemTextEventDetails_widget( 77 | "Timing", 78 | widget.data['time'], 79 | ), 80 | dividerEventDetail(), 81 | itemTextEventDetails_widget( 82 | "Date (yyyy-mm-dd)", 83 | widget.data['date'], 84 | ), 85 | dividerEventDetail(), 86 | editEventText_widget(), 87 | ], 88 | ), 89 | ), 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/views/pages/ActiveEvents/Widgets/activeListItem_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/EventDetails_screen/eventDetails_screen.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | Widget activeListItem_widget( 7 | DocumentSnapshot demoThing, int index, FieldPath field) { 8 | return GestureDetector( 9 | onTap: () { 10 | Get.to( 11 | EventDetailsScreen( 12 | data: demoThing.data()["${index + 1}_${field.hashCode}"], 13 | ), 14 | ); 15 | }, 16 | child: Padding( 17 | padding: const EdgeInsets.only( 18 | top: 8.0, 19 | bottom: 8.0, 20 | left: 15.0, 21 | right: 15.0, 22 | ), 23 | child: Container( 24 | decoration: BoxDecoration( 25 | color: Colors.black, 26 | borderRadius: BorderRadius.circular( 27 | 14, 28 | ), 29 | ), 30 | child: Column( 31 | crossAxisAlignment: CrossAxisAlignment.start, 32 | children: [ 33 | Padding( 34 | padding: const EdgeInsets.only( 35 | left: 16.0, 36 | top: 6.0, 37 | bottom: 2.0, 38 | ), 39 | child: Container( 40 | child: Text( 41 | demoThing.data()["${index + 1}_${field.hashCode}"] 42 | ["eventName"], 43 | style: TextStyle( 44 | color: Colors.orange, 45 | fontSize: 22.0, 46 | fontWeight: FontWeight.w500, 47 | ), 48 | ), 49 | ), 50 | ), 51 | Padding( 52 | padding: const EdgeInsets.only( 53 | left: 12.0, 54 | top: 2.0, 55 | bottom: 6.0, 56 | right: 12.0, 57 | ), 58 | child: Row( 59 | children: [ 60 | Icon(Icons.location_on, color: Colors.orange), 61 | Flexible( 62 | child: Text( 63 | demoThing.data()["${index + 1}_${field.hashCode}"] 64 | ["eventCity"] + 65 | ", " + 66 | demoThing.data()["${index + 1}_${field.hashCode}"] 67 | ["eventState"], 68 | maxLines: 9, 69 | overflow: TextOverflow.ellipsis, 70 | style: TextStyle( 71 | color: Colors.orange, 72 | fontSize: 16.0, 73 | fontWeight: FontWeight.w500, 74 | ), 75 | ), 76 | ), 77 | Spacer(), 78 | Flexible( 79 | child: Text( 80 | demoThing.data()["${index + 1}_${field.hashCode}"] 81 | ["date"], 82 | style: TextStyle( 83 | color: Colors.orange, 84 | fontSize: 16.0, 85 | fontWeight: FontWeight.w500, 86 | ), 87 | maxLines: 9, 88 | overflow: TextOverflow.ellipsis, 89 | ), 90 | ), 91 | ], 92 | ), 93 | ), 94 | ], 95 | ), 96 | ), 97 | ), 98 | ); 99 | } 100 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/views/pages/PastEvents/pastEvents_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/activeListItem_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/noActiveOrCancelledItem_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/noEventsExists.dart'; 6 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 7 | 8 | class PastEventsScreen extends StatefulWidget { 9 | @override 10 | _PastEventsScreenState createState() => _PastEventsScreenState(); 11 | } 12 | 13 | class _PastEventsScreenState extends State { 14 | int itemLength = 0; 15 | DocumentSnapshot demoThing; 16 | bool noEventFound = false; 17 | bool noPastEventFound = false; 18 | FieldPath field; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | initialzingDemo(); 24 | } 25 | 26 | void initialzingDemo() async { 27 | CollectionReference users = Firestore.instance.collection("eventList"); 28 | 29 | final FlutterSecureStorage storage = FlutterSecureStorage(); 30 | String email = await storage.read(key: "email"); 31 | final demo = 32 | await Firestore.instance.collection("eventList").document(email).get(); 33 | 34 | field = FieldPath.fromString(email); 35 | 36 | setState(() { 37 | itemLength = demo.data().keys.length; 38 | demoThing = demo; 39 | noEventFound = true; 40 | }); 41 | 42 | if (demoThing != null) { 43 | if (demoThing.data() == null) { 44 | users.document(email).set({}); 45 | } else { 46 | for (int i = 1; i <= demoThing.data().keys.length; i++) { 47 | if (demoThing.data()['${i}_${field.hashCode}']["eventStatus"] == 48 | "expired") { 49 | setState(() { 50 | noPastEventFound = false; 51 | }); 52 | break; 53 | } else { 54 | setState(() { 55 | noPastEventFound = true; 56 | }); 57 | } 58 | } 59 | } 60 | } 61 | } 62 | 63 | @override 64 | Widget build(BuildContext context) { 65 | return Scaffold( 66 | appBar: AppBar( 67 | iconTheme: IconThemeData( 68 | color: Colors.orange, 69 | ), 70 | title: Text( 71 | "Past Events", 72 | style: TextStyle( 73 | color: Colors.orange, 74 | ), 75 | ), 76 | centerTitle: true, 77 | backgroundColor: Colors.black, 78 | ), 79 | body: itemLength == 0 80 | ? noEventFound 81 | ? noActiveOrCancelleditem_widget( 82 | "You don't have any past event.\nYour past events will be shown here.") 83 | : Center(child: CircularProgressIndicator()) 84 | : noPastEventFound 85 | ? noEventsExists(context, "No past events exisits") 86 | : Container( 87 | decoration: BoxDecoration(color: Colors.orange), 88 | height: MediaQuery.of(context).size.height, 89 | width: MediaQuery.of(context).size.width, 90 | child: ListView.builder( 91 | itemCount: itemLength, 92 | itemBuilder: (context, index) { 93 | if (demoThing.data()["${index + 1}_${field.hashCode}"] 94 | ["eventStatus"] == 95 | "expired") 96 | return activeListItem_widget(demoThing, index, field); 97 | else { 98 | return Container(); 99 | } 100 | }, 101 | ), 102 | ), 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /lib/views/pages/ActiveEvents/activeEvents_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/activeListItem_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/noActiveOrCancelledItem_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/noEventsExists.dart'; 6 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 7 | 8 | class ActiveEventsScreen extends StatefulWidget { 9 | @override 10 | _ActiveEventsScreenState createState() => _ActiveEventsScreenState(); 11 | } 12 | 13 | class _ActiveEventsScreenState extends State { 14 | int itemLength = 0; 15 | DocumentSnapshot demoThing; 16 | bool noEventFound = false; 17 | bool noActiveEventFound = false; 18 | FieldPath field; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | initialzingDemo(); 24 | } 25 | 26 | void initialzingDemo() async { 27 | CollectionReference users = Firestore.instance.collection("eventList"); 28 | 29 | final FlutterSecureStorage storage = FlutterSecureStorage(); 30 | String email = await storage.read(key: "email"); 31 | final demo = 32 | await Firestore.instance.collection("eventList").document(email).get(); 33 | 34 | field = FieldPath.fromString(email); 35 | setState(() { 36 | itemLength = demo.data().keys.length; 37 | demoThing = demo; 38 | noEventFound = true; 39 | }); 40 | 41 | if (demoThing != null) { 42 | if (demoThing.data() == null) { 43 | users.document(email).set({}); 44 | } else { 45 | for (int i = 1; i <= demoThing.data().keys.length; i++) { 46 | if (demoThing.data()['${i}_${field.hashCode}']["eventStatus"] == 47 | "active") { 48 | setState(() { 49 | noActiveEventFound = false; 50 | }); 51 | break; 52 | } else { 53 | setState(() { 54 | noActiveEventFound = true; 55 | }); 56 | } 57 | } 58 | } 59 | } 60 | } 61 | 62 | @override 63 | Widget build(BuildContext context) { 64 | return Scaffold( 65 | appBar: AppBar( 66 | iconTheme: IconThemeData( 67 | color: Colors.orange, 68 | ), 69 | title: Text( 70 | "Active Events", 71 | style: TextStyle( 72 | color: Colors.orange, 73 | ), 74 | ), 75 | centerTitle: true, 76 | backgroundColor: Colors.black, 77 | ), 78 | body: itemLength == 0 79 | ? noEventFound 80 | ? noActiveOrCancelleditem_widget( 81 | "You don't have any active event.\nYour active events will be shown here.") 82 | : Center(child: CircularProgressIndicator()) 83 | : noActiveEventFound 84 | ? noEventsExists(context, "No active events exisits") 85 | : Container( 86 | decoration: BoxDecoration(color: Colors.orange), 87 | height: MediaQuery.of(context).size.height, 88 | width: MediaQuery.of(context).size.width, 89 | child: ListView.builder( 90 | itemCount: itemLength, 91 | itemBuilder: (context, index) { 92 | if (demoThing.data()["${index + 1}_${field.hashCode}"] 93 | ["eventStatus"] == 94 | "active") 95 | return activeListItem_widget(demoThing, index, field); 96 | else { 97 | return Container(); 98 | } 99 | }, 100 | ), 101 | ), 102 | ); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /lib/views/pages/CancelledEvents/cancelledEvents_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/activeListItem_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/noActiveOrCancelledItem_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/ActiveEvents/Widgets/noEventsExists.dart'; 6 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 7 | 8 | class CancelledEventsScreen extends StatefulWidget { 9 | @override 10 | _CancelledEventsScreenState createState() => _CancelledEventsScreenState(); 11 | } 12 | 13 | class _CancelledEventsScreenState extends State { 14 | int itemLength = 0; 15 | DocumentSnapshot demoThing; 16 | bool noEventFound = false; 17 | bool noCancelledEventFound = false; 18 | FieldPath field; 19 | 20 | @override 21 | void initState() { 22 | super.initState(); 23 | initialzingDemo(); 24 | } 25 | 26 | void initialzingDemo() async { 27 | CollectionReference users = Firestore.instance.collection("eventList"); 28 | 29 | final FlutterSecureStorage storage = FlutterSecureStorage(); 30 | String email = await storage.read(key: "email"); 31 | final demo = 32 | await Firestore.instance.collection("eventList").document(email).get(); 33 | 34 | field = FieldPath.fromString(email); 35 | 36 | setState(() { 37 | itemLength = demo.data().keys.length; 38 | demoThing = demo; 39 | noEventFound = true; 40 | }); 41 | 42 | if (demoThing != null) { 43 | if (demoThing.data() == null) { 44 | users.document(email).set({}); 45 | } else { 46 | for (int i = 1; i <= demoThing.data().keys.length; i++) { 47 | if (demoThing.data()['${i}_${field.hashCode}']["eventStatus"] == 48 | "cancelled") { 49 | setState(() { 50 | noCancelledEventFound = false; 51 | }); 52 | break; 53 | } else { 54 | setState(() { 55 | noCancelledEventFound = true; 56 | }); 57 | } 58 | } 59 | } 60 | } 61 | } 62 | 63 | @override 64 | Widget build(BuildContext context) { 65 | return Scaffold( 66 | appBar: AppBar( 67 | iconTheme: IconThemeData( 68 | color: Colors.orange, 69 | ), 70 | title: Text( 71 | "Cancelled Events", 72 | style: TextStyle( 73 | color: Colors.orange, 74 | ), 75 | ), 76 | centerTitle: true, 77 | backgroundColor: Colors.black, 78 | ), 79 | body: itemLength == 0 80 | ? noEventFound 81 | ? noActiveOrCancelleditem_widget( 82 | "You don't have any cancelled event.\nYour cancelled events will be shown here.") 83 | : Center(child: CircularProgressIndicator()) 84 | : noCancelledEventFound 85 | ? noEventsExists(context, "No cancelled events exisits") 86 | : Container( 87 | decoration: BoxDecoration(color: Colors.orange), 88 | height: MediaQuery.of(context).size.height, 89 | width: MediaQuery.of(context).size.width, 90 | child: ListView.builder( 91 | itemCount: itemLength, 92 | itemBuilder: (context, index) { 93 | if (demoThing.data()["${index + 1}_${field.hashCode}"] 94 | ["eventStatus"] == 95 | "cancelled") 96 | return activeListItem_widget(demoThing, index, field); 97 | else { 98 | return Container(); 99 | } 100 | }, 101 | ), 102 | ), 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /lib/views/pages/SettingsScreen/settingScreen_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/AboutTheApp/aboutTheApp_screen.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/ContactUs/contactUs_screen.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/EditName/editName_screen.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/FrequentlyAskedQuestions/frequentlyAskedQuestion_widget.dart'; 6 | import 'package:flutter_booking_app_event_creator/views/pages/HelpAndSupport/helpAndSupport_screen.dart'; 7 | import 'package:flutter_booking_app_event_creator/views/pages/SettingsScreen/Widgets/Logout/logout_widget.dart'; 8 | import 'package:flutter_booking_app_event_creator/views/pages/SettingsScreen/Widgets/ShareTheApp/shareTheApp_widget.dart'; 9 | import 'package:flutter_booking_app_event_creator/views/pages/SettingsScreen/Widgets/demo_widget.dart'; 10 | import 'package:flutter_booking_app_event_creator/views/pages/SettingsScreen/Widgets/divider_widget.dart'; 11 | import 'package:flutter_booking_app_event_creator/views/pages/WhatsNew/whatsNew_screen.dart'; 12 | 13 | class SettingScreen extends StatefulWidget { 14 | @override 15 | _SettingScreenState createState() => _SettingScreenState(); 16 | } 17 | 18 | class _SettingScreenState extends State { 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | appBar: AppBar( 23 | backgroundColor: Colors.black.withOpacity( 24 | 0.9, 25 | ), 26 | iconTheme: IconThemeData( 27 | color: Colors.orange, 28 | ), 29 | centerTitle: true, 30 | title: Text( 31 | "Settings", 32 | style: TextStyle( 33 | color: Colors.orange, 34 | ), 35 | ), 36 | ), 37 | body: Container( 38 | width: MediaQuery.of(context).size.width, 39 | height: MediaQuery.of(context).size.height, 40 | decoration: BoxDecoration( 41 | color: Colors.orange, 42 | ), 43 | child: Padding( 44 | padding: const EdgeInsets.only( 45 | left: 15.0, 46 | right: 15.0, 47 | ), 48 | child: SingleChildScrollView( 49 | child: Column( 50 | children: [ 51 | demoWidget( 52 | Icons.edit, 53 | "Edit Name", 54 | EditNameScreen(), 55 | ), 56 | dividerSettingScreen(), 57 | demoWidget( 58 | Icons.info, 59 | "About The App", 60 | AboutTheAppScreen(), 61 | ), 62 | dividerSettingScreen(), 63 | demoWidget( 64 | Icons.help, 65 | "Help & Support", 66 | HelpAndSupportScreen(), 67 | ), 68 | dividerSettingScreen(), 69 | demoWidget( 70 | Icons.question_answer_outlined, 71 | "FAQ's", 72 | FrequentlyAskedQuestionsScreen(), 73 | ), 74 | dividerSettingScreen(), 75 | demoWidget( 76 | Icons.contact_mail, 77 | "Contact Us", 78 | ContactUsScreen(), 79 | ), 80 | dividerSettingScreen(), 81 | demoWidget( 82 | Icons.new_releases_outlined, 83 | "What's New", 84 | WhatsNewScreen(), 85 | ), 86 | dividerSettingScreen(), 87 | shareTheApp_widget( 88 | Icons.share_outlined, 89 | "Share", 90 | ), 91 | dividerSettingScreen(), 92 | logout_widget( 93 | Icons.logout, 94 | "Logout", 95 | ), 96 | dividerSettingScreen(), 97 | ], 98 | ), 99 | ), 100 | ), 101 | ), 102 | ); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /lib/views/pages/ContactUs/contactUs_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/responses/addProblemsToFireStore.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/AddEventsScreen/Widgets/textForField_inputDecoration.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/ContactUs/Widgets/contactUs_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/ContactUs/Widgets/overwrittenText_widget.dart'; 6 | import 'package:get/get.dart'; 7 | 8 | class ContactUsScreen extends StatefulWidget { 9 | @override 10 | _ContactUsScreenState createState() => _ContactUsScreenState(); 11 | } 12 | 13 | class _ContactUsScreenState extends State { 14 | final GlobalKey _formKey = GlobalKey(); 15 | String name, desc; 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: AppBar( 20 | backgroundColor: Colors.black.withOpacity( 21 | 0.9, 22 | ), 23 | iconTheme: IconThemeData( 24 | color: Colors.orange, 25 | ), 26 | centerTitle: true, 27 | title: Text( 28 | "Contact Us", 29 | style: TextStyle( 30 | color: Colors.orange, 31 | ), 32 | ), 33 | ), 34 | body: Container( 35 | decoration: BoxDecoration(color: Colors.orange), 36 | height: MediaQuery.of(context).size.height, 37 | width: MediaQuery.of(context).size.width, 38 | child: SingleChildScrollView( 39 | child: Form( 40 | key: _formKey, 41 | child: Padding( 42 | padding: const EdgeInsets.only(left: 15.0, right: 15.0), 43 | child: Column( 44 | children: [ 45 | TextFormField( 46 | style: TextStyle( 47 | color: Colors.black, 48 | ), 49 | cursorColor: Colors.black, 50 | decoration: textFormField_inputDecoration( 51 | "What should we call you?", null), 52 | onChanged: (value) { 53 | setState(() { 54 | name = value; 55 | }); 56 | }, 57 | validator: (value) { 58 | final validCharacters = RegExp(r'^[a-zA-Z ]*$'); 59 | if (validCharacters.hasMatch(value)) { 60 | if (value.isEmpty || value.length < 3) { 61 | return "Name cannot be less than 4 characters"; 62 | } 63 | } else { 64 | return "Name cannot contain numbers"; 65 | } 66 | return null; 67 | }, 68 | ), 69 | TextFormField( 70 | minLines: 4, 71 | maxLines: 8, 72 | style: TextStyle( 73 | color: Colors.black, 74 | ), 75 | cursorColor: Colors.black, 76 | decoration: textFormField_inputDecoration( 77 | "Describe your problem", null), 78 | onChanged: (value) { 79 | setState(() { 80 | desc = value; 81 | }); 82 | }, 83 | validator: (value) { 84 | if (value.isEmpty || value.length < 5) { 85 | return "Problem should be more than 5 character"; 86 | } 87 | return null; 88 | }, 89 | ), 90 | overwrittenText_widget(), 91 | Padding( 92 | padding: const EdgeInsets.only(top: 18.0), 93 | child: GestureDetector( 94 | onTap: () { 95 | if (_formKey.currentState.validate()) { 96 | addProblemsToFireStore(name, desc); 97 | } else { 98 | Get.snackbar("Something wrong", 99 | "Hey something is not wrong. Please contact the developer."); 100 | } 101 | }, 102 | child: contactUs_widget(context), 103 | ), 104 | ), 105 | ], 106 | ), 107 | ), 108 | ), 109 | ), 110 | ), 111 | ); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /lib/views/pages/EditName/editName_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_booking_app_event_creator/repositories/changeUserDisplayName.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/EditName/Widgets/editButton_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/EditName/Widgets/txtField_inputDecoration.dart'; 6 | import 'package:flutter_booking_app_event_creator/views/pages/EditName/Widgets/userNameText_widget.dart'; 7 | 8 | class EditNameScreen extends StatefulWidget { 9 | @override 10 | _EditNameScreenState createState() => _EditNameScreenState(); 11 | } 12 | 13 | class _EditNameScreenState extends State { 14 | final FirebaseAuth auth = FirebaseAuth.instance; 15 | User user; 16 | String userName; 17 | bool isActive = false; 18 | 19 | void inputData() { 20 | final User _user = auth.currentUser; 21 | 22 | setState(() { 23 | user = _user; 24 | }); 25 | 26 | print(user); 27 | setState(() { 28 | userName = user.displayName == "" || user.displayName == null 29 | ? "No display name found" 30 | : user.displayName; 31 | }); 32 | } 33 | 34 | @override 35 | void initState() { 36 | super.initState(); 37 | inputData(); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Scaffold( 43 | appBar: AppBar( 44 | backgroundColor: Colors.black.withOpacity( 45 | 0.9, 46 | ), 47 | iconTheme: IconThemeData( 48 | color: Colors.orange, 49 | ), 50 | centerTitle: true, 51 | title: Text( 52 | "Edit Name", 53 | style: TextStyle( 54 | color: Colors.orange, 55 | ), 56 | ), 57 | ), 58 | body: Container( 59 | color: Colors.orange, 60 | child: Padding( 61 | padding: const EdgeInsets.only( 62 | left: 15.0, 63 | right: 15.0, 64 | top: 15.0, 65 | ), 66 | child: Column( 67 | children: [ 68 | userNameText_widget(userName), 69 | isActive 70 | ? Padding( 71 | padding: const EdgeInsets.only( 72 | top: 8.0, 73 | bottom: 8.0, 74 | ), 75 | child: Theme( 76 | data: Theme.of(context).copyWith( 77 | primaryColor: Colors.black, 78 | ), 79 | child: TextField( 80 | onChanged: (value) { 81 | print(value); 82 | setState(() { 83 | userName = value; 84 | }); 85 | }, 86 | cursorColor: Colors.black, 87 | decoration: textField_inputDecoration(), 88 | ), 89 | ), 90 | ) 91 | : Container(), 92 | isActive 93 | ? Padding( 94 | padding: const EdgeInsets.only(top: 8.0), 95 | child: Container( 96 | height: 45.0, 97 | child: RaisedButton( 98 | onPressed: () { 99 | changeUserDisplayName(userName); 100 | setState(() { 101 | isActive == true 102 | ? isActive = false 103 | : isActive = true; 104 | }); 105 | }, 106 | color: Colors.black, 107 | child: Text( 108 | "Save New Name", 109 | style: TextStyle( 110 | fontSize: 16.0, 111 | fontWeight: FontWeight.w500, 112 | color: Colors.orange, 113 | ), 114 | ), 115 | ), 116 | ), 117 | ) 118 | : Container(), 119 | GestureDetector( 120 | behavior: HitTestBehavior.opaque, 121 | onTap: () { 122 | setState(() { 123 | isActive == true ? isActive = false : isActive = true; 124 | }); 125 | }, 126 | child: editButton_widget(context), 127 | ), 128 | ], 129 | ), 130 | ), 131 | ), 132 | ); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /lib/views/pages/OverallStats/overallStats_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 4 | 5 | class OverallStats extends StatefulWidget { 6 | @override 7 | _OverallStatsState createState() => _OverallStatsState(); 8 | } 9 | 10 | class _OverallStatsState extends State { 11 | int activeEvents = 0, cancelledEvents = 0, usersRegistered = 0; 12 | @override 13 | void initState() { 14 | // TODO: implement initState 15 | super.initState(); 16 | initializingDemo(); 17 | } 18 | 19 | void initializingDemo() async { 20 | final FlutterSecureStorage storage = FlutterSecureStorage(); 21 | 22 | String email = await storage.read(key: "email"); 23 | FieldPath field = FieldPath.fromString(email); 24 | final demoThing = 25 | await Firestore.instance.collection("eventList").document(email).get(); 26 | print(demoThing.data().keys.length); 27 | for (int i = 0; i < demoThing.data().keys.length; i++) { 28 | if (demoThing.data()["${i + 1}_${field.hashCode}"]['eventStatus'] == 29 | 'active') { 30 | activeEvents++; 31 | } else if (demoThing.data()["${i + 1}_${field.hashCode}"] 32 | ['eventStatus'] == 33 | 'cancelled') { 34 | cancelledEvents++; 35 | } 36 | usersRegistered += demoThing 37 | .data()["${i + 1}_${field.hashCode}"]['registeredUsers'] 38 | .length; 39 | setState(() {}); 40 | } 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return Scaffold( 46 | appBar: AppBar( 47 | iconTheme: IconThemeData( 48 | color: Colors.orange, 49 | ), 50 | backgroundColor: Colors.black.withOpacity(0.9), 51 | elevation: 0, 52 | title: Text( 53 | "Overall Stats", 54 | style: TextStyle( 55 | color: Colors.orange, 56 | ), 57 | ), 58 | centerTitle: true, 59 | ), 60 | body: Container( 61 | decoration: BoxDecoration( 62 | color: Colors.orange, 63 | ), 64 | height: MediaQuery.of(context).size.height, 65 | width: MediaQuery.of(context).size.width, 66 | child: Padding( 67 | padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0), 68 | child: Column( 69 | children: [ 70 | Row( 71 | children: [ 72 | Text( 73 | "Total Active Events", 74 | style: TextStyle( 75 | fontSize: 24, 76 | fontWeight: FontWeight.w700 , 77 | ), 78 | ), 79 | Spacer(), 80 | Text( 81 | "$activeEvents", 82 | style: TextStyle( 83 | fontSize: 24, 84 | fontWeight: FontWeight.w700 , 85 | ), 86 | ), 87 | ], 88 | ), 89 | SizedBox( 90 | height: 12, 91 | ), 92 | Row( 93 | children: [ 94 | Text( 95 | "Total Cancelled Events", 96 | style: TextStyle( 97 | fontSize: 24, 98 | fontWeight: FontWeight.w700 , 99 | ), 100 | ), 101 | Spacer(), 102 | Text( 103 | "$cancelledEvents", 104 | style: TextStyle( 105 | fontSize: 24, 106 | fontWeight: FontWeight.w700 , 107 | ), 108 | ), 109 | ], 110 | ), 111 | SizedBox( 112 | height: 12, 113 | ), 114 | Row( 115 | children: [ 116 | Text( 117 | "Total users registered", 118 | style: TextStyle( 119 | fontSize: 24, 120 | fontWeight: FontWeight.w700 , 121 | ), 122 | ), 123 | Spacer(), 124 | Text( 125 | "$usersRegistered", 126 | style: TextStyle( 127 | fontSize: 24, 128 | fontWeight: FontWeight.w700 , 129 | ), 130 | ), 131 | ], 132 | ), 133 | ], 134 | ), 135 | ), 136 | ), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/views/pages/RegisteredUsers/registeredUsers_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class RegisteredUsers extends StatefulWidget { 5 | RegisteredUsers(this.snapshot, int this.index, String this.email); 6 | dynamic snapshot; 7 | int index; 8 | String email; 9 | 10 | @override 11 | _RegisteredUsersState createState() => _RegisteredUsersState(); 12 | } 13 | 14 | class _RegisteredUsersState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | FieldPath field = FieldPath.fromString(widget.email); 18 | 19 | return Scaffold( 20 | appBar: AppBar( 21 | iconTheme: IconThemeData( 22 | color: Colors.orange, 23 | ), 24 | backgroundColor: Colors.black.withOpacity(0.9), 25 | elevation: 0, 26 | centerTitle: true, 27 | title: Text( 28 | "Registered Users", 29 | style: TextStyle( 30 | color: Colors.orange, 31 | ), 32 | ), 33 | ), 34 | body: Container( 35 | height: MediaQuery.of(context).size.height, 36 | width: MediaQuery.of(context).size.width, 37 | decoration: BoxDecoration( 38 | color: Colors.orange, 39 | ), 40 | child: 41 | widget 42 | .snapshot 43 | .data["${widget.index + 1}_${field.hashCode}"] 44 | ['registeredUsers'] 45 | .isEmpty == 46 | true 47 | ? Padding( 48 | padding: const EdgeInsets.only(top: 18.0), 49 | child: Container( 50 | alignment: Alignment.topCenter, 51 | child: Text( 52 | "No user has registered for this particular event.", 53 | style: TextStyle( 54 | color: Colors.black, 55 | fontSize: 20.0, 56 | fontWeight: FontWeight.bold), 57 | textAlign: TextAlign.center, 58 | ), 59 | ), 60 | ) 61 | : ListView.builder( 62 | itemBuilder: (context, index) { 63 | return Padding( 64 | padding: const EdgeInsets.only( 65 | left: 15, 66 | right: 15.0, 67 | top: 4.0, 68 | bottom: 4.0, 69 | ), 70 | child: Container( 71 | decoration: BoxDecoration( 72 | color: Colors.black.withOpacity( 73 | 0.9, 74 | ), 75 | borderRadius: BorderRadius.circular( 76 | 14.0, 77 | ), 78 | ), 79 | child: Padding( 80 | padding: const EdgeInsets.all( 81 | 8.0, 82 | ), 83 | child: Column( 84 | children: [ 85 | Text( 86 | widget.snapshot.data[ 87 | "${widget.index + 1}_${field.hashCode}"] 88 | ['registeredUsers'][index]['email'], 89 | style: TextStyle( 90 | color: Colors.orange, 91 | fontWeight: FontWeight.w700, 92 | fontSize: 20.0, 93 | ), 94 | ), 95 | Padding( 96 | padding: const EdgeInsets.only( 97 | left: 8.0, 98 | right: 8.0, 99 | ), 100 | child: Row( 101 | children: [ 102 | Padding( 103 | padding: 104 | const EdgeInsets.only(right: 8.0), 105 | child: Icon( 106 | Icons.home, 107 | color: Colors.orange, 108 | ), 109 | ), 110 | Spacer(), 111 | Text( 112 | widget.snapshot.data[ 113 | "${widget.index + 1}_${field.hashCode}"] 114 | ['registeredUsers'][index] 115 | ['city'] + 116 | " " + 117 | widget.snapshot.data[ 118 | "${widget.index + 1}_${field.hashCode}"] 119 | ['registeredUsers'][index] 120 | ['state'], 121 | style: TextStyle( 122 | color: Colors.orange, 123 | fontWeight: FontWeight.w700, 124 | fontSize: 16.0, 125 | ), 126 | ), 127 | ], 128 | ), 129 | ), 130 | ], 131 | ), 132 | ), 133 | ), 134 | ); 135 | }, 136 | itemCount: widget 137 | .snapshot 138 | .data["${widget.index + 1}_${field.hashCode}"] 139 | ['registeredUsers'] 140 | .length, 141 | ), 142 | )); 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /lib/views/pages/LoginScreen/login_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/LoginScreen/Widgets/loginButton_widget.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/LoginScreen/Widgets/loginWithGoogleButton_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/LoginScreen/Widgets/newuserText_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/LoginScreen/Widgets/signUpButton_widget.dart'; 6 | 7 | class LoginScreen extends StatefulWidget { 8 | @override 9 | _LoginScreenState createState() => _LoginScreenState(); 10 | } 11 | 12 | class _LoginScreenState extends State { 13 | String email, password; 14 | final GlobalKey _formKey = GlobalKey(); 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | body: Container( 19 | height: MediaQuery.of(context).size.height, 20 | width: MediaQuery.of(context).size.width, 21 | color: Colors.black, 22 | child: SafeArea( 23 | child: Padding( 24 | padding: const EdgeInsets.only(left: 15.0, right: 15.0), 25 | child: Stack( 26 | children: [ 27 | Container( 28 | alignment: Alignment.bottomCenter, 29 | height: MediaQuery.of(context).size.height, 30 | width: MediaQuery.of(context).size.width, 31 | child: SingleChildScrollView( 32 | child: Form( 33 | key: _formKey, 34 | child: Column( 35 | crossAxisAlignment: CrossAxisAlignment.center, 36 | children: [ 37 | Padding( 38 | padding: const EdgeInsets.only( 39 | bottom: 58.0, 40 | ), 41 | child: Container( 42 | width: MediaQuery.of(context).size.width, 43 | alignment: Alignment.topCenter, 44 | child: Text( 45 | "Login", 46 | style: TextStyle( 47 | color: Colors.orange, 48 | fontWeight: FontWeight.w700, 49 | letterSpacing: 1.6, 50 | fontSize: 40.0, 51 | ), 52 | ), 53 | ), 54 | ), 55 | Padding( 56 | padding: const EdgeInsets.only(bottom: 25.0), 57 | child: TextFormField( 58 | cursorColor: Colors.orange, 59 | style: TextStyle(color: Colors.orange), 60 | decoration: InputDecoration( 61 | enabledBorder: UnderlineInputBorder( 62 | borderSide: BorderSide(color: Colors.orange), 63 | ), 64 | focusedBorder: UnderlineInputBorder( 65 | borderSide: BorderSide(color: Colors.orange), 66 | ), 67 | border: UnderlineInputBorder( 68 | borderSide: BorderSide(color: Colors.orange), 69 | ), 70 | labelText: "Email", 71 | labelStyle: TextStyle(color: Colors.orange), 72 | errorStyle: TextStyle( 73 | color: Colors.orange, 74 | fontSize: 16.0, 75 | ), 76 | ), 77 | onChanged: (value) { 78 | setState(() { 79 | email = value; 80 | }); 81 | }, 82 | validator: (value) { 83 | bool emailValid = RegExp( 84 | r'^.+@[a-zA-Z]+\.{1}[a-zA-Z]+(\.{0,1}[a-zA-Z]+)$') 85 | .hasMatch(value); 86 | if (value.isEmpty || 87 | value.length < 4 || 88 | !emailValid) { 89 | return 'Please enter some text'; 90 | } 91 | return null; 92 | }, 93 | ), 94 | ), 95 | Padding( 96 | padding: const EdgeInsets.only(bottom: 25.0), 97 | child: TextFormField( 98 | cursorColor: Colors.orange, 99 | obscureText: true, 100 | style: TextStyle(color: Colors.orange), 101 | decoration: InputDecoration( 102 | enabledBorder: UnderlineInputBorder( 103 | borderSide: BorderSide(color: Colors.orange), 104 | ), 105 | focusedBorder: UnderlineInputBorder( 106 | borderSide: BorderSide(color: Colors.orange), 107 | ), 108 | border: UnderlineInputBorder( 109 | borderSide: BorderSide(color: Colors.orange), 110 | ), 111 | labelText: "Password", 112 | labelStyle: TextStyle(color: Colors.orange), 113 | errorStyle: TextStyle( 114 | color: Colors.orange, 115 | fontSize: 16.0, 116 | ), 117 | ), 118 | onChanged: (value) { 119 | setState(() { 120 | password = value; 121 | }); 122 | }, 123 | validator: (value) { 124 | if (value.isEmpty || value.length < 6) { 125 | return 'Password should 6 characters or long'; 126 | } 127 | return null; 128 | }, 129 | ), 130 | ), 131 | loginButtonLoginScreen( 132 | context, _formKey, email, password), 133 | loginWithGoogleButton(), 134 | newUserText(), 135 | signUpButton() 136 | ], 137 | ), 138 | )), 139 | ) 140 | ], 141 | )), 142 | ), 143 | ), 144 | ); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /lib/views/pages/SignUpScreen/signUp_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_booking_app_event_creator/views/pages/SignUpScreen/Widgets/alreadyAUserText_widget.dart'; 3 | import 'package:flutter_booking_app_event_creator/views/pages/SignUpScreen/Widgets/loginButton_widget.dart'; 4 | import 'package:flutter_booking_app_event_creator/views/pages/SignUpScreen/Widgets/signUpButtonSingUpScreen_widget.dart'; 5 | import 'package:flutter_booking_app_event_creator/views/pages/SignUpScreen/Widgets/signUpWithGoogleButton_widget.dart'; 6 | 7 | class SignUpScreen extends StatefulWidget { 8 | @override 9 | _SignUpScreenState createState() => _SignUpScreenState(); 10 | } 11 | 12 | class _SignUpScreenState extends State { 13 | final GlobalKey _formKey = GlobalKey(); 14 | String email, pass, confPass; 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | body: Container( 19 | height: MediaQuery.of(context).size.height, 20 | width: MediaQuery.of(context).size.width, 21 | color: Colors.orange, 22 | child: SafeArea( 23 | child: Padding( 24 | padding: const EdgeInsets.only(left: 15.0, right: 15.0), 25 | child: Stack( 26 | children: [ 27 | Container( 28 | alignment: Alignment.bottomCenter, 29 | height: MediaQuery.of(context).size.height, 30 | width: MediaQuery.of(context).size.width, 31 | child: SingleChildScrollView( 32 | child: Form( 33 | key: _formKey, 34 | child: Column( 35 | crossAxisAlignment: CrossAxisAlignment.center, 36 | children: [ 37 | Padding( 38 | padding: const EdgeInsets.only(bottom: 58), 39 | child: Container( 40 | width: MediaQuery.of(context).size.width, 41 | alignment: Alignment.topCenter, 42 | child: Text( 43 | "Sign Up", 44 | style: TextStyle( 45 | color: Colors.black, 46 | fontWeight: FontWeight.w700, 47 | letterSpacing: 1.6, 48 | fontSize: 40.0, 49 | ), 50 | ), 51 | ), 52 | ), 53 | Padding( 54 | padding: const EdgeInsets.only(bottom: 25.0), 55 | child: TextFormField( 56 | style: TextStyle(color: Colors.black), 57 | decoration: InputDecoration( 58 | enabledBorder: UnderlineInputBorder( 59 | borderSide: BorderSide(color: Colors.black), 60 | ), 61 | focusedBorder: UnderlineInputBorder( 62 | borderSide: BorderSide(color: Colors.black), 63 | ), 64 | border: UnderlineInputBorder( 65 | borderSide: BorderSide(color: Colors.black), 66 | ), 67 | labelText: "Email", 68 | labelStyle: TextStyle(color: Colors.black), 69 | errorStyle: TextStyle( 70 | color: Colors.black, 71 | fontSize: 16.0, 72 | ), 73 | ), 74 | onChanged: (value) { 75 | setState(() { 76 | email = value; 77 | }); 78 | }, 79 | validator: (value) { 80 | bool emailValid = RegExp( 81 | r'^.+@[a-zA-Z]+\.{1}[a-zA-Z]+(\.{0,1}[a-zA-Z]+)$') 82 | .hasMatch(value); 83 | if (value.isEmpty || 84 | value.length < 4 || 85 | !emailValid) { 86 | return 'Please enter some text'; 87 | } 88 | return null; 89 | }, 90 | ), 91 | ), 92 | Padding( 93 | padding: const EdgeInsets.only(bottom: 25.0), 94 | child: TextFormField( 95 | obscureText: true, 96 | decoration: InputDecoration( 97 | enabledBorder: UnderlineInputBorder( 98 | borderSide: BorderSide(color: Colors.black), 99 | ), 100 | focusedBorder: UnderlineInputBorder( 101 | borderSide: BorderSide(color: Colors.black), 102 | ), 103 | border: UnderlineInputBorder( 104 | borderSide: BorderSide(color: Colors.black), 105 | ), 106 | labelText: "Password", 107 | labelStyle: TextStyle(color: Colors.black), 108 | errorStyle: TextStyle( 109 | color: Colors.black, 110 | fontSize: 16.0, 111 | ), 112 | ), 113 | onChanged: (value) { 114 | setState(() { 115 | pass = value; 116 | }); 117 | }, 118 | validator: (value) { 119 | if (value.isEmpty || value.length < 6) { 120 | return 'Password should 6 characters or long'; 121 | } 122 | return null; 123 | }, 124 | ), 125 | ), 126 | Padding( 127 | padding: const EdgeInsets.only(bottom: 25.0), 128 | child: TextFormField( 129 | obscureText: true, 130 | decoration: InputDecoration( 131 | enabledBorder: UnderlineInputBorder( 132 | borderSide: BorderSide(color: Colors.black), 133 | ), 134 | focusedBorder: UnderlineInputBorder( 135 | borderSide: BorderSide(color: Colors.black), 136 | ), 137 | border: UnderlineInputBorder( 138 | borderSide: BorderSide(color: Colors.black), 139 | ), 140 | labelText: "Confirm Password", 141 | labelStyle: TextStyle(color: Colors.black), 142 | errorStyle: TextStyle( 143 | color: Colors.black, 144 | fontSize: 16.0, 145 | ), 146 | ), 147 | onChanged: (value) { 148 | setState(() { 149 | confPass = value; 150 | }); 151 | }, 152 | validator: (value) { 153 | if (value.isEmpty || value.length < 6) { 154 | return 'Password should 6 characters or long'; 155 | } else if (confPass != pass) { 156 | return "Passwords do not match"; 157 | } 158 | return null; 159 | }, 160 | ), 161 | ), 162 | signUpButtonSignUpScreen( 163 | context, _formKey, email, pass), 164 | signUpWithGoogleButton(), 165 | alreadyAUserText(), 166 | loginButtonSignUpScreen() 167 | ], 168 | ), 169 | )), 170 | ) 171 | ], 172 | )), 173 | ), 174 | ), 175 | ); 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /lib/views/pages/MainScreen/mainScreen_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:firebase_messaging/firebase_messaging.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_booking_app_event_creator/blocs/mainScreen_bloc.dart'; 5 | import 'package:flutter_booking_app_event_creator/repositories/logoutUser.dart'; 6 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/EventItem/activeEventTile_widget.dart'; 7 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/EventItem/addEventButton_widget.dart'; 8 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/EventItem/cancelledEventTile_widget.dart'; 9 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/EventItem/dateAndTime_widget.dart'; 10 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/EventItem/detailsText_widget.dart'; 11 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/EventItem/eventName_widget.dart'; 12 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/EventItem/eventStatusText_widget.dart'; 13 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/EventItem/locationAndEdit_widget.dart'; 14 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/aboutTheUserTile_widget.dart'; 15 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/createNewEventsTile_widget.dart'; 16 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/drawerDivider_widget.dart'; 17 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/drawerHeader_widget.dart'; 18 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/overAllStatsTile_widget.dart'; 19 | import 'package:flutter_booking_app_event_creator/views/pages/MainScreen/Widgets/pastEventTile_widget.dart'; 20 | import 'package:flutter_booking_app_event_creator/views/pages/SettingsScreen/settingScreen_screen.dart'; 21 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 22 | import 'package:get/get.dart'; 23 | 24 | class MainScreen extends StatefulWidget { 25 | @override 26 | _MainScreenState createState() => _MainScreenState(); 27 | } 28 | 29 | class _MainScreenState extends State { 30 | final MainScreenBloc mainScreen_bloc = MainScreenBloc(); 31 | String email; 32 | final _firebaseMessagin = FirebaseMessaging(); 33 | String _message = "message"; 34 | String _token = "generating token"; 35 | 36 | @override 37 | void initState() { 38 | mainScreen_bloc.eventSink.add(MainScreenActions.Fetch); 39 | super.initState(); 40 | _firebaseMessagin.configure( 41 | onMessage: (Map message) async { 42 | setState(() => _message = "$message"); 43 | }, onResume: (Map message) async { 44 | setState(() => _message = "$message"); 45 | }, onLaunch: (Map message) async { 46 | setState(() => _message = "$message"); 47 | }); 48 | 49 | _firebaseMessagin.getToken().then((token) { 50 | setState(() { 51 | _token = "$token"; 52 | }); 53 | }); 54 | 55 | initialzingDemo(); 56 | } 57 | 58 | @override 59 | void dispose() { 60 | super.dispose(); 61 | mainScreen_bloc.dispose(); 62 | } 63 | 64 | // In this we will be initializing a blank data base field for our new user 65 | void initialzingDemo() async { 66 | CollectionReference users = Firestore.instance.collection("eventList"); 67 | 68 | final FlutterSecureStorage storage = FlutterSecureStorage(); 69 | email = await storage.read(key: "email"); 70 | setState(() {}); 71 | 72 | final demoThing = 73 | await Firestore.instance.collection("eventList").document(email).get(); 74 | if (demoThing.data() == null) { 75 | users.document(email).set({}); 76 | } 77 | } 78 | 79 | @override 80 | Widget build(BuildContext context) { 81 | return Scaffold( 82 | appBar: AppBar( 83 | iconTheme: IconThemeData( 84 | color: Colors.orange, 85 | ), 86 | backgroundColor: Colors.black.withOpacity(0.9), 87 | elevation: 0, 88 | title: Text( 89 | "Eventizer", 90 | style: TextStyle( 91 | color: Colors.orange, 92 | ), 93 | ), 94 | centerTitle: true, 95 | actions: [ 96 | PopupMenuButton( 97 | color: Colors.black, 98 | onSelected: handleClick, 99 | itemBuilder: (BuildContext context) { 100 | return {'Settings', 'Logout'}.map((String choice) { 101 | return PopupMenuItem( 102 | value: choice, 103 | child: Text( 104 | choice, 105 | style: TextStyle( 106 | color: Colors.orange, 107 | fontWeight: FontWeight.w500, 108 | ), 109 | ), 110 | ); 111 | }).toList(); 112 | }, 113 | ), 114 | ], 115 | ), 116 | drawer: Drawer( 117 | child: ListView( 118 | children: [ 119 | drawerHeader(email), 120 | aboutTheUserTile(), 121 | drawerDivider_widget(), 122 | createNewEventTile(), 123 | drawerDivider_widget(), 124 | ExpansionTile( 125 | trailing: Icon( 126 | Icons.keyboard_arrow_down, 127 | color: Colors.orange, 128 | ), 129 | title: Text( 130 | "Events", 131 | style: TextStyle( 132 | color: Colors.orange, 133 | ), 134 | ), 135 | children: [ 136 | drawerDivider_widget(), 137 | pastEventTile(), 138 | drawerDivider_widget(), 139 | activeEventTile(), 140 | drawerDivider_widget(), 141 | cancelledEventTile(), 142 | ], 143 | ), 144 | drawerDivider_widget(), 145 | overAllStateTile(), 146 | drawerDivider_widget(), 147 | ], 148 | ), 149 | ), 150 | body: Container( 151 | height: MediaQuery.of(context).size.height, 152 | width: MediaQuery.of(context).size.width, 153 | color: Colors.orange, 154 | child: Column( 155 | children: [ 156 | addEventButton(), 157 | StreamBuilder( 158 | stream: mainScreen_bloc.mainScreenStream, 159 | builder: (context, snapshot) { 160 | mainScreen_bloc.eventSink.add(MainScreenActions.Fetch); 161 | if (snapshot.hasError) { 162 | return Container( 163 | child: Text( 164 | snapshot.error.toString(), 165 | textAlign: TextAlign.center, 166 | ), 167 | ); 168 | } 169 | if (snapshot.hasData) { 170 | if (snapshot.data.keys.length == 0) { 171 | return Container(child: Text("Add your first event")); 172 | } else { 173 | return Expanded( 174 | child: ListView.builder( 175 | itemCount: snapshot.data.keys.length, 176 | itemBuilder: (context, index) { 177 | return Padding( 178 | padding: const EdgeInsets.only( 179 | left: 15.0, 180 | right: 15.0, 181 | top: 4.0, 182 | bottom: 4.0), 183 | child: Container( 184 | decoration: BoxDecoration( 185 | color: Colors.black.withOpacity( 186 | 0.9, 187 | ), 188 | borderRadius: BorderRadius.circular( 189 | 14.0, 190 | ), 191 | ), 192 | child: Padding( 193 | padding: const EdgeInsets.all(8.0), 194 | child: Column( 195 | children: [ 196 | eventName_widget(snapshot, index, email), 197 | dateAndTime_widget( 198 | snapshot, index, email), 199 | locationAndEdit_widget( 200 | snapshot, index, email), 201 | eventStatusText_widget( 202 | snapshot, index, email), 203 | detailsText_widget( 204 | snapshot, index, email), 205 | ], 206 | ), 207 | ), 208 | ), 209 | ); 210 | }), 211 | ); 212 | } 213 | } 214 | return CircularProgressIndicator(); 215 | }, 216 | ) 217 | ], 218 | ), 219 | ), 220 | ); 221 | } 222 | 223 | void handleClick(String value) { 224 | switch (value) { 225 | case 'Logout': 226 | loggingOut(); 227 | break; 228 | case 'Settings': 229 | Get.to(SettingScreen()); 230 | break; 231 | } 232 | } 233 | } 234 | --------------------------------------------------------------------------------