From 42407f2e4df14e6b87cc1850aa284c0d34cc5e48 Mon Sep 17 00:00:00 2001
From: Deepanshu Rohilla <52520071+Deepanshu-Rohilla@users.noreply.github.com>
Date: Mon, 12 Apr 2021 13:42:29 +0530
Subject: [PATCH 1/9] Update pubspec.yaml
---
pubspec.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pubspec.yaml b/pubspec.yaml
index 5c73a02..5e0cf83 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -24,7 +24,7 @@ dependencies:
firebase_auth: ^0.14.0+5
cloud_firestore: ^0.13.5
firebase_core: ^0.4.2+1
- provider: ^3.1.0
+ provider: ^4.3.3
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
flutter_spinkit: "^4.1.2"
From c448f8ea1ea6d55a6c63e409c79c94be145f61ab Mon Sep 17 00:00:00 2001
From: Vishal Singh <31121102+tmibvishal@users.noreply.github.com>
Date: Mon, 19 Jul 2021 00:51:53 +0530
Subject: [PATCH 2/9] Delete .vscode directory
---
.vscode/launch.json | 13 -------------
1 file changed, 13 deletions(-)
delete mode 100644 .vscode/launch.json
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 3287bb6..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // Use IntelliSense to learn about possible attributes.
- // Hover to view descriptions of existing attributes.
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Flutter",
- "request": "launch",
- "type": "dart"
- }
- ]
-}
\ No newline at end of file
From 463e46c9729d794b3106155205452bf331566fd1 Mon Sep 17 00:00:00 2001
From: Vishal Singh <31121102+tmibvishal@users.noreply.github.com>
Date: Mon, 19 Jul 2021 00:52:16 +0530
Subject: [PATCH 3/9] Update .gitignore
---
.gitignore | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index b42e95d..efb7b97 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,4 +38,7 @@ lib/generated_plugin_registrant.dart
# Deploy Bot
.gitsecret/keys/random_seed
-!*.secret
\ No newline at end of file
+!*.secret
+
+# VS Code
+.vscode
From e2cb7a4e7875f3f677340ab39f1ebbd189ec363e Mon Sep 17 00:00:00 2001
From: as1605 <1605.aditya.singh@gmail.com>
Date: Sun, 19 Dec 2021 16:06:21 +0530
Subject: [PATCH 4/9] Upgraded dependencies. Compiles successfully. need to fix
firebase runtime errors
---
android/app/build.gradle | 4 +-
android/build.gradle | 2 +-
.../gradle/wrapper/gradle-wrapper.properties | 2 +-
functions/index.js | 2 +-
ios/Flutter/AppFrameworkInfo.plist | 2 +-
ios/Podfile | 81 +-
ios/Podfile.lock | 714 ++++++++++--------
ios/Runner.xcodeproj/project.pbxproj | 65 +-
.../contents.xcworkspacedata | 2 +-
.../xcshareddata/xcschemes/Runner.xcscheme | 2 +-
lib/main.dart | 90 ++-
lib/screens/authenticate/change_email.dart | 27 +-
lib/screens/authenticate/forgotpass.dart | 8 +-
lib/screens/authenticate/register.dart | 26 +-
lib/screens/authenticate/sign_in.dart | 14 +-
.../authenticate/verified_email_check.dart | 55 +-
.../chatscreen/chat_database/database.dart | 25 +-
lib/screens/chatscreen/chat_screen.dart | 15 +-
.../chatscreen/chat_widgets/chat_bubble.dart | 4 +-
.../chatscreen/chat_widgets/chat_tile.dart | 4 +-
.../chat_widgets/chat_users_list.dart | 22 +-
.../chatscreen/chat_widgets/message.dart | 79 +-
.../chatscreen/chat_widgets/new_message.dart | 20 +-
lib/screens/createtrip.dart | 18 +-
lib/screens/dashboard.dart | 36 +-
lib/screens/edituserdetails.dart | 98 ++-
lib/screens/filter.dart | 8 +-
.../ended_group_details.dart | 119 ++-
.../groupdetailscreen/groupdetails.dart | 397 +++++++---
lib/screens/groupscreen/editgroup.dart | 119 ++-
lib/screens/groupscreen/group.dart | 545 +++++++++----
.../notifications/services/database.dart | 184 +++--
.../notifications/widgets/notifslist.dart | 45 +-
.../notifications/widgets/notiftile.dart | 12 +-
lib/screens/profile/userprofile.dart | 201 +++--
lib/screens/requests/myrequests.dart | 161 ++--
lib/screens/rootscreen.dart | 10 +-
lib/screens/settings.dart | 119 ++-
lib/screens/tripslist.dart | 205 +++--
lib/screens/wrapper.dart | 10 +-
lib/services/auth.dart | 45 +-
lib/services/database.dart | 201 +++--
lib/shared/loading.dart | 2 +-
pubspec.lock | 114 +--
pubspec.yaml | 10 +-
45 files changed, 2589 insertions(+), 1335 deletions(-)
diff --git a/android/app/build.gradle b/android/app/build.gradle
index da41d48..cfa651c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 28
+ compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
@@ -39,7 +39,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.devclub.shareacab"
minSdkVersion 21
- targetSdkVersion 28
+ targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
diff --git a/android/build.gradle b/android/build.gradle
index de57df6..70943ca 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -6,7 +6,7 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.5.3'
+ classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2'
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 296b146..bc6a58a 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
diff --git a/functions/index.js b/functions/index.js
index e25fc5e..812a562 100644
--- a/functions/index.js
+++ b/functions/index.js
@@ -4,7 +4,7 @@ const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
-exports.myFunction = functions.firestore.document('chatroom/{chatroomid}/chats/{chatsId}').onCreate(async (snapshot, context) => {
+exports.myFunction = functions.firestore.doc('chatroom/{chatroomid}/chats/{chatsId}').onCreate(async (snapshot, context) => {
var docId;
var tokens = [];
var usersChat = [];
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 6b4c0f7..8c6e561 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 8.0
+ 12.0
diff --git a/ios/Podfile b/ios/Podfile
index b30a428..2c068c4 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-# platform :ios, '9.0'
+platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -10,81 +10,32 @@ project 'Runner', {
'Release' => :release,
}
-def parse_KV_file(file, separator='=')
- file_abs_path = File.expand_path(file)
- if !File.exists? file_abs_path
- return [];
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
- generated_key_values = {}
- skip_line_start_symbols = ["#", "/"]
- File.foreach(file_abs_path) do |line|
- next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
- plugin = line.split(pattern=separator)
- if plugin.length == 2
- podname = plugin[0].strip()
- path = plugin[1].strip()
- podpath = File.expand_path("#{path}", file_abs_path)
- generated_key_values[podname] = podpath
- else
- puts "Invalid plugin specification: #{line}"
- end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
end
- generated_key_values
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
target 'Runner' do
use_frameworks!
use_modular_headers!
-
- # Flutter Pod
- copied_flutter_dir = File.join(__dir__, 'Flutter')
- copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
- copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
- unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
- # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
- # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
- # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
-
- generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
- unless File.exist?(generated_xcode_build_settings_path)
- raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
- end
- generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
- cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
-
- unless File.exist?(copied_framework_path)
- FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
- end
- unless File.exist?(copied_podspec_path)
- FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
- end
- end
-
- # Keep pod path relative so it can be checked into Podfile.lock.
- pod 'Flutter', :path => 'Flutter'
-
- # Plugin Pods
-
- # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
- # referring to absolute paths on developers' machines.
- system('rm -rf .symlinks')
- system('mkdir -p .symlinks/plugins')
- plugin_pods = parse_KV_file('../.flutter-plugins')
- plugin_pods.each do |name, path|
- symlink = File.join('.symlinks', 'plugins', name)
- File.symlink(path, symlink)
- pod name, :path => File.join(symlink, 'ios')
- end
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
-# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
-install! 'cocoapods', :disable_input_output_paths => true
-
post_install do |installer|
installer.pods_project.targets.each do |target|
- target.build_configurations.each do |config|
- config.build_settings['ENABLE_BITCODE'] = 'NO'
- end
+ flutter_additional_ios_build_settings(target)
end
end
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 57a4e57..6387e6d 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,140 +1,320 @@
PODS:
- - abseil/algorithm (0.20190808):
- - abseil/algorithm/algorithm (= 0.20190808)
- - abseil/algorithm/container (= 0.20190808)
- - abseil/algorithm/algorithm (0.20190808)
- - abseil/algorithm/container (0.20190808):
+ - abseil/algorithm (0.20200225.0):
+ - abseil/algorithm/algorithm (= 0.20200225.0)
+ - abseil/algorithm/container (= 0.20200225.0)
+ - abseil/algorithm/algorithm (0.20200225.0):
+ - abseil/base/config
+ - abseil/algorithm/container (0.20200225.0):
- abseil/algorithm/algorithm
- abseil/base/core_headers
- abseil/meta/type_traits
- - abseil/base (0.20190808):
- - abseil/base/atomic_hook (= 0.20190808)
- - abseil/base/base (= 0.20190808)
- - abseil/base/base_internal (= 0.20190808)
- - abseil/base/bits (= 0.20190808)
- - abseil/base/config (= 0.20190808)
- - abseil/base/core_headers (= 0.20190808)
- - abseil/base/dynamic_annotations (= 0.20190808)
- - abseil/base/endian (= 0.20190808)
- - abseil/base/log_severity (= 0.20190808)
- - abseil/base/malloc_internal (= 0.20190808)
- - abseil/base/pretty_function (= 0.20190808)
- - abseil/base/spinlock_wait (= 0.20190808)
- - abseil/base/throw_delegate (= 0.20190808)
- - abseil/base/atomic_hook (0.20190808)
- - abseil/base/base (0.20190808):
+ - abseil/base (0.20200225.0):
+ - abseil/base/atomic_hook (= 0.20200225.0)
+ - abseil/base/base (= 0.20200225.0)
+ - abseil/base/base_internal (= 0.20200225.0)
+ - abseil/base/bits (= 0.20200225.0)
+ - abseil/base/config (= 0.20200225.0)
+ - abseil/base/core_headers (= 0.20200225.0)
+ - abseil/base/dynamic_annotations (= 0.20200225.0)
+ - abseil/base/endian (= 0.20200225.0)
+ - abseil/base/errno_saver (= 0.20200225.0)
+ - abseil/base/exponential_biased (= 0.20200225.0)
+ - abseil/base/log_severity (= 0.20200225.0)
+ - abseil/base/malloc_internal (= 0.20200225.0)
+ - abseil/base/periodic_sampler (= 0.20200225.0)
+ - abseil/base/pretty_function (= 0.20200225.0)
+ - abseil/base/raw_logging_internal (= 0.20200225.0)
+ - abseil/base/spinlock_wait (= 0.20200225.0)
+ - abseil/base/throw_delegate (= 0.20200225.0)
+ - abseil/base/atomic_hook (0.20200225.0):
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/base/base (0.20200225.0):
- abseil/base/atomic_hook
- abseil/base/base_internal
- abseil/base/config
- abseil/base/core_headers
- abseil/base/dynamic_annotations
- abseil/base/log_severity
+ - abseil/base/raw_logging_internal
- abseil/base/spinlock_wait
- abseil/meta/type_traits
- - abseil/base/base_internal (0.20190808):
+ - abseil/base/base_internal (0.20200225.0):
+ - abseil/base/config
- abseil/meta/type_traits
- - abseil/base/bits (0.20190808):
+ - abseil/base/bits (0.20200225.0):
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/base/config (0.20200225.0)
+ - abseil/base/core_headers (0.20200225.0):
+ - abseil/base/config
+ - abseil/base/dynamic_annotations (0.20200225.0)
+ - abseil/base/endian (0.20200225.0):
+ - abseil/base/config
- abseil/base/core_headers
- - abseil/base/config (0.20190808)
- - abseil/base/core_headers (0.20190808):
+ - abseil/base/errno_saver (0.20200225.0):
- abseil/base/config
- - abseil/base/dynamic_annotations (0.20190808)
- - abseil/base/endian (0.20190808):
+ - abseil/base/exponential_biased (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- - abseil/base/log_severity (0.20190808):
+ - abseil/base/log_severity (0.20200225.0):
+ - abseil/base/config
- abseil/base/core_headers
- - abseil/base/malloc_internal (0.20190808):
+ - abseil/base/malloc_internal (0.20200225.0):
- abseil/base/base
+ - abseil/base/base_internal
- abseil/base/config
- abseil/base/core_headers
- abseil/base/dynamic_annotations
- - abseil/base/spinlock_wait
- - abseil/base/pretty_function (0.20190808)
- - abseil/base/spinlock_wait (0.20190808):
+ - abseil/base/raw_logging_internal
+ - abseil/base/periodic_sampler (0.20200225.0):
+ - abseil/base/core_headers
+ - abseil/base/exponential_biased
+ - abseil/base/pretty_function (0.20200225.0)
+ - abseil/base/raw_logging_internal (0.20200225.0):
+ - abseil/base/atomic_hook
+ - abseil/base/config
- abseil/base/core_headers
- - abseil/base/throw_delegate (0.20190808):
+ - abseil/base/log_severity
+ - abseil/base/spinlock_wait (0.20200225.0):
+ - abseil/base/base_internal
+ - abseil/base/core_headers
+ - abseil/base/errno_saver
+ - abseil/base/throw_delegate (0.20200225.0):
+ - abseil/base/config
+ - abseil/base/raw_logging_internal
+ - abseil/container/common (0.20200225.0):
+ - abseil/meta/type_traits
+ - abseil/types/optional
+ - abseil/container/compressed_tuple (0.20200225.0):
+ - abseil/utility/utility
+ - abseil/container/container_memory (0.20200225.0):
+ - abseil/memory/memory
+ - abseil/utility/utility
+ - abseil/container/fixed_array (0.20200225.0):
+ - abseil/algorithm/algorithm
+ - abseil/base/core_headers
+ - abseil/base/dynamic_annotations
+ - abseil/base/throw_delegate
+ - abseil/container/compressed_tuple
+ - abseil/memory/memory
+ - abseil/container/flat_hash_map (0.20200225.0):
+ - abseil/algorithm/container
+ - abseil/container/container_memory
+ - abseil/container/hash_function_defaults
+ - abseil/container/raw_hash_map
+ - abseil/memory/memory
+ - abseil/container/hash_function_defaults (0.20200225.0):
+ - abseil/base/config
+ - abseil/hash/hash
+ - abseil/strings/strings
+ - abseil/container/hash_policy_traits (0.20200225.0):
+ - abseil/meta/type_traits
+ - abseil/container/hashtable_debug_hooks (0.20200225.0):
+ - abseil/base/config
+ - abseil/container/hashtablez_sampler (0.20200225.0):
- abseil/base/base
+ - abseil/base/core_headers
+ - abseil/base/exponential_biased
+ - abseil/container/have_sse
+ - abseil/debugging/stacktrace
+ - abseil/memory/memory
+ - abseil/synchronization/synchronization
+ - abseil/utility/utility
+ - abseil/container/have_sse (0.20200225.0)
+ - abseil/container/inlined_vector (0.20200225.0):
+ - abseil/algorithm/algorithm
+ - abseil/base/core_headers
+ - abseil/base/throw_delegate
+ - abseil/container/inlined_vector_internal
+ - abseil/memory/memory
+ - abseil/container/inlined_vector_internal (0.20200225.0):
+ - abseil/base/core_headers
+ - abseil/container/compressed_tuple
+ - abseil/memory/memory
+ - abseil/meta/type_traits
+ - abseil/types/span
+ - abseil/container/layout (0.20200225.0):
+ - abseil/base/core_headers
+ - abseil/meta/type_traits
+ - abseil/strings/strings
+ - abseil/types/span
+ - abseil/utility/utility
+ - abseil/container/raw_hash_map (0.20200225.0):
+ - abseil/base/throw_delegate
+ - abseil/container/container_memory
+ - abseil/container/raw_hash_set
+ - abseil/container/raw_hash_set (0.20200225.0):
+ - abseil/base/bits
- abseil/base/config
- - abseil/memory (0.20190808):
- - abseil/memory/memory (= 0.20190808)
- - abseil/memory/memory (0.20190808):
- abseil/base/core_headers
+ - abseil/base/endian
+ - abseil/container/common
+ - abseil/container/compressed_tuple
+ - abseil/container/container_memory
+ - abseil/container/hash_policy_traits
+ - abseil/container/hashtable_debug_hooks
+ - abseil/container/hashtablez_sampler
+ - abseil/container/have_sse
+ - abseil/container/layout
+ - abseil/memory/memory
- abseil/meta/type_traits
- - abseil/meta (0.20190808):
- - abseil/meta/type_traits (= 0.20190808)
- - abseil/meta/type_traits (0.20190808):
+ - abseil/utility/utility
+ - abseil/debugging/debugging_internal (0.20200225.0):
- abseil/base/config
- - abseil/numeric/int128 (0.20190808):
+ - abseil/base/core_headers
+ - abseil/base/dynamic_annotations
+ - abseil/base/errno_saver
+ - abseil/base/raw_logging_internal
+ - abseil/debugging/demangle_internal (0.20200225.0):
+ - abseil/base/base
- abseil/base/config
- abseil/base/core_headers
- - abseil/strings/internal (0.20190808):
+ - abseil/debugging/stacktrace (0.20200225.0):
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/debugging/debugging_internal
+ - abseil/debugging/symbolize (0.20200225.0):
+ - abseil/base/base
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/base/dynamic_annotations
+ - abseil/base/malloc_internal
+ - abseil/base/raw_logging_internal
+ - abseil/debugging/debugging_internal
+ - abseil/debugging/demangle_internal
+ - abseil/hash/city (0.20200225.0):
+ - abseil/base/config
- abseil/base/core_headers
- abseil/base/endian
+ - abseil/hash/hash (0.20200225.0):
+ - abseil/base/core_headers
+ - abseil/base/endian
+ - abseil/container/fixed_array
+ - abseil/hash/city
+ - abseil/meta/type_traits
+ - abseil/numeric/int128
+ - abseil/strings/strings
+ - abseil/types/optional
+ - abseil/types/variant
+ - abseil/utility/utility
+ - abseil/memory (0.20200225.0):
+ - abseil/memory/memory (= 0.20200225.0)
+ - abseil/memory/memory (0.20200225.0):
+ - abseil/base/core_headers
- abseil/meta/type_traits
- - abseil/strings/strings (0.20190808):
+ - abseil/meta (0.20200225.0):
+ - abseil/meta/type_traits (= 0.20200225.0)
+ - abseil/meta/type_traits (0.20200225.0):
+ - abseil/base/config
+ - abseil/numeric/int128 (0.20200225.0):
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/strings/internal (0.20200225.0):
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/base/endian
+ - abseil/base/raw_logging_internal
+ - abseil/meta/type_traits
+ - abseil/strings/str_format (0.20200225.0):
+ - abseil/strings/str_format_internal
+ - abseil/strings/str_format_internal (0.20200225.0):
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/meta/type_traits
+ - abseil/numeric/int128
+ - abseil/strings/strings
+ - abseil/types/span
+ - abseil/strings/strings (0.20200225.0):
- abseil/base/base
- abseil/base/bits
- abseil/base/config
- abseil/base/core_headers
- abseil/base/endian
+ - abseil/base/raw_logging_internal
- abseil/base/throw_delegate
- abseil/memory/memory
- abseil/meta/type_traits
- abseil/numeric/int128
- abseil/strings/internal
- - abseil/time (0.20190808):
- - abseil/time/internal (= 0.20190808)
- - abseil/time/time (= 0.20190808)
- - abseil/time/internal (0.20190808):
- - abseil/time/internal/cctz (= 0.20190808)
- - abseil/time/internal/cctz (0.20190808):
- - abseil/time/internal/cctz/civil_time (= 0.20190808)
- - abseil/time/internal/cctz/includes (= 0.20190808)
- - abseil/time/internal/cctz/time_zone (= 0.20190808)
- - abseil/time/internal/cctz/civil_time (0.20190808)
- - abseil/time/internal/cctz/includes (0.20190808)
- - abseil/time/internal/cctz/time_zone (0.20190808):
+ - abseil/synchronization/graphcycles_internal (0.20200225.0):
+ - abseil/base/base
+ - abseil/base/base_internal
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/base/malloc_internal
+ - abseil/base/raw_logging_internal
+ - abseil/synchronization/kernel_timeout_internal (0.20200225.0):
+ - abseil/base/core_headers
+ - abseil/base/raw_logging_internal
+ - abseil/time/time
+ - abseil/synchronization/synchronization (0.20200225.0):
+ - abseil/base/atomic_hook
+ - abseil/base/base
+ - abseil/base/base_internal
+ - abseil/base/config
+ - abseil/base/core_headers
+ - abseil/base/dynamic_annotations
+ - abseil/base/malloc_internal
+ - abseil/base/raw_logging_internal
+ - abseil/debugging/stacktrace
+ - abseil/debugging/symbolize
+ - abseil/synchronization/graphcycles_internal
+ - abseil/synchronization/kernel_timeout_internal
+ - abseil/time/time
+ - abseil/time (0.20200225.0):
+ - abseil/time/internal (= 0.20200225.0)
+ - abseil/time/time (= 0.20200225.0)
+ - abseil/time/internal (0.20200225.0):
+ - abseil/time/internal/cctz (= 0.20200225.0)
+ - abseil/time/internal/cctz (0.20200225.0):
+ - abseil/time/internal/cctz/civil_time (= 0.20200225.0)
+ - abseil/time/internal/cctz/time_zone (= 0.20200225.0)
+ - abseil/time/internal/cctz/civil_time (0.20200225.0):
+ - abseil/base/config
+ - abseil/time/internal/cctz/time_zone (0.20200225.0):
+ - abseil/base/config
- abseil/time/internal/cctz/civil_time
- - abseil/time/time (0.20190808):
+ - abseil/time/time (0.20200225.0):
- abseil/base/base
- abseil/base/core_headers
+ - abseil/base/raw_logging_internal
- abseil/numeric/int128
- abseil/strings/strings
- abseil/time/internal/cctz/civil_time
- abseil/time/internal/cctz/time_zone
- - abseil/types (0.20190808):
- - abseil/types/any (= 0.20190808)
- - abseil/types/bad_any_cast (= 0.20190808)
- - abseil/types/bad_any_cast_impl (= 0.20190808)
- - abseil/types/bad_optional_access (= 0.20190808)
- - abseil/types/bad_variant_access (= 0.20190808)
- - abseil/types/compare (= 0.20190808)
- - abseil/types/optional (= 0.20190808)
- - abseil/types/span (= 0.20190808)
- - abseil/types/variant (= 0.20190808)
- - abseil/types/any (0.20190808):
+ - abseil/types (0.20200225.0):
+ - abseil/types/any (= 0.20200225.0)
+ - abseil/types/bad_any_cast (= 0.20200225.0)
+ - abseil/types/bad_any_cast_impl (= 0.20200225.0)
+ - abseil/types/bad_optional_access (= 0.20200225.0)
+ - abseil/types/bad_variant_access (= 0.20200225.0)
+ - abseil/types/compare (= 0.20200225.0)
+ - abseil/types/optional (= 0.20200225.0)
+ - abseil/types/span (= 0.20200225.0)
+ - abseil/types/variant (= 0.20200225.0)
+ - abseil/types/any (0.20200225.0):
- abseil/base/config
- abseil/base/core_headers
- abseil/meta/type_traits
- abseil/types/bad_any_cast
- abseil/utility/utility
- - abseil/types/bad_any_cast (0.20190808):
+ - abseil/types/bad_any_cast (0.20200225.0):
- abseil/base/config
- abseil/types/bad_any_cast_impl
- - abseil/types/bad_any_cast_impl (0.20190808):
- - abseil/base/base
+ - abseil/types/bad_any_cast_impl (0.20200225.0):
- abseil/base/config
- - abseil/types/bad_optional_access (0.20190808):
- - abseil/base/base
+ - abseil/base/raw_logging_internal
+ - abseil/types/bad_optional_access (0.20200225.0):
- abseil/base/config
- - abseil/types/bad_variant_access (0.20190808):
- - abseil/base/base
+ - abseil/base/raw_logging_internal
+ - abseil/types/bad_variant_access (0.20200225.0):
- abseil/base/config
- - abseil/types/compare (0.20190808):
+ - abseil/base/raw_logging_internal
+ - abseil/types/compare (0.20200225.0):
- abseil/base/core_headers
- abseil/meta/type_traits
- - abseil/types/optional (0.20190808):
+ - abseil/types/optional (0.20200225.0):
- abseil/base/base_internal
- abseil/base/config
- abseil/base/core_headers
@@ -142,231 +322,175 @@ PODS:
- abseil/meta/type_traits
- abseil/types/bad_optional_access
- abseil/utility/utility
- - abseil/types/span (0.20190808):
+ - abseil/types/span (0.20200225.0):
- abseil/algorithm/algorithm
- abseil/base/core_headers
- abseil/base/throw_delegate
- abseil/meta/type_traits
- - abseil/types/variant (0.20190808):
+ - abseil/types/variant (0.20200225.0):
- abseil/base/base_internal
- abseil/base/config
- abseil/base/core_headers
- abseil/meta/type_traits
- abseil/types/bad_variant_access
- abseil/utility/utility
- - abseil/utility/utility (0.20190808):
+ - abseil/utility/utility (0.20200225.0):
- abseil/base/base_internal
- abseil/base/config
- abseil/meta/type_traits
- - BoringSSL-GRPC (0.0.3):
- - BoringSSL-GRPC/Implementation (= 0.0.3)
- - BoringSSL-GRPC/Interface (= 0.0.3)
- - BoringSSL-GRPC/Implementation (0.0.3):
- - BoringSSL-GRPC/Interface (= 0.0.3)
- - BoringSSL-GRPC/Interface (0.0.3)
- - cloud_firestore (0.0.1):
- - Firebase/Core
- - Firebase/Firestore (~> 6.0)
+ - BoringSSL-GRPC (0.0.7):
+ - BoringSSL-GRPC/Implementation (= 0.0.7)
+ - BoringSSL-GRPC/Interface (= 0.0.7)
+ - BoringSSL-GRPC/Implementation (0.0.7):
+ - BoringSSL-GRPC/Interface (= 0.0.7)
+ - BoringSSL-GRPC/Interface (0.0.7)
+ - cloud_firestore (3.1.5):
+ - Firebase/Firestore (= 8.9.0)
+ - firebase_core
- Flutter
- - cloud_firestore_web (0.1.0):
- - Flutter
- - Firebase/Auth (6.15.0):
- - Firebase/CoreOnly
- - FirebaseAuth (~> 6.4.2)
- - Firebase/Core (6.15.0):
+ - Firebase/Auth (8.9.0):
- Firebase/CoreOnly
- - FirebaseAnalytics (= 6.2.1)
- - Firebase/CoreOnly (6.15.0):
- - FirebaseCore (= 6.6.0)
- - Firebase/Firestore (6.15.0):
+ - FirebaseAuth (~> 8.9.0)
+ - Firebase/CoreOnly (8.9.0):
+ - FirebaseCore (= 8.9.0)
+ - Firebase/Firestore (8.9.0):
- Firebase/CoreOnly
- - FirebaseFirestore (~> 1.9.0)
- - Firebase/Messaging (6.15.0):
+ - FirebaseFirestore (~> 8.9.0)
+ - Firebase/Messaging (8.9.0):
- Firebase/CoreOnly
- - FirebaseMessaging (~> 4.2.0)
- - firebase_auth (0.0.1):
- - Firebase/Auth (~> 6.0)
- - Firebase/Core
+ - FirebaseMessaging (~> 8.9.0)
+ - firebase_auth (3.3.4):
+ - Firebase/Auth (= 8.9.0)
+ - firebase_core
- Flutter
- - firebase_core (0.0.1):
- - Firebase/Core
+ - firebase_core (1.10.6):
+ - Firebase/CoreOnly (= 8.9.0)
- Flutter
- - firebase_core_web (0.1.0):
+ - firebase_messaging (11.2.4):
+ - Firebase/Messaging (= 8.9.0)
+ - firebase_core
- Flutter
- - firebase_messaging (0.0.1):
- - Firebase/Core
- - Firebase/Messaging
- - Flutter
- - FirebaseAnalytics (6.2.1):
- - FirebaseCore (~> 6.6)
- - FirebaseInstanceID (~> 4.3)
- - GoogleAppMeasurement (= 6.2.1)
- - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- - GoogleUtilities/MethodSwizzler (~> 6.0)
- - GoogleUtilities/Network (~> 6.0)
- - "GoogleUtilities/NSData+zlib (~> 6.0)"
- - nanopb (= 0.3.9011)
- - FirebaseAnalyticsInterop (1.5.0)
- - FirebaseAuth (6.4.2):
- - FirebaseAuthInterop (~> 1.0)
- - FirebaseCore (~> 6.2)
- - GoogleUtilities/AppDelegateSwizzler (~> 6.2)
- - GoogleUtilities/Environment (~> 6.2)
- - GTMSessionFetcher/Core (~> 1.1)
- - FirebaseAuthInterop (1.0.0)
- - FirebaseCore (6.6.0):
- - FirebaseCoreDiagnostics (~> 1.2)
- - FirebaseCoreDiagnosticsInterop (~> 1.2)
- - GoogleUtilities/Environment (~> 6.5)
- - GoogleUtilities/Logger (~> 6.5)
- - FirebaseCoreDiagnostics (1.2.0):
- - FirebaseCoreDiagnosticsInterop (~> 1.2)
- - GoogleDataTransportCCTSupport (~> 1.3)
- - GoogleUtilities/Environment (~> 6.5)
- - GoogleUtilities/Logger (~> 6.5)
- - nanopb (~> 0.3.901)
- - FirebaseCoreDiagnosticsInterop (1.2.0)
- - FirebaseFirestore (1.9.0):
- - abseil/algorithm (= 0.20190808)
- - abseil/base (= 0.20190808)
- - abseil/memory (= 0.20190808)
- - abseil/meta (= 0.20190808)
- - abseil/strings/strings (= 0.20190808)
- - abseil/time (= 0.20190808)
- - abseil/types (= 0.20190808)
- - FirebaseAuthInterop (~> 1.0)
- - FirebaseCore (~> 6.2)
- - "gRPC-C++ (= 0.0.9)"
+ - FirebaseAuth (8.9.0):
+ - FirebaseCore (~> 8.0)
+ - GoogleUtilities/AppDelegateSwizzler (~> 7.6)
+ - GoogleUtilities/Environment (~> 7.6)
+ - GTMSessionFetcher/Core (~> 1.5)
+ - FirebaseCore (8.9.0):
+ - FirebaseCoreDiagnostics (~> 8.0)
+ - GoogleUtilities/Environment (~> 7.6)
+ - GoogleUtilities/Logger (~> 7.6)
+ - FirebaseCoreDiagnostics (8.10.0):
+ - GoogleDataTransport (~> 9.1)
+ - GoogleUtilities/Environment (~> 7.6)
+ - GoogleUtilities/Logger (~> 7.6)
+ - nanopb (~> 2.30908.0)
+ - FirebaseFirestore (8.9.1):
+ - abseil/algorithm (= 0.20200225.0)
+ - abseil/base (= 0.20200225.0)
+ - abseil/container/flat_hash_map (= 0.20200225.0)
+ - abseil/memory (= 0.20200225.0)
+ - abseil/meta (= 0.20200225.0)
+ - abseil/strings/strings (= 0.20200225.0)
+ - abseil/time (= 0.20200225.0)
+ - abseil/types (= 0.20200225.0)
+ - FirebaseCore (~> 8.0)
+ - "gRPC-C++ (~> 1.28.0)"
- leveldb-library (~> 1.22)
- - nanopb (~> 0.3.901)
- - FirebaseInstallations (1.1.0):
- - FirebaseCore (~> 6.6)
- - GoogleUtilities/UserDefaults (~> 6.5)
- - PromisesObjC (~> 1.2)
- - FirebaseInstanceID (4.3.0):
- - FirebaseCore (~> 6.6)
- - FirebaseInstallations (~> 1.0)
- - GoogleUtilities/Environment (~> 6.5)
- - GoogleUtilities/UserDefaults (~> 6.5)
- - FirebaseMessaging (4.2.1):
- - FirebaseAnalyticsInterop (~> 1.5)
- - FirebaseCore (~> 6.6)
- - FirebaseInstanceID (~> 4.3)
- - GoogleUtilities/AppDelegateSwizzler (~> 6.5)
- - GoogleUtilities/Environment (~> 6.5)
- - GoogleUtilities/Reachability (~> 6.5)
- - GoogleUtilities/UserDefaults (~> 6.5)
- - Protobuf (>= 3.9.2, ~> 3.9)
+ - nanopb (~> 2.30908.0)
+ - FirebaseInstallations (8.10.0):
+ - FirebaseCore (~> 8.0)
+ - GoogleUtilities/Environment (~> 7.6)
+ - GoogleUtilities/UserDefaults (~> 7.6)
+ - PromisesObjC (< 3.0, >= 1.2)
+ - FirebaseMessaging (8.9.0):
+ - FirebaseCore (~> 8.0)
+ - FirebaseInstallations (~> 8.0)
+ - GoogleDataTransport (~> 9.1)
+ - GoogleUtilities/AppDelegateSwizzler (~> 7.6)
+ - GoogleUtilities/Environment (~> 7.6)
+ - GoogleUtilities/Reachability (~> 7.6)
+ - GoogleUtilities/UserDefaults (~> 7.6)
+ - nanopb (~> 2.30908.0)
- Flutter (1.0.0)
- - GoogleAppMeasurement (6.2.1):
- - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- - GoogleUtilities/MethodSwizzler (~> 6.0)
- - GoogleUtilities/Network (~> 6.0)
- - "GoogleUtilities/NSData+zlib (~> 6.0)"
- - nanopb (= 0.3.9011)
- - GoogleDataTransport (3.3.0)
- - GoogleDataTransportCCTSupport (1.3.0):
- - GoogleDataTransport (~> 3.3)
- - nanopb (~> 0.3.901)
- - GoogleUtilities/AppDelegateSwizzler (6.5.0):
+ - GoogleDataTransport (9.1.2):
+ - GoogleUtilities/Environment (~> 7.2)
+ - nanopb (~> 2.30908.0)
+ - PromisesObjC (< 3.0, >= 1.2)
+ - GoogleUtilities/AppDelegateSwizzler (7.6.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- - GoogleUtilities/Environment (6.5.0)
- - GoogleUtilities/Logger (6.5.0):
+ - GoogleUtilities/Environment (7.6.0):
+ - PromisesObjC (< 3.0, >= 1.2)
+ - GoogleUtilities/Logger (7.6.0):
- GoogleUtilities/Environment
- - GoogleUtilities/MethodSwizzler (6.5.0):
- - GoogleUtilities/Logger
- - GoogleUtilities/Network (6.5.0):
+ - GoogleUtilities/Network (7.6.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- - "GoogleUtilities/NSData+zlib (6.5.0)"
- - GoogleUtilities/Reachability (6.5.0):
+ - "GoogleUtilities/NSData+zlib (7.6.0)"
+ - GoogleUtilities/Reachability (7.6.0):
- GoogleUtilities/Logger
- - GoogleUtilities/UserDefaults (6.5.0):
+ - GoogleUtilities/UserDefaults (7.6.0):
- GoogleUtilities/Logger
- - "gRPC-C++ (0.0.9)":
- - "gRPC-C++/Implementation (= 0.0.9)"
- - "gRPC-C++/Interface (= 0.0.9)"
- - "gRPC-C++/Implementation (0.0.9)":
- - "gRPC-C++/Interface (= 0.0.9)"
- - gRPC-Core (= 1.21.0)
- - nanopb (~> 0.3)
- - "gRPC-C++/Interface (0.0.9)"
- - gRPC-Core (1.21.0):
- - gRPC-Core/Implementation (= 1.21.0)
- - gRPC-Core/Interface (= 1.21.0)
- - gRPC-Core/Implementation (1.21.0):
- - BoringSSL-GRPC (= 0.0.3)
- - gRPC-Core/Interface (= 1.21.0)
- - nanopb (~> 0.3)
- - gRPC-Core/Interface (1.21.0)
- - GTMSessionFetcher/Core (1.3.1)
- - leveldb-library (1.22)
- - nanopb (0.3.9011):
- - nanopb/decode (= 0.3.9011)
- - nanopb/encode (= 0.3.9011)
- - nanopb/decode (0.3.9011)
- - nanopb/encode (0.3.9011)
- - path_provider_linux (0.0.1):
- - Flutter
- - PromisesObjC (1.2.8)
- - Protobuf (3.12.0)
- - shared_preferences (0.0.1):
- - Flutter
- - shared_preferences_linux (0.0.1):
- - Flutter
- - shared_preferences_macos (0.0.1):
- - Flutter
- - shared_preferences_web (0.0.1):
- - Flutter
- - url_launcher (0.0.1):
- - Flutter
- - url_launcher_linux (0.0.1):
- - Flutter
- - url_launcher_macos (0.0.1):
+ - "gRPC-C++ (1.28.2)":
+ - "gRPC-C++/Implementation (= 1.28.2)"
+ - "gRPC-C++/Interface (= 1.28.2)"
+ - "gRPC-C++/Implementation (1.28.2)":
+ - abseil/container/inlined_vector (= 0.20200225.0)
+ - abseil/memory/memory (= 0.20200225.0)
+ - abseil/strings/str_format (= 0.20200225.0)
+ - abseil/strings/strings (= 0.20200225.0)
+ - abseil/types/optional (= 0.20200225.0)
+ - "gRPC-C++/Interface (= 1.28.2)"
+ - gRPC-Core (= 1.28.2)
+ - "gRPC-C++/Interface (1.28.2)"
+ - gRPC-Core (1.28.2):
+ - gRPC-Core/Implementation (= 1.28.2)
+ - gRPC-Core/Interface (= 1.28.2)
+ - gRPC-Core/Implementation (1.28.2):
+ - abseil/container/inlined_vector (= 0.20200225.0)
+ - abseil/memory/memory (= 0.20200225.0)
+ - abseil/strings/str_format (= 0.20200225.0)
+ - abseil/strings/strings (= 0.20200225.0)
+ - abseil/types/optional (= 0.20200225.0)
+ - BoringSSL-GRPC (= 0.0.7)
+ - gRPC-Core/Interface (= 1.28.2)
+ - gRPC-Core/Interface (1.28.2)
+ - GTMSessionFetcher/Core (1.7.0)
+ - leveldb-library (1.22.1)
+ - nanopb (2.30908.0):
+ - nanopb/decode (= 2.30908.0)
+ - nanopb/encode (= 2.30908.0)
+ - nanopb/decode (2.30908.0)
+ - nanopb/encode (2.30908.0)
+ - PromisesObjC (2.0.0)
+ - shared_preferences_ios (0.0.1):
- Flutter
- - url_launcher_web (0.0.1):
+ - url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
- cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
- - cloud_firestore_web (from `.symlinks/plugins/cloud_firestore_web/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- - firebase_core_web (from `.symlinks/plugins/firebase_core_web/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- - shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
- - shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
- - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- - url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)
- - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
- - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
+ - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
+ - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
SPEC REPOS:
trunk:
- abseil
- BoringSSL-GRPC
- Firebase
- - FirebaseAnalytics
- - FirebaseAnalyticsInterop
- FirebaseAuth
- - FirebaseAuthInterop
- FirebaseCore
- FirebaseCoreDiagnostics
- - FirebaseCoreDiagnosticsInterop
- FirebaseFirestore
- FirebaseInstallations
- - FirebaseInstanceID
- FirebaseMessaging
- - GoogleAppMeasurement
- GoogleDataTransport
- - GoogleDataTransportCCTSupport
- GoogleUtilities
- "gRPC-C++"
- gRPC-Core
@@ -374,85 +498,49 @@ SPEC REPOS:
- leveldb-library
- nanopb
- PromisesObjC
- - Protobuf
EXTERNAL SOURCES:
cloud_firestore:
:path: ".symlinks/plugins/cloud_firestore/ios"
- cloud_firestore_web:
- :path: ".symlinks/plugins/cloud_firestore_web/ios"
firebase_auth:
:path: ".symlinks/plugins/firebase_auth/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
- firebase_core_web:
- :path: ".symlinks/plugins/firebase_core_web/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
Flutter:
:path: Flutter
- path_provider_linux:
- :path: ".symlinks/plugins/path_provider_linux/ios"
- shared_preferences:
- :path: ".symlinks/plugins/shared_preferences/ios"
- shared_preferences_linux:
- :path: ".symlinks/plugins/shared_preferences_linux/ios"
- shared_preferences_macos:
- :path: ".symlinks/plugins/shared_preferences_macos/ios"
- shared_preferences_web:
- :path: ".symlinks/plugins/shared_preferences_web/ios"
- url_launcher:
- :path: ".symlinks/plugins/url_launcher/ios"
- url_launcher_linux:
- :path: ".symlinks/plugins/url_launcher_linux/ios"
- url_launcher_macos:
- :path: ".symlinks/plugins/url_launcher_macos/ios"
- url_launcher_web:
- :path: ".symlinks/plugins/url_launcher_web/ios"
+ shared_preferences_ios:
+ :path: ".symlinks/plugins/shared_preferences_ios/ios"
+ url_launcher_ios:
+ :path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
- abseil: 18063d773f5366ff8736a050fe035a28f635fd27
- BoringSSL-GRPC: db8764df3204ccea016e1c8dd15d9a9ad63ff318
- cloud_firestore: 2a4f8f802fb0b701cf809b283b6bec7477ebaa6f
- cloud_firestore_web: 9ec3dc7f5f98de5129339802d491c1204462bfec
- Firebase: 5d77105d9740a07ca6b16927ca971db7e860faaf
- firebase_auth: d99b993c1405096e66c58211b1cd956c23eed1c5
- firebase_core: 335c02abd48672b7c83c683df833d0488a72e73e
- firebase_core_web: d501d8b946b60c8af265428ce483b0fff5ad52d1
- firebase_messaging: 21344b3b3a7d9d325d63a70e3750c0c798fe1e03
- FirebaseAnalytics: e83e64b1231dedcd9ddd4bdecd9bcfd6ba341679
- FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae
- FirebaseAuth: ce45d7c5d46bed90159f3a73b6efbe8976ed3573
- FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc
- FirebaseCore: 4aeb81ff53dcd9a3634ca725dc1fb8c2a4622046
- FirebaseCoreDiagnostics: 5e78803ab276bc5b50340e3c539c06c3de35c649
- FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
- FirebaseFirestore: b7e6adda31974dbd259fc25b541e8850420c92ed
- FirebaseInstallations: 575cd32f2aec0feeb0e44f5d0110a09e5e60b47b
- FirebaseInstanceID: 6668efc1655a4052c083f287a7141f1ead12f9c2
- FirebaseMessaging: 9e23f9d603b1fb71ccbeb48d79bf0d4ba0272c84
- Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
- GoogleAppMeasurement: a08a43b8677b95ed51fcef880e36737334d804fd
- GoogleDataTransport: 574a983e829327d7c18f2627f65d9e80164ea8a4
- GoogleDataTransportCCTSupport: cad3cd6cdbdbad6b5c2c9206ec413402755faaaa
- GoogleUtilities: f8de7ddf8c706f58e9b405d53e38bbdaa2731e5a
- "gRPC-C++": 9dfe7b44821e7b3e44aacad2af29d2c21f7cde83
- gRPC-Core: c9aef9a261a1247e881b18059b84d597293c9947
- GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925
- leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7
- nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
- path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
- PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
- Protobuf: 2793fcd0622a00b546c60e7cbbcc493e043e9bb9
- shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
- shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
- shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
- shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
- url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
- url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
- url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
- url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
+ abseil: 6c8eb7892aefa08d929b39f9bb108e5367e3228f
+ BoringSSL-GRPC: 8edf627ee524575e2f8d19d56f068b448eea3879
+ cloud_firestore: 338122a6149c14ca376ad363626b5bf3037a5056
+ Firebase: 13d8d96499e2635428d5bf0ec675df21f95d9a95
+ firebase_auth: e875a50b81aefb20f305dfede425647e9675c19e
+ firebase_core: c263d7daf1dc92fcd9895e6abdc04872b0ee07ff
+ firebase_messaging: dff5cd08781ee1de988565a83c977e435405cd7e
+ FirebaseAuth: 2b78b2a32c07b3ecfa4970bdf1d3632b8304099b
+ FirebaseCore: 599ee609343eaf4941bd188f85e3aa077ffe325b
+ FirebaseCoreDiagnostics: 56fb7216d87e0e6ec2feddefa9d8a392fe8b2c18
+ FirebaseFirestore: 15ae9648476436efed698a909e44c4737498f9b4
+ FirebaseInstallations: 830327b45345ffc859eaa9c17bcd5ae893fd5425
+ FirebaseMessaging: 82c4a48638f53f7b184f3cc9f6cd2cbe533ab316
+ Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
+ GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940
+ GoogleUtilities: 684ee790a24f73ebb2d1d966e9711c203f2a4237
+ "gRPC-C++": 13d8ccef97d5c3c441b7e3c529ef28ebee86fad2
+ gRPC-Core: 4afa11bfbedf7cdecd04de535a9e046893404ed5
+ GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91
+ leveldb-library: 50c7b45cbd7bf543c81a468fe557a16ae3db8729
+ nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
+ PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58
+ shared_preferences_ios: aef470a42dc4675a1cdd50e3158b42e3d1232b32
+ url_launcher_ios: 02f1989d4e14e998335b02b67a7590fa34f971af
-PODFILE CHECKSUM: 1b66dae606f75376c5f2135a8290850eeb09ae83
+PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048
-COCOAPODS: 1.9.1
+COCOAPODS: 1.11.2
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index cbb6312..26d3262 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
@@ -167,7 +167,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1020;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -230,9 +230,46 @@
files = (
);
inputPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
+ "${BUILT_PRODUCTS_DIR}/BoringSSL-GRPC/openssl_grpc.framework",
+ "${BUILT_PRODUCTS_DIR}/FirebaseAuth/FirebaseAuth.framework",
+ "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework",
+ "${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework",
+ "${BUILT_PRODUCTS_DIR}/FirebaseFirestore/FirebaseFirestore.framework",
+ "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework",
+ "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework",
+ "${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
+ "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework",
+ "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
+ "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework",
+ "${BUILT_PRODUCTS_DIR}/abseil/absl.framework",
+ "${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
+ "${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
+ "${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
+ "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
+ "${BUILT_PRODUCTS_DIR}/shared_preferences_ios/shared_preferences_ios.framework",
+ "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl_grpc.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseAuth.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseFirestore.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/absl.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_ios.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -311,7 +348,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -351,7 +387,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -373,7 +409,10 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
@@ -388,7 +427,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -434,7 +472,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -444,7 +482,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -484,7 +521,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -507,7 +544,10 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
@@ -534,7 +574,10 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
index 1d526a1..919434a 100644
--- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -2,6 +2,6 @@
+ location = "self:">
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index a28140c..3db53b6 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.blueAccent, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.blueAccent, darkModeOn),
+ darkModeOn),
child: MyApp(),
),
);
} else if (chosenAccentColor == 'Cyan') {
runApp(
ChangeNotifierProvider(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.cyanAccent, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.cyanAccent, darkModeOn),
+ darkModeOn),
child: MyApp(),
),
);
} else if (chosenAccentColor == 'Teal') {
runApp(
ChangeNotifierProvider(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.tealAccent, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.tealAccent, darkModeOn),
+ darkModeOn),
child: MyApp(),
),
);
} else if (chosenAccentColor == 'Purple') {
runApp(
ChangeNotifierProvider(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.purpleAccent, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.purpleAccent, darkModeOn),
+ darkModeOn),
child: MyApp(),
),
);
} else if (chosenAccentColor == 'Red') {
runApp(
ChangeNotifierProvider(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.redAccent, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.redAccent, darkModeOn),
+ darkModeOn),
child: MyApp(),
),
);
} else if (chosenAccentColor == 'Orange') {
runApp(
ChangeNotifierProvider(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.deepOrangeAccent, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.deepOrangeAccent, darkModeOn),
+ darkModeOn),
child: MyApp(),
),
);
} else if (chosenAccentColor == 'Yellow') {
runApp(
ChangeNotifierProvider(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.yellowAccent, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.yellowAccent, darkModeOn),
+ darkModeOn),
child: MyApp(),
),
);
} else if (chosenAccentColor == 'Green') {
runApp(
ChangeNotifierProvider(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.greenAccent, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.greenAccent, darkModeOn),
+ darkModeOn),
child: MyApp(),
),
);
} else {
runApp(
ChangeNotifierProvider(
- create: (_) => ThemeNotifier(getThemeDataForAccentColor(Colors.blue, darkModeOn), darkModeOn),
+ create: (_) => ThemeNotifier(
+ getThemeDataForAccentColor(Colors.blue, darkModeOn), darkModeOn),
child: MyApp(),
),
);
@@ -232,7 +267,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final themeNotifier = Provider.of(context);
- return StreamProvider.value(
+ return StreamProvider.value(
value: AuthService().user,
child: MaterialApp(
initialRoute: '/wrapper',
@@ -249,8 +284,8 @@ class MyApp extends StatelessWidget {
title: 'Share A Cab',
builder: (context, child) {
return MediaQuery(
- child: child,
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
+ child: child,
);
},
debugShowCheckedModeBanner: false,
@@ -264,28 +299,27 @@ ThemeData getThemeDataForAccentColor(Color accentColor, bool darkTheme) {
//print('dark theme is $darkTheme');
return darkTheme
? ThemeData(
- primarySwatch: Colors.grey,
bottomAppBarColor: const Color(0xFF212121),
primaryColor: const Color(0xFF212121),
primaryColorDark: Colors.black,
brightness: Brightness.dark,
backgroundColor: const Color(0xFF212121),
- accentColor: accentColor,
- accentIconTheme: IconThemeData(color: Colors.black),
dividerColor: Colors.black12,
scaffoldBackgroundColor: Colors.black,
- textSelectionTheme: TextSelectionThemeData(cursorColor: Colors.white, selectionColor: Colors.blue, selectionHandleColor: Colors.blue),
+ textSelectionTheme: TextSelectionThemeData(
+ cursorColor: Colors.white,
+ selectionColor: Colors.blue,
+ selectionHandleColor: Colors.blue),
+ colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey)
+ .copyWith(secondary: accentColor),
)
: ThemeData(
appBarTheme: AppBarTheme(color: Colors.black),
- primarySwatch: Colors.grey,
bottomAppBarColor: Color(0xFF212121),
primaryColor: Colors.grey[600],
primaryColorDark: Colors.grey[800],
brightness: Brightness.light,
backgroundColor: const Color(0xFFE5E5E5),
- accentColor: accentColor,
- accentIconTheme: IconThemeData(color: Colors.white),
dividerColor: Colors.white54,
scaffoldBackgroundColor: const Color(0xFFE5E5E5),
textSelectionTheme: TextSelectionThemeData(
@@ -293,5 +327,7 @@ ThemeData getThemeDataForAccentColor(Color accentColor, bool darkTheme) {
selectionColor: Colors.blueGrey[700],
selectionHandleColor: Colors.blueGrey[700],
),
+ colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.grey)
+ .copyWith(secondary: accentColor),
);
}
diff --git a/lib/screens/authenticate/change_email.dart b/lib/screens/authenticate/change_email.dart
index f15a564..647aa68 100644
--- a/lib/screens/authenticate/change_email.dart
+++ b/lib/screens/authenticate/change_email.dart
@@ -20,7 +20,7 @@ class _ChangeEmailState extends State {
@override
Widget build(BuildContext context) {
- var currentuser = Provider.of(context);
+ var currentuser = Provider.of(context);
if (currentuser != null) {
setState(() {
originalEmail = currentuser.email;
@@ -43,7 +43,18 @@ class _ChangeEmailState extends State {
SizedBox(height: 20.0),
TextFormField(
initialValue: originalEmail,
- decoration: InputDecoration(hintText: 'Email', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(
+ hintText: 'Email',
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ getBorderColorForInputFields(context),
+ width: 2.0)),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ Theme.of(context).colorScheme.secondary,
+ width: 2.0))),
validator: (val) {
if (val.isEmpty) {
return 'Enter a valid Email';
@@ -68,7 +79,8 @@ class _ChangeEmailState extends State {
),
ElevatedButton(
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(
+ Theme.of(context).colorScheme.secondary),
),
child: Text(
'Change Email',
@@ -82,7 +94,8 @@ class _ChangeEmailState extends State {
});
await _auth.changeEmail(email);
await _auth.signOut();
- await Navigator.pushNamedAndRemoveUntil(context, '/wrapper', (route) => false);
+ await Navigator.pushNamedAndRemoveUntil(
+ context, '/wrapper', (route) => false);
setState(() {
loading = false;
});
@@ -95,7 +108,8 @@ class _ChangeEmailState extends State {
error = 'Your email is invalid';
break;
case 'ERROR_EMAIL_ALREADY_IN_USE':
- error = 'Email is already in use on different account';
+ error =
+ 'Email is already in use on different account';
break;
default:
error = 'An undefined Error happened.';
@@ -109,7 +123,8 @@ class _ChangeEmailState extends State {
SizedBox(height: 24.0),
Text(
'Once you change your email, please log-in again by entering your new email ID and your previous password.',
- style: TextStyle(fontSize: 17.0, fontStyle: FontStyle.italic),
+ style: TextStyle(
+ fontSize: 17.0, fontStyle: FontStyle.italic),
textAlign: TextAlign.justify,
),
SizedBox(
diff --git a/lib/screens/authenticate/forgotpass.dart b/lib/screens/authenticate/forgotpass.dart
index 8027b8c..38bf842 100644
--- a/lib/screens/authenticate/forgotpass.dart
+++ b/lib/screens/authenticate/forgotpass.dart
@@ -42,7 +42,7 @@ class _ForgotPassState extends State {
SizedBox(height: 100.0),
CircleAvatar(
radius: 48,
- backgroundColor: Theme.of(context).accentColor,
+ backgroundColor: Theme.of(context).colorScheme.secondary,
child: Icon(
CupertinoIcons.car_detailed,
size: 48,
@@ -50,7 +50,7 @@ class _ForgotPassState extends State {
),
SizedBox(height: 30.0),
TextFormField(
- decoration: InputDecoration(hintText: 'Email', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(hintText: 'Email', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0))),
validator: (val) => val.isEmpty ? 'Enter a valid Email' : null,
onChanged: (val) {
setState(() => email = val);
@@ -59,7 +59,7 @@ class _ForgotPassState extends State {
SizedBox(height: 20.0),
ElevatedButton(
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.secondary),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 14.0),
@@ -109,7 +109,7 @@ class _ForgotPassState extends State {
SizedBox(height: 15.0),
ElevatedButton(
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.secondary),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 14.0),
diff --git a/lib/screens/authenticate/register.dart b/lib/screens/authenticate/register.dart
index de34aa1..b7876d1 100644
--- a/lib/screens/authenticate/register.dart
+++ b/lib/screens/authenticate/register.dart
@@ -113,7 +113,7 @@ class _RegisterState extends State {
SizedBox(height: 20.0),
CircleAvatar(
radius: 48,
- backgroundColor: Theme.of(context).accentColor,
+ backgroundColor: Theme.of(context).colorScheme.secondary,
child: Icon(
CupertinoIcons.car_detailed,
size: 48,
@@ -125,7 +125,7 @@ class _RegisterState extends State {
decoration: InputDecoration(
hintText: 'Email',
enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)),
- focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0)),
+ focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0)),
),
validator: (val) {
if (val.isEmpty) {
@@ -151,7 +151,7 @@ class _RegisterState extends State {
decoration: InputDecoration(
hintText: 'Password',
enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)),
- focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0)),
+ focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0)),
suffixIcon: IconButton(
icon: Icon(
passwordHide ? Icons.visibility_off : Icons.visibility,
@@ -175,7 +175,7 @@ class _RegisterState extends State {
decoration: InputDecoration(
hintText: 'Confirm Password',
enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)),
- focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0)),
+ focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0)),
suffixIcon: IconButton(
icon: Icon(
passwordHide ? Icons.visibility_off : Icons.visibility,
@@ -205,7 +205,7 @@ class _RegisterState extends State {
SizedBox(height: 20.0),
TextFormField(
textCapitalization: TextCapitalization.words,
- decoration: InputDecoration(hintText: 'Name', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(hintText: 'Name', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0))),
validator: (val) => val.isEmpty ? 'Enter a valid Name' : null,
onChanged: (val) {
setState(() => name = val);
@@ -213,7 +213,7 @@ class _RegisterState extends State {
),
SizedBox(height: 20.0),
TextFormField(
- decoration: InputDecoration(hintText: 'Mobile Number', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(hintText: 'Mobile Number', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0))),
validator: (val) => val.length != 10 ? 'Enter a valid mobile number.' : null,
keyboardType: TextInputType.number,
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
@@ -223,7 +223,7 @@ class _RegisterState extends State {
),
SizedBox(height: 20.0),
DropdownButtonFormField(
- decoration: InputDecoration(hintText: 'Select Hostel', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(hintText: 'Select Hostel', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0))),
value: hostel,
onTap: () => FocusScope.of(context).requestFocus(FocusNode()),
onChanged: (newValue) {
@@ -234,15 +234,15 @@ class _RegisterState extends State {
},
items: _hostels.map((temp) {
return DropdownMenuItem(
- child: Text(temp),
value: temp,
+ child: Text(temp),
);
}).toList(),
validator: (val) => val == null ? 'Please select your hostel' : null,
),
SizedBox(height: 20.0),
DropdownButtonFormField(
- decoration: InputDecoration(hintText: 'Select Gender', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(hintText: 'Select Gender', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0))),
value: sex,
onTap: () => FocusScope.of(context).requestFocus(FocusNode()),
onChanged: (newValue) {
@@ -253,8 +253,8 @@ class _RegisterState extends State {
},
items: _sex.map((temp) {
return DropdownMenuItem(
- child: Text(temp),
value: temp,
+ child: Text(temp),
);
}).toList(),
validator: (val) => val == null ? 'Please select your sex' : null,
@@ -262,7 +262,7 @@ class _RegisterState extends State {
SizedBox(height: 20.0),
ElevatedButton(
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.secondary),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 17.0),
@@ -283,7 +283,7 @@ class _RegisterState extends State {
pr.style(
message: 'Signing up...',
backgroundColor: Theme.of(context).backgroundColor,
- messageTextStyle: TextStyle(color: Theme.of(context).accentColor),
+ messageTextStyle: TextStyle(color: Theme.of(context).colorScheme.secondary),
);
await pr.show();
await Future.delayed(Duration(seconds: 1));
@@ -314,7 +314,7 @@ class _RegisterState extends State {
duration: Duration(seconds: 2),
content: Text(
error,
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(color: Theme.of(context).colorScheme.secondary),
),
));
}
diff --git a/lib/screens/authenticate/sign_in.dart b/lib/screens/authenticate/sign_in.dart
index 64529c6..0348e14 100644
--- a/lib/screens/authenticate/sign_in.dart
+++ b/lib/screens/authenticate/sign_in.dart
@@ -82,7 +82,7 @@ class _SignInState extends State {
SizedBox(height: 20.0),
CircleAvatar(
radius: 48,
- backgroundColor: Theme.of(context).accentColor,
+ backgroundColor: Theme.of(context).colorScheme.secondary,
child: Icon(
CupertinoIcons.car_detailed,
size: 48,
@@ -107,7 +107,7 @@ class _SignInState extends State {
),
SizedBox(height: 20.0),
TextFormField(
- decoration: InputDecoration(hintText: 'Email', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(hintText: 'Email', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0))),
validator: (val) => val.isEmpty ? 'Enter a valid Email' : null,
onChanged: (val) {
setState(() => email = val);
@@ -118,7 +118,7 @@ class _SignInState extends State {
decoration: InputDecoration(
hintText: 'Password',
enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)),
- focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0)),
+ focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).colorScheme.secondary, width: 2.0)),
suffixIcon: IconButton(
icon: Icon(
passwordHide ? Icons.visibility_off : Icons.visibility,
@@ -140,7 +140,7 @@ class _SignInState extends State {
SizedBox(height: 20.0),
ElevatedButton(
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.secondary),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 16),
@@ -178,7 +178,7 @@ class _SignInState extends State {
duration: Duration(seconds: 2),
content: Text(
error,
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(color: Theme.of(context).colorScheme.secondary),
),
));
}
@@ -217,7 +217,7 @@ class _SignInState extends State {
duration: Duration(seconds: 2),
content: Text(
error,
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(color: Theme.of(context).colorScheme.secondary),
),
));
}
@@ -228,7 +228,7 @@ class _SignInState extends State {
SizedBox(height: 20.0),
ElevatedButton(
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.secondary),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 16),
diff --git a/lib/screens/authenticate/verified_email_check.dart b/lib/screens/authenticate/verified_email_check.dart
index cb472eb..b7a1ae4 100644
--- a/lib/screens/authenticate/verified_email_check.dart
+++ b/lib/screens/authenticate/verified_email_check.dart
@@ -28,13 +28,13 @@ class _VerificationCheckState extends State {
Future(() async {
Timer.periodic(Duration(seconds: 5), (timer) async {
- // FirebaseUser
- var olduser = await FirebaseAuth.instance.currentUser();
+ // User
+ var olduser = FirebaseAuth.instance.currentUser;
await olduser.reload();
- var user = await FirebaseAuth.instance.currentUser();
- if (user.isEmailVerified) {
+ var user = FirebaseAuth.instance.currentUser;
+ if (user.emailVerified) {
setState(() {
- verified = user.isEmailVerified;
+ verified = user.emailVerified;
});
timer.cancel();
}
@@ -44,7 +44,7 @@ class _VerificationCheckState extends State {
@override
Widget build(BuildContext context) {
- var currentuser = Provider.of(context);
+ var currentuser = Provider.of(context);
email = currentuser.email;
@@ -76,7 +76,8 @@ class _VerificationCheckState extends State {
},
label: Text(
'Logout',
- style: TextStyle(color: getVisibleColorOnPrimaryColor(context)),
+ style: TextStyle(
+ color: getVisibleColorOnPrimaryColor(context)),
),
)
],
@@ -90,14 +91,21 @@ class _VerificationCheckState extends State {
SizedBox(height: 20.0),
RichText(
text: TextSpan(
- text: 'Verification email has been sent to your ID. Please click on the verification link in your mail.',
- style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold, color: getBorderColorForInputFields(context)),
+ text:
+ 'Verification email has been sent to your ID. Please click on the verification link in your mail.',
+ style: TextStyle(
+ fontSize: 20.0,
+ fontWeight: FontWeight.bold,
+ color: getBorderColorForInputFields(context)),
)),
SizedBox(height: 30.0),
RichText(
text: TextSpan(
- text: 'The registered email id is: ${email}',
- style: TextStyle(fontSize: 17.0, color: getBorderColorForInputFields(context), fontWeight: FontWeight.w700),
+ text: 'The registered email id is: $email',
+ style: TextStyle(
+ fontSize: 17.0,
+ color: getBorderColorForInputFields(context),
+ fontWeight: FontWeight.w700),
),
),
SizedBox(
@@ -108,11 +116,13 @@ class _VerificationCheckState extends State {
children: [
ElevatedButton(
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(
+ Theme.of(context).colorScheme.secondary),
),
child: Text(
'Resend email',
- style: TextStyle(color: getVisibleColorOnAccentColor(context)),
+ style: TextStyle(
+ color: getVisibleColorOnAccentColor(context)),
),
onPressed: () {
try {
@@ -128,14 +138,19 @@ class _VerificationCheckState extends State {
),
ElevatedButton(
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(
+ Theme.of(context).colorScheme.secondary),
),
child: Text(
'Change email',
- style: TextStyle(color: getVisibleColorOnAccentColor(context)),
+ style: TextStyle(
+ color: getVisibleColorOnAccentColor(context)),
),
onPressed: () {
- Navigator.push(context, MaterialPageRoute(builder: (context) => ChangeEmail()));
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => ChangeEmail()));
},
),
],
@@ -143,8 +158,12 @@ class _VerificationCheckState extends State {
SizedBox(height: 20.0),
RichText(
text: TextSpan(
- text: 'You will be auto-redirected to dashboard once you verify your account.',
- style: TextStyle(color: Colors.red, fontSize: 20.0, fontStyle: FontStyle.italic),
+ text:
+ 'You will be auto-redirected to dashboard once you verify your account.',
+ style: TextStyle(
+ color: Colors.red,
+ fontSize: 20.0,
+ fontStyle: FontStyle.italic),
)),
SizedBox(height: 20.0),
],
diff --git a/lib/screens/chatscreen/chat_database/database.dart b/lib/screens/chatscreen/chat_database/database.dart
index b4bd679..43c5284 100644
--- a/lib/screens/chatscreen/chat_database/database.dart
+++ b/lib/screens/chatscreen/chat_database/database.dart
@@ -4,39 +4,42 @@ import 'package:firebase_auth/firebase_auth.dart';
class ChatDatabase {
final _auth = FirebaseAuth.instance;
- final CollectionReference chatLists = Firestore.instance.collection('chatroom');
- final CollectionReference group = Firestore.instance.collection('group');
+ final CollectionReference chatLists =
+ FirebaseFirestore.instance.collection('chatroom');
+ final CollectionReference group =
+ FirebaseFirestore.instance.collection('group');
//adding user to chat room
- Future createChatRoom(String docId, String uid, String destination) async {
- var user = await _auth.currentUser();
- await chatLists.document(docId).setData({
+ Future createChatRoom(
+ String docId, String uid, String destination) async {
+ var user = _auth.currentUser;
+ await chatLists.doc(docId).set({
'lastMessage': Timestamp.now(),
'destination': destination,
'users': FieldValue.arrayUnion([user.uid]),
});
- chatLists.document(docId).collection('chats');
+ chatLists.doc(docId).collection('chats');
}
//deleting user from group chat
Future exitChatRoom(String docId) async {
- var user = await _auth.currentUser();
- await chatLists.document(docId).updateData({
+ var user = _auth.currentUser;
+ await chatLists.doc(docId).update({
'users': FieldValue.arrayRemove([user.uid.toString()])
});
}
//adding user to chat group
Future joinGroup(String listuid) async {
- var user = await _auth.currentUser();
- await chatLists.document(listuid).updateData({
+ var user = _auth.currentUser;
+ await chatLists.doc(listuid).update({
'users': FieldValue.arrayUnion([user.uid.toString()]),
});
}
// kicking a user from chat group
Future kickedChatRoom(String groupID, String userID) async {
- await chatLists.document(groupID).updateData({
+ await chatLists.doc(groupID).update({
'users': FieldValue.arrayRemove([userID.toString()])
});
}
diff --git a/lib/screens/chatscreen/chat_screen.dart b/lib/screens/chatscreen/chat_screen.dart
index 3ad7a2a..67496bd 100644
--- a/lib/screens/chatscreen/chat_screen.dart
+++ b/lib/screens/chatscreen/chat_screen.dart
@@ -18,7 +18,7 @@ class ChatScreen extends StatefulWidget {
class _ChatScreenState extends State {
//Set device token for current user
final RequestService _request = RequestService();
- final FirebaseMessaging _fbm = FirebaseMessaging();
+ final FirebaseMessaging _fbm = FirebaseMessaging.instance;
Future _getToken() async {
await _fbm.getToken().then((token) {
_request.setDeviceToken(token);
@@ -27,18 +27,7 @@ class _ChatScreenState extends State {
@override
void initState() {
- final fbm = FirebaseMessaging();
- fbm.requestNotificationPermissions();
- fbm.configure(onMessage: (msg) {
- print(msg);
- return;
- }, onLaunch: (msg) {
- print(msg);
- return;
- }, onResume: (msg) {
- print(msg);
- return;
- });
+ final fbm = FirebaseMessaging.instance..requestPermission();
_getToken();
super.initState();
}
diff --git a/lib/screens/chatscreen/chat_widgets/chat_bubble.dart b/lib/screens/chatscreen/chat_widgets/chat_bubble.dart
index dd9632e..4d76cbf 100644
--- a/lib/screens/chatscreen/chat_widgets/chat_bubble.dart
+++ b/lib/screens/chatscreen/chat_widgets/chat_bubble.dart
@@ -13,6 +13,7 @@ class MessageBubble extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Stack(
+ clipBehavior: Clip.none,
children: [
Row(
mainAxisAlignment: isMe ? MainAxisAlignment.end : MainAxisAlignment.start,
@@ -21,7 +22,7 @@ class MessageBubble extends StatelessWidget {
children: [
Container(
decoration: BoxDecoration(
- color: isMe ? Colors.grey : Theme.of(context).accentColor,
+ color: isMe ? Colors.grey : Theme.of(context).colorScheme.secondary,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(12),
topRight: Radius.circular(12),
@@ -80,7 +81,6 @@ class MessageBubble extends StatelessWidget {
],
),
],
- clipBehavior: Clip.none,
);
}
}
diff --git a/lib/screens/chatscreen/chat_widgets/chat_tile.dart b/lib/screens/chatscreen/chat_widgets/chat_tile.dart
index fba0725..d1d0e0a 100644
--- a/lib/screens/chatscreen/chat_widgets/chat_tile.dart
+++ b/lib/screens/chatscreen/chat_widgets/chat_tile.dart
@@ -22,14 +22,14 @@ class _ChatTileState extends State {
padding: EdgeInsets.symmetric(vertical: 15),
decoration: BoxDecoration(
border: Border(
- bottom: BorderSide(width: 0.15, color: Theme.of(context).accentColor),
+ bottom: BorderSide(width: 0.15, color: Theme.of(context).colorScheme.secondary),
)),
child: ListTile(
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => ChatScreen(widget.docId)));
},
leading: CircleAvatar(
- backgroundColor: Theme.of(context).accentColor,
+ backgroundColor: Theme.of(context).colorScheme.secondary,
radius: 30,
child: Padding(
padding: EdgeInsets.all(6),
diff --git a/lib/screens/chatscreen/chat_widgets/chat_users_list.dart b/lib/screens/chatscreen/chat_widgets/chat_users_list.dart
index ad837ea..0967a4a 100644
--- a/lib/screens/chatscreen/chat_widgets/chat_users_list.dart
+++ b/lib/screens/chatscreen/chat_widgets/chat_users_list.dart
@@ -5,15 +5,20 @@ import 'package:provider/provider.dart';
import './chat_tile.dart';
class ChatUsersList extends StatelessWidget {
- static FirebaseUser user;
+ static User user;
static DateTime range;
@override
Widget build(BuildContext context) {
// Currently showing the chats of last 30 days only.
range = DateTime.now().subtract(Duration(days: 30));
- final user = Provider.of(context);
+ final user = Provider.of(context);
return StreamBuilder(
- stream: Firestore.instance.collection('chatroom').where('users', arrayContains: user.uid).where('lastMessage', isGreaterThan: range).orderBy('lastMessage', descending: true).snapshots(),
+ stream: FirebaseFirestore.instance
+ .collection('chatroom')
+ .where('users', arrayContains: user.uid)
+ .where('lastMessage', isGreaterThan: range)
+ .orderBy('lastMessage', descending: true)
+ .snapshots(),
builder: (ctx, futureSnapshot) {
if (futureSnapshot.connectionState == ConnectionState.waiting) {
return Center(
@@ -21,11 +26,14 @@ class ChatUsersList extends StatelessWidget {
);
}
return ListView.builder(
- itemCount: futureSnapshot.data == null ? 0 : futureSnapshot.data.documents.length,
+ itemCount:
+ futureSnapshot.data == null ? 0 : futureSnapshot.data.docs.length,
itemBuilder: (context, index) {
- final docId = futureSnapshot.data.documents[index].documentID;
- final destination = futureSnapshot.data.documents[index].data['destination'];
- final lastMessage = futureSnapshot.data.documents[index].data['lastMessage'];
+ final docId = futureSnapshot.data.docs[index].id;
+ final destination =
+ futureSnapshot.data.docs[index].data()['destination'];
+ final lastMessage =
+ futureSnapshot.data.docs[index].data()['lastMessage'];
return ChatTile(docId, destination, lastMessage);
},
);
diff --git a/lib/screens/chatscreen/chat_widgets/message.dart b/lib/screens/chatscreen/chat_widgets/message.dart
index 3f28277..cc72a0e 100644
--- a/lib/screens/chatscreen/chat_widgets/message.dart
+++ b/lib/screens/chatscreen/chat_widgets/message.dart
@@ -11,50 +11,41 @@ class MessageScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return FutureBuilder(
- future: FirebaseAuth.instance.currentUser(),
- builder: (ctx, futureSnapshot) {
- if (futureSnapshot.connectionState == ConnectionState.waiting) {
- return Center(
- child: CircularProgressIndicator(),
- );
- }
- return StreamBuilder(
- stream: Firestore.instance
- .collection('chatroom')
- .document(docId)
- .collection('chats')
- .orderBy(
- 'createdAt',
- descending: true,
- )
- .limit(30)
- .snapshots(),
- builder: (ctx, chatSnapshot) {
- if (chatSnapshot.connectionState == ConnectionState.waiting) {
- return Center(
- child: CircularProgressIndicator(),
- );
- }
- final chatDocs = chatSnapshot.data.documents;
+ return StreamBuilder(
+ stream: FirebaseFirestore.instance
+ .collection('chatroom')
+ .doc(docId)
+ .collection('chats')
+ .orderBy(
+ 'createdAt',
+ descending: true,
+ )
+ .limit(30)
+ .snapshots(),
+ builder: (ctx, chatSnapshot) {
+ if (chatSnapshot.connectionState == ConnectionState.waiting) {
+ return Center(
+ child: CircularProgressIndicator(),
+ );
+ }
+ final chatDocs = chatSnapshot.data.docs;
- return ListView.builder(
- reverse: true,
- itemCount: chatDocs.length,
- itemBuilder: (ctx, index) => MessageBubble(
- chatDocs[index]['text'],
- chatDocs[index]['name'],
- chatDocs[index]['userId'] == futureSnapshot.data.uid,
- key: ValueKey(chatDocs[index].documentID),
- time: DateFormat().add_jm().format(
- DateTime.parse(
- chatDocs[index]['createdAt'].toDate().toString(),
- ),
- ),
- ),
- );
- });
- },
- );
+ return ListView.builder(
+ reverse: true,
+ itemCount: chatDocs.length,
+ itemBuilder: (ctx, index) => MessageBubble(
+ chatDocs[index]['text'],
+ chatDocs[index]['name'],
+ chatDocs[index]['userId'] ==
+ FirebaseAuth.instance.currentUser.uid,
+ key: ValueKey(chatDocs[index].id),
+ time: DateFormat().add_jm().format(
+ DateTime.parse(
+ chatDocs[index]['createdAt'].toDate().toString(),
+ ),
+ ),
+ ),
+ );
+ });
}
}
diff --git a/lib/screens/chatscreen/chat_widgets/new_message.dart b/lib/screens/chatscreen/chat_widgets/new_message.dart
index af76c31..ee6a945 100644
--- a/lib/screens/chatscreen/chat_widgets/new_message.dart
+++ b/lib/screens/chatscreen/chat_widgets/new_message.dart
@@ -18,12 +18,22 @@ class _NewMessageState extends State {
void _sendMessage() async {
FocusScope.of(context).unfocus();
_controller.clear();
- final user = await FirebaseAuth.instance.currentUser();
- final userData = await Firestore.instance.collection('userdetails').document(user.uid).get();
- await Firestore.instance.collection('chatroom').document(widget.docId).updateData({
+ final user = FirebaseAuth.instance.currentUser;
+ final userData = await FirebaseFirestore.instance
+ .collection('userdetails')
+ .doc(user.uid)
+ .get();
+ await FirebaseFirestore.instance
+ .collection('chatroom')
+ .doc(widget.docId)
+ .update({
'lastMessage': Timestamp.now(),
});
- await Firestore.instance.collection('chatroom').document(widget.docId).collection('chats').add({
+ await FirebaseFirestore.instance
+ .collection('chatroom')
+ .doc(widget.docId)
+ .collection('chats')
+ .add({
'text': _enteredMessage,
'createdAt': Timestamp.now(),
'userId': user.uid,
@@ -56,7 +66,7 @@ class _NewMessageState extends State {
IconButton(
icon: Icon(
Icons.send,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
onPressed: _enteredMessage.trim().isEmpty ? null : _sendMessage,
)
diff --git a/lib/screens/createtrip.dart b/lib/screens/createtrip.dart
index a60d667..6b9a3e7 100644
--- a/lib/screens/createtrip.dart
+++ b/lib/screens/createtrip.dart
@@ -57,7 +57,7 @@ class _CreateTripState extends State {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
duration: Duration(seconds: 1),
backgroundColor: Theme.of(context).primaryColor,
- content: Text('One or more fields is missing', style: TextStyle(color: Theme.of(context).accentColor)),
+ content: Text('One or more fields is missing', style: TextStyle(color: Theme.of(context).colorScheme.secondary)),
));
return; //return stops function execution and thus nothing is called or returned
} else if (_selectedStartDate == null || _selectedStartTime == null || _selectedEndDate == null || _selectedEndTime == null) {
@@ -65,7 +65,7 @@ class _CreateTripState extends State {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
duration: Duration(seconds: 1),
backgroundColor: Theme.of(context).primaryColor,
- content: Text('Date or Time is missing', style: TextStyle(color: Theme.of(context).accentColor)),
+ content: Text('Date or Time is missing', style: TextStyle(color: Theme.of(context).colorScheme.secondary)),
));
return;
} else {
@@ -84,7 +84,7 @@ class _CreateTripState extends State {
duration: Duration(seconds: 2),
content: Text(
'INVALID : Start Time > End Time',
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(color: Theme.of(context).colorScheme.secondary),
),
));
}
@@ -176,7 +176,7 @@ class _CreateTripState extends State {
IconButton(
icon: Icon(
Icons.calendar_today,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
onPressed: () => DatePicker(),
),
@@ -184,7 +184,7 @@ class _CreateTripState extends State {
IconButton(
icon: Icon(
Icons.schedule,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
onPressed: () => TimePicker(),
),
@@ -241,7 +241,7 @@ class _CreateTripState extends State {
child: Text(
dropDownStringItem,
style: TextStyle(
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
),
);
@@ -292,7 +292,7 @@ class _CreateTripState extends State {
child: Text(
dropDownIntItem.toString(),
style: TextStyle(
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
),
);
@@ -323,7 +323,7 @@ class _CreateTripState extends State {
children: [
Checkbox(
checkColor: getVisibleColorOnAccentColor(context),
- activeColor: Theme.of(context).accentColor,
+ activeColor: Theme.of(context).colorScheme.secondary,
value: privacy,
onChanged: (bool value) {
setState(() {
@@ -347,7 +347,7 @@ class _CreateTripState extends State {
),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
- primary: Theme.of(context).accentColor,
+ primary: Theme.of(context).colorScheme.secondary,
textStyle: TextStyle(color: getVisibleColorOnAccentColor(context)),
),
onPressed: () {
diff --git a/lib/screens/dashboard.dart b/lib/screens/dashboard.dart
index a67532d..95582af 100644
--- a/lib/screens/dashboard.dart
+++ b/lib/screens/dashboard.dart
@@ -8,7 +8,7 @@ import 'package:shareacab/models/requestdetails.dart';
import 'package:shareacab/screens/createtrip.dart';
import 'package:shareacab/screens/filter.dart';
import 'package:shareacab/screens/help.dart';
-import 'package:shareacab/screens/settings.dart';
+import 'package:shareacab/screens/settings.dart' as SettingsScreen;
import 'package:shareacab/screens/tripslist.dart';
import 'package:shareacab/services/auth.dart';
@@ -17,7 +17,8 @@ class Dashboard extends StatefulWidget {
_DashboardState createState() => _DashboardState();
}
-class _DashboardState extends State with AutomaticKeepAliveClientMixin {
+class _DashboardState extends State
+ with AutomaticKeepAliveClientMixin {
final GlobalKey scaffoldKey = GlobalKey();
final AuthService _auth = AuthService();
List filtered = allTrips;
@@ -53,7 +54,7 @@ class _DashboardState extends State with AutomaticKeepAliveClientMixi
var inGroupFetch = false;
var UID;
Future getCurrentUser() async {
- var user = await auth.currentUser();
+ var user = auth.currentUser;
final userid = user.uid;
setState(() {
UID = userid;
@@ -72,14 +73,16 @@ class _DashboardState extends State with AutomaticKeepAliveClientMixi
Widget build(BuildContext context) {
var fetched = false;
super.build(context);
- final currentuser = Provider.of(context);
+ final currentuser = Provider.of(context);
return Scaffold(
key: scaffoldKey,
appBar: AppBar(
title: Text('Dashboard'),
actions: [
TextButton.icon(
- style: TextButton.styleFrom(textStyle: TextStyle(color: getVisibleColorOnPrimaryColor(context))),
+ style: TextButton.styleFrom(
+ textStyle:
+ TextStyle(color: getVisibleColorOnPrimaryColor(context))),
icon: Icon(
Icons.filter_list,
size: 30.0,
@@ -93,23 +96,29 @@ class _DashboardState extends State with AutomaticKeepAliveClientMixi
icon: Icon(Icons.help),
tooltip: 'Help',
onPressed: () {
- Navigator.push(context, MaterialPageRoute(builder: (context) => Help()));
+ Navigator.push(
+ context, MaterialPageRoute(builder: (context) => Help()));
},
),
IconButton(
icon: Icon(Icons.settings),
tooltip: 'Settings',
onPressed: () {
- return Navigator.push(context, MaterialPageRoute(builder: (context) {
- return Settings(_auth);
+ return Navigator.push(context,
+ MaterialPageRoute(builder: (context) {
+ return SettingsScreen.Settings(_auth);
}));
}),
],
),
resizeToAvoidBottomInset: false,
body: StreamBuilder(
- stream: Firestore.instance.collection('userdetails').document(currentuser.uid).snapshots(),
- builder: (BuildContext context, AsyncSnapshot snapshot) {
+ stream: FirebaseFirestore.instance
+ .collection('userdetails')
+ .doc(currentuser.uid)
+ .snapshots(),
+ builder:
+ (BuildContext context, AsyncSnapshot snapshot) {
if (snapshot.connectionState == ConnectionState.active) {
var temp = snapshot.data['currentGroup'];
if (temp != null) {
@@ -123,14 +132,17 @@ class _DashboardState extends State with AutomaticKeepAliveClientMixi
}
try {
- if (snapshot.connectionState == ConnectionState.active && fetched == true) {
+ if (snapshot.connectionState == ConnectionState.active &&
+ fetched == true) {
return Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
Container(
margin: EdgeInsets.all(5),
- height: (MediaQuery.of(context).size.height - MediaQuery.of(context).padding.top) * 0.87,
+ height: (MediaQuery.of(context).size.height -
+ MediaQuery.of(context).padding.top) *
+ 0.87,
width: double.infinity,
child: TripsList(
_dest,
diff --git a/lib/screens/edituserdetails.dart b/lib/screens/edituserdetails.dart
index 49cef96..d234ecc 100644
--- a/lib/screens/edituserdetails.dart
+++ b/lib/screens/edituserdetails.dart
@@ -45,7 +45,7 @@ class _EditFormState extends State {
@override
Widget build(BuildContext context) {
- final user = Provider.of(context);
+ final user = Provider.of(context);
return StreamBuilder(
stream: DatabaseService(uid: user.uid).userData,
builder: (context, snapshot) {
@@ -87,12 +87,14 @@ class _EditFormState extends State {
),
label: Text(
'Done',
- style: TextStyle(color: getVisibleColorOnPrimaryColor(context)),
+ style: TextStyle(
+ color: getVisibleColorOnPrimaryColor(context)),
))
],
),
body: Container(
- padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 60.0),
+ padding:
+ EdgeInsets.symmetric(vertical: 20.0, horizontal: 60.0),
child: Form(
key: _formKey,
child: SingleChildScrollView(
@@ -102,8 +104,21 @@ class _EditFormState extends State {
TextFormField(
// textCapitalization: TextCapitalization.words,
initialValue: snapshot.data['name'],
- decoration: InputDecoration(hintText: 'Name', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
- validator: (val) => val.isEmpty ? 'Enter a valid Name' : null,
+ decoration: InputDecoration(
+ hintText: 'Name',
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: getBorderColorForInputFields(
+ context),
+ width: 2.0)),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
+ width: 2.0))),
+ validator: (val) =>
+ val.isEmpty ? 'Enter a valid Name' : null,
onChanged: (val) {
setState(() => name = val);
},
@@ -111,51 +126,98 @@ class _EditFormState extends State {
SizedBox(height: 20.0),
TextFormField(
initialValue: snapshot.data['mobileNumber'],
- decoration: InputDecoration(hintText: 'Mobile Number', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
- validator: (val) => val.length != 10 ? 'Enter a valid mobile number.' : null,
+ decoration: InputDecoration(
+ hintText: 'Mobile Number',
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: getBorderColorForInputFields(
+ context),
+ width: 2.0)),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
+ width: 2.0))),
+ validator: (val) => val.length != 10
+ ? 'Enter a valid mobile number.'
+ : null,
keyboardType: TextInputType.number,
- inputFormatters: [FilteringTextInputFormatter.digitsOnly],
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly
+ ],
onChanged: (val) {
setState(() => mobileNum = val);
},
),
SizedBox(height: 20.0),
DropdownButtonFormField(
- decoration: InputDecoration(hintText: 'Select Hostel', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(
+ hintText: 'Select Hostel',
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: getBorderColorForInputFields(
+ context),
+ width: 2.0)),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
+ width: 2.0))),
value: hostel ?? snapshot.data['hostel'],
- onTap: () => FocusScope.of(context).requestFocus(FocusNode()),
+ onTap: () => FocusScope.of(context)
+ .requestFocus(FocusNode()),
onChanged: (newValue) {
setState(() {
- FocusScope.of(context).requestFocus(FocusNode());
+ FocusScope.of(context)
+ .requestFocus(FocusNode());
hostel = newValue;
});
},
items: _hostels.map((temp) {
return DropdownMenuItem(
- child: Text(temp),
value: temp,
+ child: Text(temp),
);
}).toList(),
- validator: (val) => val == null ? 'Please select your hostel' : null,
+ validator: (val) => val == null
+ ? 'Please select your hostel'
+ : null,
),
SizedBox(height: 20.0),
DropdownButtonFormField(
- decoration: InputDecoration(hintText: 'Select Gender', enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: getBorderColorForInputFields(context), width: 2.0)), focusedBorder: OutlineInputBorder(borderSide: BorderSide(color: Theme.of(context).accentColor, width: 2.0))),
+ decoration: InputDecoration(
+ hintText: 'Select Gender',
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: getBorderColorForInputFields(
+ context),
+ width: 2.0)),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
+ width: 2.0))),
value: sex ?? snapshot.data['sex'],
- onTap: () => FocusScope.of(context).requestFocus(FocusNode()),
+ onTap: () => FocusScope.of(context)
+ .requestFocus(FocusNode()),
onChanged: (newValue) {
setState(() {
- FocusScope.of(context).requestFocus(FocusNode());
+ FocusScope.of(context)
+ .requestFocus(FocusNode());
sex = newValue;
});
},
items: _sex.map((temp) {
return DropdownMenuItem(
- child: Text(temp),
value: temp,
+ child: Text(temp),
);
}).toList(),
- validator: (val) => val == null ? 'Please select your sex' : null,
+ validator: (val) =>
+ val == null ? 'Please select your sex' : null,
),
SizedBox(height: 20.0),
],
diff --git a/lib/screens/filter.dart b/lib/screens/filter.dart
index 85c455e..94a50a4 100644
--- a/lib/screens/filter.dart
+++ b/lib/screens/filter.dart
@@ -58,7 +58,7 @@ class _FilterState extends State {
title: Text('Destination'),
value: _dest,
subtitle: Text('Select Preferred Destination'),
- activeColor: Theme.of(context).accentColor,
+ activeColor: Theme.of(context).colorScheme.secondary,
onChanged: (newValue) {
setState(() {
_dest = newValue;
@@ -81,7 +81,7 @@ class _FilterState extends State {
child: Text(
dropDownStringItem,
style: TextStyle(
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
),
);
@@ -101,7 +101,7 @@ class _FilterState extends State {
title: Text('Privacy'),
value: _notPrivacy,
subtitle: Text('Only see groups which are Free to Join'),
- activeColor: Theme.of(context).accentColor,
+ activeColor: Theme.of(context).colorScheme.secondary,
onChanged: (newValue) {
setState(() {
_notPrivacy = newValue;
@@ -124,7 +124,7 @@ class _FilterState extends State {
_submitData();
},
style: ButtonStyle(
- foregroundColor: MaterialStateProperty.all(Theme.of(context).accentColor),
+ foregroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.secondary),
),
child: Text('Filter', style: TextStyle(fontSize: 16, color: getVisibleColorOnAccentColor(context))),
),
diff --git a/lib/screens/groupdetailscreen/ended_group_details.dart b/lib/screens/groupdetailscreen/ended_group_details.dart
index f9a848e..9d115c9 100644
--- a/lib/screens/groupdetailscreen/ended_group_details.dart
+++ b/lib/screens/groupdetailscreen/ended_group_details.dart
@@ -20,7 +20,8 @@ class EndedGroupDetails extends StatefulWidget {
final numberOfMembers;
final data;
- EndedGroupDetails(this.destination, this.docId, this.privacy, this.start, this.end, this.numberOfMembers, this.data);
+ EndedGroupDetails(this.destination, this.docId, this.privacy, this.start,
+ this.end, this.numberOfMembers, this.data);
static bool inGroup = false;
@override
@@ -29,8 +30,12 @@ class EndedGroupDetails extends StatefulWidget {
class _EndedGroupDetailsState extends State {
Future getUserDetails() async {
- final userDetails = await Firestore.instance.collection('group').document(widget.docId).collection('users').getDocuments();
- return userDetails.documents;
+ final userDetails = await FirebaseFirestore.instance
+ .collection('group')
+ .doc(widget.docId)
+ .collection('users')
+ .get();
+ return userDetails.docs;
}
var _fetchData;
@@ -69,7 +74,8 @@ class _EndedGroupDetailsState extends State {
body: Scaffold(
body: NestedScrollView(
controller: ScrollController(keepScrollOffset: true),
- headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
+ headerSliverBuilder:
+ (BuildContext context, bool innerBoxIsScrolled) {
return [];
},
body: SingleChildScrollView(
@@ -78,8 +84,10 @@ class _EndedGroupDetailsState extends State {
Hero(
tag: widget.docId,
child: Card(
- color: Theme.of(context).accentColor,
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(25.0))),
+ color: Theme.of(context).colorScheme.secondary,
+ shape: RoundedRectangleBorder(
+ borderRadius:
+ BorderRadius.all(Radius.circular(25.0))),
elevation: 5,
margin: EdgeInsets.symmetric(vertical: 6, horizontal: 5),
child: Container(
@@ -96,15 +104,20 @@ class _EndedGroupDetailsState extends State {
margin: EdgeInsets.only(
left: 20,
),
- child: widget.destination == 'New Delhi Railway Station'
+ child: widget.destination ==
+ 'New Delhi Railway Station'
? Icon(
Icons.train,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
size: 30,
)
: Icon(
Icons.airplanemode_active,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
size: 30,
)),
),
@@ -117,7 +130,12 @@ class _EndedGroupDetailsState extends State {
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
- Text('Started : ${DateFormat('dd.MM.yyyy - kk:mm a').format(widget.start)}', style: TextStyle(fontSize: 15.0, color: getVisibleColorOnAccentColor(context))),
+ Text(
+ 'Started : ${DateFormat('dd.MM.yyyy - kk:mm a').format(widget.start)}',
+ style: TextStyle(
+ fontSize: 15.0,
+ color: getVisibleColorOnAccentColor(
+ context))),
],
),
),
@@ -130,7 +148,10 @@ class _EndedGroupDetailsState extends State {
children: [
Text(
'Ended : ${DateFormat('dd.MM.yyyy - kk:mm a').format(widget.end)}',
- style: TextStyle(fontSize: 15, color: getVisibleColorOnAccentColor(context)),
+ style: TextStyle(
+ fontSize: 15,
+ color: getVisibleColorOnAccentColor(
+ context)),
),
],
),
@@ -143,7 +164,9 @@ class _EndedGroupDetailsState extends State {
Text(
'Number of members in group: '
'${widget.numberOfMembers}',
- style: TextStyle(color: getVisibleColorOnAccentColor(context)),
+ style: TextStyle(
+ color: getVisibleColorOnAccentColor(
+ context)),
)
],
),
@@ -160,7 +183,8 @@ class _EndedGroupDetailsState extends State {
child: FutureBuilder(
future: _fetchData,
builder: (ctx, futureSnapshot) {
- if (futureSnapshot.connectionState == ConnectionState.waiting) {
+ if (futureSnapshot.connectionState ==
+ ConnectionState.waiting) {
return Center(
child: CircularProgressIndicator(),
);
@@ -170,20 +194,26 @@ class _EndedGroupDetailsState extends State {
itemCount: futureSnapshot.data.length,
itemBuilder: (ctx, index) {
return Container(
- margin: EdgeInsets.symmetric(vertical: 2, horizontal: 10),
+ margin: EdgeInsets.symmetric(
+ vertical: 2, horizontal: 10),
width: double.infinity,
child: Card(
elevation: 4,
child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
+ mainAxisAlignment:
+ MainAxisAlignment.spaceAround,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
- child: Text(futureSnapshot.data[index].data['name']),
+ child: Text(futureSnapshot
+ .data()[index]
+ .data()['name']),
),
Padding(
padding: const EdgeInsets.all(8.0),
- child: Text(futureSnapshot.data[index].data['hostel']),
+ child: Text(futureSnapshot
+ .data()[index]
+ .data()['hostel']),
),
Padding(
padding: const EdgeInsets.all(8.0),
@@ -191,39 +221,66 @@ class _EndedGroupDetailsState extends State {
onPressed: () async {
try {
if (Platform.isIOS) {
- await Clipboard.setData(ClipboardData(text: '${futureSnapshot.data[index].data['mobilenum'].toString()}')).then((result) {
+ await Clipboard.setData(
+ ClipboardData(
+ text:
+ '${futureSnapshot.data()[index].data()['mobilenum'].toString()}'))
+ .then((result) {
final snackBar = SnackBar(
- backgroundColor: Theme.of(context).primaryColor,
+ backgroundColor:
+ Theme.of(context)
+ .primaryColor,
content: Text(
'Copied to Clipboard',
- style: TextStyle(color: getVisibleColorOnPrimaryColor(context)),
+ style: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(
+ context)),
),
- duration: Duration(seconds: 1),
+ duration:
+ Duration(seconds: 1),
);
- ScaffoldMessenger.of(ctx).hideCurrentSnackBar();
- ScaffoldMessenger.of(ctx).showSnackBar(snackBar);
+ ScaffoldMessenger.of(ctx)
+ .hideCurrentSnackBar();
+ ScaffoldMessenger.of(ctx)
+ .showSnackBar(snackBar);
});
} else {
- await launch('tel://${futureSnapshot.data[index].data['mobilenum'].toString()}');
+ await launch(
+ 'tel://${futureSnapshot.data()[index].data()['mobilenum'].toString()}');
}
} catch (e) {
- await Clipboard.setData(ClipboardData(text: '${futureSnapshot.data[index].data['mobilenum'].toString()}')).then((result) {
+ await Clipboard.setData(
+ ClipboardData(
+ text:
+ '${futureSnapshot.data()[index].data()['mobilenum'].toString()}'))
+ .then((result) {
final snackBar = SnackBar(
- backgroundColor: Theme.of(context).primaryColor,
+ backgroundColor:
+ Theme.of(context)
+ .primaryColor,
content: Text(
'Copied to Clipboard',
- style: TextStyle(color: getVisibleColorOnPrimaryColor(context)),
+ style: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(
+ context)),
),
- duration: Duration(seconds: 1),
+ duration:
+ Duration(seconds: 1),
);
- ScaffoldMessenger.of(ctx).hideCurrentSnackBar();
- ScaffoldMessenger.of(ctx).showSnackBar(snackBar);
+ ScaffoldMessenger.of(ctx)
+ .hideCurrentSnackBar();
+ ScaffoldMessenger.of(ctx)
+ .showSnackBar(snackBar);
});
}
},
icon: Icon(
Icons.phone,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
)),
),
],
diff --git a/lib/screens/groupdetailscreen/groupdetails.dart b/lib/screens/groupdetailscreen/groupdetails.dart
index eab1d1d..5a1818c 100644
--- a/lib/screens/groupdetailscreen/groupdetails.dart
+++ b/lib/screens/groupdetailscreen/groupdetails.dart
@@ -27,18 +27,24 @@ class GroupDetails extends StatefulWidget {
final numberOfMembers;
final data;
- GroupDetails(this.destination, this.docId, this.privacy, this.start, this.end, this.numberOfMembers, this.data);
+ GroupDetails(this.destination, this.docId, this.privacy, this.start, this.end,
+ this.numberOfMembers, this.data);
static bool inGroup = false;
@override
_GroupDetailsState createState() => _GroupDetailsState();
}
-class _GroupDetailsState extends State with AutomaticKeepAliveClientMixin {
+class _GroupDetailsState extends State
+ with AutomaticKeepAliveClientMixin {
final RequestService _request = RequestService();
final NotifServices _notifServices = NotifServices();
Future getUserDetails() async {
- final userDetails = await Firestore.instance.collection('group').document(widget.docId).collection('users').snapshots();
+ final userDetails = FirebaseFirestore.instance
+ .collection('group')
+ .doc(widget.docId)
+ .collection('users')
+ .snapshots();
return userDetails;
}
@@ -65,29 +71,43 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
Widget build(BuildContext context) {
super.build(context);
timeDilation = 1.0;
- final currentuser = Provider.of(context);
+ final currentuser = Provider.of(context);
return StreamBuilder(
- stream: Firestore.instance.collection('userdetails').document(currentuser.uid).snapshots(),
+ stream: FirebaseFirestore.instance
+ .collection('userdetails')
+ .doc(currentuser.uid)
+ .snapshots(),
builder: (context, usersnapshot) {
- requestedToJoin = usersnapshot.hasData ? usersnapshot.data['currentGroupJoinRequests'] != null && usersnapshot.data['currentGroupJoinRequests'].contains(widget.docId) : false;
+ requestedToJoin = usersnapshot.hasData
+ ? usersnapshot.data()['currentGroupJoinRequests'] != null &&
+ usersnapshot
+ .data()['currentGroupJoinRequests']
+ .contains(widget.docId)
+ : false;
if (usersnapshot.connectionState == ConnectionState.active) {
- var groupUID = usersnapshot.data['currentGroup'];
+ var groupUID = usersnapshot.data()['currentGroup'];
if (groupUID != null) {
GroupDetails.inGroup = true;
} else {
GroupDetails.inGroup = false;
}
return StreamBuilder(
- stream: Firestore.instance.collection('group').document(widget.docId).snapshots(),
+ stream: FirebaseFirestore.instance
+ .collection('group')
+ .doc(widget.docId)
+ .snapshots(),
builder: (context, groupsnapshot) {
if (groupsnapshot.connectionState == ConnectionState.active) {
- privacy = groupsnapshot.data['privacy'];
- destination = groupsnapshot.data['destination'];
- start = DateFormat('dd.MM.yyyy - kk:mm a').format(groupsnapshot.data['start'].toDate());
- end = DateFormat('dd.MM.yyyy - kk:mm a').format(groupsnapshot.data['end'].toDate());
- presentNum = groupsnapshot.data['numberOfMembers'].toString();
+ privacy = groupsnapshot.data()['privacy'];
+ destination = groupsnapshot.data()['destination'];
+ start = DateFormat('dd.MM.yyyy - kk:mm a')
+ .format(groupsnapshot.data()['start'].toDate());
+ end = DateFormat('dd.MM.yyyy - kk:mm a')
+ .format(groupsnapshot.data()['end'].toDate());
+ presentNum =
+ groupsnapshot.data()['numberOfMembers'].toString();
present = int.parse(presentNum);
- max = groupsnapshot.data['maxpoolers'];
+ max = groupsnapshot.data()['maxpoolers'];
if (present >= max) {
full = true;
} else {
@@ -95,7 +115,8 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
}
return NestedScrollView(
controller: ScrollController(keepScrollOffset: true),
- headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
+ headerSliverBuilder:
+ (BuildContext context, bool innerBoxIsScrolled) {
return [
SliverAppBar(
pinned: true,
@@ -109,8 +130,10 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
},
body: Scaffold(
body: NestedScrollView(
- controller: ScrollController(keepScrollOffset: true),
- headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
+ controller:
+ ScrollController(keepScrollOffset: true),
+ headerSliverBuilder: (BuildContext context,
+ bool innerBoxIsScrolled) {
return [];
},
body: SingleChildScrollView(
@@ -119,16 +142,23 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
Hero(
tag: widget.docId,
child: Card(
- color: Theme.of(context).accentColor,
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(25.0))),
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.all(
+ Radius.circular(25.0))),
elevation: 5,
- margin: EdgeInsets.symmetric(vertical: 6, horizontal: 5),
+ margin: EdgeInsets.symmetric(
+ vertical: 6, horizontal: 5),
child: Container(
height: 120,
child: Column(
children: [
Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ mainAxisAlignment:
+ MainAxisAlignment
+ .spaceBetween,
children: [
Flexible(
fit: FlexFit.tight,
@@ -137,15 +167,24 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
margin: EdgeInsets.only(
left: 20,
),
- child: widget.destination == 'New Delhi Railway Station'
+ child: widget
+ .destination ==
+ 'New Delhi Railway Station'
? Icon(
Icons.train,
- color: Theme.of(context).accentColor,
+ color: Theme.of(
+ context)
+ .colorScheme
+ .secondary,
size: 30,
)
: Icon(
- Icons.airplanemode_active,
- color: Theme.of(context).accentColor,
+ Icons
+ .airplanemode_active,
+ color: Theme.of(
+ context)
+ .colorScheme
+ .secondary,
size: 30,
)),
),
@@ -156,9 +195,15 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
bottom: 5,
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
children: [
- Text('Start : ${start}', style: TextStyle(fontSize: 15.0, color: getVisibleColorOnAccentColor(context))),
+ Text('Start : $start',
+ style: TextStyle(
+ fontSize: 15.0,
+ color:
+ getVisibleColorOnAccentColor(
+ context))),
],
),
),
@@ -167,26 +212,37 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
bottom: 5,
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
children: [
Text(
- 'End : ${end}',
- style: TextStyle(fontSize: 15, color: getVisibleColorOnAccentColor(context)),
+ 'End : $end',
+ style: TextStyle(
+ fontSize: 15,
+ color:
+ getVisibleColorOnAccentColor(
+ context)),
),
],
),
),
Padding(
- padding: const EdgeInsets.only(bottom: 5),
+ padding: const EdgeInsets.only(
+ bottom: 5),
child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
+ mainAxisAlignment:
+ MainAxisAlignment
+ .spaceAround,
children: [
Column(
children: [
Text(
'Number of members in group: '
- '${presentNum}',
- style: TextStyle(color: getVisibleColorOnAccentColor(context)),
+ '$presentNum',
+ style: TextStyle(
+ color:
+ getVisibleColorOnAccentColor(
+ context)),
)
],
),
@@ -194,14 +250,18 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
),
),
Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
+ mainAxisAlignment:
+ MainAxisAlignment.spaceAround,
children: [
Column(
children: [
Text(
'Max Number of members: '
- '${max}',
- style: TextStyle(color: getVisibleColorOnAccentColor(context)),
+ '$max',
+ style: TextStyle(
+ color:
+ getVisibleColorOnAccentColor(
+ context)),
)
],
),
@@ -214,11 +274,17 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
),
Container(
margin: EdgeInsets.only(top: 60),
- height: MediaQuery.of(context).size.height * 0.7,
+ height: MediaQuery.of(context).size.height *
+ 0.7,
child: StreamBuilder(
- stream: Firestore.instance.collection('group').document(widget.docId).collection('users').snapshots(),
+ stream: FirebaseFirestore.instance
+ .collection('group')
+ .doc(widget.docId)
+ .collection('users')
+ .snapshots(),
builder: (ctx, futureSnapshot) {
- if (futureSnapshot.connectionState == ConnectionState.waiting) {
+ if (futureSnapshot.connectionState ==
+ ConnectionState.waiting) {
return Column(
children: [
CircularProgressIndicator(),
@@ -226,64 +292,126 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
);
}
return ListView.builder(
- physics: NeverScrollableScrollPhysics(),
- itemCount: futureSnapshot.data.documents.length,
+ physics:
+ NeverScrollableScrollPhysics(),
+ itemCount:
+ futureSnapshot.data.docs.length,
itemBuilder: (ctx, index) {
return Container(
- margin: EdgeInsets.symmetric(vertical: 2, horizontal: 10),
+ margin: EdgeInsets.symmetric(
+ vertical: 2,
+ horizontal: 10),
width: double.infinity,
child: Card(
elevation: 4,
child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
+ mainAxisAlignment:
+ MainAxisAlignment
+ .spaceAround,
children: [
Padding(
- padding: const EdgeInsets.all(8.0),
- child: Text(futureSnapshot.data.documents[index].data['name']),
+ padding:
+ const EdgeInsets
+ .all(8.0),
+ child: Text(
+ futureSnapshot.data
+ .docs[index]
+ .data()[
+ 'name']),
),
Padding(
- padding: const EdgeInsets.all(8.0),
- child: Text(futureSnapshot.data.documents[index].data['hostel']),
+ padding:
+ const EdgeInsets
+ .all(8.0),
+ child: Text(
+ futureSnapshot.data
+ .docs[index]
+ .data()[
+ 'hostel']),
),
Padding(
- padding: const EdgeInsets.all(8.0),
+ padding:
+ const EdgeInsets
+ .all(8.0),
child: IconButton(
- onPressed: () async {
+ onPressed:
+ () async {
try {
- if (Platform.isIOS) {
- await Clipboard.setData(ClipboardData(text: '${futureSnapshot.data.documents[index].data['mobilenum'].toString()}')).then((result) {
- final snackBar = SnackBar(
- backgroundColor: Theme.of(context).primaryColor,
- content: Text(
+ if (Platform
+ .isIOS) {
+ await Clipboard.setData(ClipboardData(
+ text:
+ '${futureSnapshot.data.docs[index].data()['mobilenum'].toString()}'))
+ .then(
+ (result) {
+ final snackBar =
+ SnackBar(
+ backgroundColor:
+ Theme.of(context)
+ .primaryColor,
+ content:
+ Text(
'Copied to Clipboard',
- style: TextStyle(color: getVisibleColorOnPrimaryColor(context)),
+ style: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(context)),
),
- duration: Duration(seconds: 1),
+ duration: Duration(
+ seconds:
+ 1),
);
- ScaffoldMessenger.of(ctx).hideCurrentSnackBar();
- ScaffoldMessenger.of(ctx).showSnackBar(snackBar);
+ ScaffoldMessenger.of(
+ ctx)
+ .hideCurrentSnackBar();
+ ScaffoldMessenger.of(
+ ctx)
+ .showSnackBar(
+ snackBar);
});
} else {
- await launch('tel://${futureSnapshot.data.documents[index].data['mobilenum'].toString()}');
+ await launch(
+ 'tel://${futureSnapshot.data.docs[index].data()['mobilenum'].toString()}');
}
} catch (e) {
- await Clipboard.setData(ClipboardData(text: '${futureSnapshot.data.documents[index].data['mobilenum'].toString()}')).then((result) {
- final snackBar = SnackBar(
- backgroundColor: Theme.of(context).primaryColor,
- content: Text(
+ await Clipboard.setData(
+ ClipboardData(
+ text:
+ '${futureSnapshot.data.docs[index].data()['mobilenum'].toString()}'))
+ .then(
+ (result) {
+ final snackBar =
+ SnackBar(
+ backgroundColor:
+ Theme.of(context)
+ .primaryColor,
+ content:
+ Text(
'Copied to Clipboard',
- style: TextStyle(color: getVisibleColorOnPrimaryColor(context)),
+ style: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(context)),
),
- duration: Duration(seconds: 1),
+ duration: Duration(
+ seconds:
+ 1),
);
- ScaffoldMessenger.of(ctx).hideCurrentSnackBar();
- ScaffoldMessenger.of(ctx).showSnackBar(snackBar);
+ ScaffoldMessenger
+ .of(ctx)
+ .hideCurrentSnackBar();
+ ScaffoldMessenger
+ .of(
+ ctx)
+ .showSnackBar(
+ snackBar);
});
}
},
icon: Icon(
Icons.phone,
- color: Theme.of(context).accentColor,
+ color: Theme.of(
+ context)
+ .colorScheme
+ .secondary,
)),
),
],
@@ -300,14 +428,19 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
),
bottomNavigationBar: TextButton(
style: TextButton.styleFrom(
- textStyle: TextStyle(color: getVisibleColorOnPrimaryColor(context)),
+ textStyle: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(context)),
padding: EdgeInsets.all(20),
),
onPressed: () async {
try {
if (GroupDetails.inGroup) {
- await Navigator.push(context, MaterialPageRoute(builder: (context) => GroupPage()));
+ await Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => GroupPage()));
} else if (full) {
null;
} else if (privacy == 'true' && !full) {
@@ -318,24 +451,46 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
context: context,
builder: (BuildContext ctx) {
return AlertDialog(
- title: Text('Request To Join Group'),
- content: Text('Are you sure you want to request to join this group?'),
+ title:
+ Text('Request To Join Group'),
+ content: Text(
+ 'Are you sure you want to request to join this group?'),
actions: [
TextButton(
- child: Text('Request', style: TextStyle(color: Theme.of(context).accentColor)),
+ child: Text('Request',
+ style: TextStyle(
+ color:
+ Theme.of(context)
+ .colorScheme
+ .secondary)),
onPressed: () async {
ProgressDialog pr;
- pr = ProgressDialog(context, type: ProgressDialogType.Normal, isDismissible: false, showLogs: false);
+ pr = ProgressDialog(context,
+ type: ProgressDialogType
+ .Normal,
+ isDismissible: false,
+ showLogs: false);
pr.style(
message: 'Requesting...',
- backgroundColor: Theme.of(context).backgroundColor,
- messageTextStyle: TextStyle(color: Theme.of(context).accentColor),
+ backgroundColor:
+ Theme.of(context)
+ .backgroundColor,
+ messageTextStyle:
+ TextStyle(
+ color: Theme.of(
+ context)
+ .colorScheme
+ .secondary),
);
await pr.show();
- await Future.delayed(Duration(seconds: 1));
+ await Future.delayed(
+ Duration(seconds: 1));
try {
- await _notifServices.createRequest(widget.docId);
- await Navigator.of(context).pop();
+ await _notifServices
+ .createRequest(
+ widget.docId);
+ Navigator.of(context)
+ .pop();
await pr.hide();
} catch (e) {
await pr.hide();
@@ -344,7 +499,12 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
},
),
TextButton(
- child: Text('Cancel', style: TextStyle(color: Theme.of(context).accentColor)),
+ child: Text('Cancel',
+ style: TextStyle(
+ color:
+ Theme.of(context)
+ .colorScheme
+ .secondary)),
onPressed: () {
Navigator.of(context).pop();
},
@@ -358,24 +518,44 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
builder: (BuildContext ctx) {
return AlertDialog(
title: Text('Join Group'),
- content: Text('Are you sure you want to join this group?'),
+ content: Text(
+ 'Are you sure you want to join this group?'),
actions: [
TextButton(
- child: Text('Join', style: TextStyle(color: Theme.of(context).accentColor)),
+ child: Text('Join',
+ style: TextStyle(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary)),
onPressed: () async {
ProgressDialog pr;
- pr = ProgressDialog(context, type: ProgressDialogType.Normal, isDismissible: false, showLogs: false);
+ pr = ProgressDialog(context,
+ type: ProgressDialogType
+ .Normal,
+ isDismissible: false,
+ showLogs: false);
pr.style(
message: 'Joining Group...',
- backgroundColor: Theme.of(context).backgroundColor,
- messageTextStyle: TextStyle(color: Theme.of(context).accentColor),
+ backgroundColor:
+ Theme.of(context)
+ .backgroundColor,
+ messageTextStyle: TextStyle(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary),
);
await pr.show();
- await Future.delayed(Duration(seconds: 1));
+ await Future.delayed(
+ Duration(seconds: 1));
try {
- await _request.joinGroup(widget.docId);
+ await _request
+ .joinGroup(widget.docId);
GroupDetails.inGroup = true;
- await _notifServices.groupJoin(usersnapshot.data['name'], widget.docId);
+ await _notifServices
+ .groupJoin(
+ usersnapshot
+ .data()['name'],
+ widget.docId);
await pr.hide();
} catch (e) {
await pr.hide();
@@ -395,7 +575,11 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
},
),
TextButton(
- child: Text('Cancel', style: TextStyle(color: Theme.of(context).accentColor)),
+ child: Text('Cancel',
+ style: TextStyle(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary)),
onPressed: () {
Navigator.of(context).pop();
},
@@ -412,27 +596,46 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
? GroupDetails.inGroup
? Text(
'My Group Page', // You are in a group and viewing a private group
- style: TextStyle(fontSize: 20, color: getVisibleColorOnAccentColor(context)),
+ style: TextStyle(
+ fontSize: 20,
+ color: getVisibleColorOnAccentColor(
+ context)),
)
: full
- ? Text('Group is full', style: TextStyle(fontSize: 20))
+ ? Text('Group is full',
+ style: TextStyle(fontSize: 20))
: requestedToJoin
? Text(
'Requested', // You are not in any group and requested to join
- style: TextStyle(fontSize: 20, color: getVisibleColorOnAccentColor(context)),
+ style: TextStyle(
+ fontSize: 20,
+ color:
+ getVisibleColorOnAccentColor(
+ context)),
)
: Text(
'Request to Join', // fresh visit to private group (and user is not in any group)
- style: TextStyle(fontSize: 20, color: getVisibleColorOnAccentColor(context)),
+ style: TextStyle(
+ fontSize: 20,
+ color:
+ getVisibleColorOnAccentColor(
+ context)),
)
: GroupDetails.inGroup
? Text(
'My Group Page', // visiting a group page
- style: TextStyle(fontSize: 20, color: getVisibleColorOnAccentColor(context)),
+ style: TextStyle(
+ fontSize: 20,
+ color: getVisibleColorOnAccentColor(
+ context)),
)
: full
- ? Text('Group is full', style: TextStyle(fontSize: 20))
- : Text('Join Now', style: TextStyle(fontSize: 20)), // Visiting a public group page and not in any group
+ ? Text('Group is full',
+ style: TextStyle(fontSize: 20))
+ : Text('Join Now',
+ style: TextStyle(
+ fontSize:
+ 20)), // Visiting a public group page and not in any group
),
));
} else {
diff --git a/lib/screens/groupscreen/editgroup.dart b/lib/screens/groupscreen/editgroup.dart
index cf437f3..ce22384 100644
--- a/lib/screens/groupscreen/editgroup.dart
+++ b/lib/screens/groupscreen/editgroup.dart
@@ -35,14 +35,24 @@ class _EditGroupState extends State {
void _updateGroup() async {
try {
- await _databaseService.updateGroup(groupUID, _selectedStartDate, _selectedStartTime, _selectedEndDate, _selectedEndTime, privacy, _maxPoolers);
+ await _databaseService.updateGroup(
+ groupUID,
+ _selectedStartDate,
+ _selectedStartTime,
+ _selectedEndDate,
+ _selectedEndTime,
+ privacy,
+ _maxPoolers);
} catch (e) {
print(e.toString());
}
}
void _submitData() {
- if (_selectedStartDate == null || _selectedStartTime == null || _selectedEndDate == null || _selectedEndTime == null) {
+ if (_selectedStartDate == null ||
+ _selectedStartTime == null ||
+ _selectedEndDate == null ||
+ _selectedEndTime == null) {
return; //return stops function execution and thus nothing is called or returned
}
setState(() {
@@ -52,7 +62,12 @@ class _EditGroupState extends State {
}
void _startDatePicker() {
- showDatePicker(context: context, initialDate: _selectedStartDate, firstDate: DateTime.parse(_selectedStartDate.toString()), lastDate: DateTime.now().add(Duration(days: 30))).then((pickedDate) {
+ showDatePicker(
+ context: context,
+ initialDate: _selectedStartDate,
+ firstDate: DateTime.parse(_selectedStartDate.toString()),
+ lastDate: DateTime.now().add(Duration(days: 30)))
+ .then((pickedDate) {
if (pickedDate == null) {
return;
}
@@ -64,7 +79,12 @@ class _EditGroupState extends State {
}
void _endDatePicker() {
- showDatePicker(context: context, initialDate: _selectedEndDate, firstDate: DateTime.parse(_selectedEndDate.toString()), lastDate: DateTime.now().add(Duration(days: 30))).then((pickedDate) {
+ showDatePicker(
+ context: context,
+ initialDate: _selectedEndDate,
+ firstDate: DateTime.parse(_selectedEndDate.toString()),
+ lastDate: DateTime.now().add(Duration(days: 30)))
+ .then((pickedDate) {
if (pickedDate == null) {
return;
}
@@ -126,25 +146,30 @@ class _EditGroupState extends State {
);
}
- Widget buildContainer(String point, DateTime date, TimeOfDay time, Function DatePicker, Function TimePicker) {
+ Widget buildContainer(String point, DateTime date, TimeOfDay time,
+ Function DatePicker, Function TimePicker) {
return Container(
margin: EdgeInsets.only(top: 20, left: 30, right: 30),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
- Text(date == null ? '$point Date' : '${DateFormat.yMd().format(date)}'),
+ Text(date == null
+ ? '$point Date'
+ : '${DateFormat.yMd().format(date)}'),
IconButton(
icon: Icon(
Icons.calendar_today,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
onPressed: () => DatePicker(),
),
- Text(time == null ? '$point Time' : '${time.toString().substring(10, 15)}'),
+ Text(time == null
+ ? '$point Time'
+ : '${time.toString().substring(10, 15)}'),
IconButton(
icon: Icon(
Icons.schedule,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
onPressed: () => TimePicker(),
),
@@ -155,16 +180,22 @@ class _EditGroupState extends State {
@override
void initState() {
- Firestore.instance.collection('group').document(groupUID).get().then((value) {
+ FirebaseFirestore.instance
+ .collection('group')
+ .doc(groupUID)
+ .get()
+ .then((value) {
setState(() {
- startTS = value.data['start'];
- endTS = value.data['end'];
- tempPrivacy = value.data['privacy'];
+ startTS = value.data()['start'];
+ endTS = value.data()['end'];
+ tempPrivacy = value.data()['privacy'];
_selectedStartDate = startTS.toDate();
_selectedEndDate = endTS.toDate();
- _selectedStartTime = TimeOfDay(hour: _selectedStartDate.hour, minute: _selectedStartDate.minute);
- _selectedEndTime = TimeOfDay(hour: _selectedEndDate.hour, minute: _selectedEndDate.minute);
- _maxPoolers = value.data['maxpoolers'];
+ _selectedStartTime = TimeOfDay(
+ hour: _selectedStartDate.hour, minute: _selectedStartDate.minute);
+ _selectedEndTime = TimeOfDay(
+ hour: _selectedEndDate.hour, minute: _selectedEndDate.minute);
+ _maxPoolers = value.data()['maxpoolers'];
});
if (tempPrivacy == 'true') {
privacy = true;
@@ -194,14 +225,21 @@ class _EditGroupState extends State {
child: Column(
children: [
buildLabel('Starting'),
- buildContainer('Start', _selectedStartDate, _selectedStartTime, _startDatePicker, _startTimePicker),
+ buildContainer(
+ 'Start',
+ _selectedStartDate,
+ _selectedStartTime,
+ _startDatePicker,
+ _startTimePicker),
buildLabel('Ending'),
- buildContainer('End', _selectedEndDate, _selectedEndTime, _endDatePicker, _endTimePicker),
+ buildContainer('End', _selectedEndDate, _selectedEndTime,
+ _endDatePicker, _endTimePicker),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
- padding: const EdgeInsets.only(top: 30.0, left: 40.0),
+ padding:
+ const EdgeInsets.only(top: 30.0, left: 40.0),
child: Text('Max No. of poolers:',
style: TextStyle(
fontSize: 20.0,
@@ -222,7 +260,9 @@ class _EditGroupState extends State {
child: Text(
dropDownIntItem.toString(),
style: TextStyle(
- color: Theme.of(context).accentColor,
+ color: Theme.of(context)
+ .colorScheme
+ .secondary,
),
),
);
@@ -252,8 +292,10 @@ class _EditGroupState extends State {
mainAxisAlignment: MainAxisAlignment.start,
children: [
Checkbox(
- checkColor: getVisibleColorOnAccentColor(context),
- activeColor: Theme.of(context).accentColor,
+ checkColor:
+ getVisibleColorOnAccentColor(context),
+ activeColor:
+ Theme.of(context).colorScheme.secondary,
value: privacy,
onChanged: (bool value) {
setState(() {
@@ -277,27 +319,44 @@ class _EditGroupState extends State {
),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
- primary: Theme.of(context).accentColor,
- textStyle: TextStyle(color: getVisibleColorOnAccentColor(context)),
+ primary: Theme.of(context).colorScheme.secondary,
+ textStyle: TextStyle(
+ color: getVisibleColorOnAccentColor(context)),
),
onPressed: () {
- var starting = DateTime(_selectedStartDate.year, _selectedStartDate.month, _selectedStartDate.day, _selectedStartTime.hour, _selectedStartTime.minute);
- var ending = DateTime(_selectedEndDate.year, _selectedEndDate.month, _selectedEndDate.day, _selectedEndTime.hour, _selectedEndTime.minute);
+ var starting = DateTime(
+ _selectedStartDate.year,
+ _selectedStartDate.month,
+ _selectedStartDate.day,
+ _selectedStartTime.hour,
+ _selectedStartTime.minute);
+ var ending = DateTime(
+ _selectedEndDate.year,
+ _selectedEndDate.month,
+ _selectedEndDate.day,
+ _selectedEndTime.hour,
+ _selectedEndTime.minute);
if (starting.compareTo(ending) < 0) {
_submitData();
} else {
- ScaffoldMessenger.of(context).hideCurrentSnackBar();
- ScaffoldMessenger.of(context).showSnackBar(SnackBar(
+ ScaffoldMessenger.of(context)
+ .hideCurrentSnackBar();
+ ScaffoldMessenger.of(context)
+ .showSnackBar(SnackBar(
backgroundColor: Theme.of(context).primaryColor,
duration: Duration(seconds: 2),
content: Text(
'INVALID : Start Time > End Time',
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary),
),
));
}
},
- child: Text('Update Trip', style: TextStyle(fontSize: 18)),
+ child: Text('Update Trip',
+ style: TextStyle(fontSize: 18)),
),
),
],
diff --git a/lib/screens/groupscreen/group.dart b/lib/screens/groupscreen/group.dart
index bfc3cc1..743efd5 100644
--- a/lib/screens/groupscreen/group.dart
+++ b/lib/screens/groupscreen/group.dart
@@ -21,7 +21,8 @@ class GroupPage extends StatefulWidget {
_GroupPageState createState() => _GroupPageState();
}
-class _GroupPageState extends State with AutomaticKeepAliveClientMixin {
+class _GroupPageState extends State
+ with AutomaticKeepAliveClientMixin {
final RequestService _request = RequestService();
final NotifServices _notifServices = NotifServices();
final GlobalKey scaffoldKey = GlobalKey();
@@ -44,8 +45,12 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
double userRating;
Future getMembers(String docid) async {
- var qp = await Firestore.instance.collection('group').document(docid).collection('users').getDocuments();
- return qp.documents;
+ var qp = await FirebaseFirestore.instance
+ .collection('group')
+ .doc(docid)
+ .collection('users')
+ .get();
+ return qp.docs;
}
bool buttonEnabled = true;
@@ -56,29 +61,38 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
@override
Widget build(BuildContext context) {
super.build(context);
- final currentuser = Provider.of(context);
+ final currentuser = Provider.of(context);
return StreamBuilder(
- stream: Firestore.instance.collection('userdetails').document(currentuser.uid).snapshots(),
+ stream: FirebaseFirestore.instance
+ .collection('userdetails')
+ .doc(currentuser.uid)
+ .snapshots(),
builder: (context, usersnapshot) {
if (usersnapshot.connectionState == ConnectionState.active) {
if (buttonEnabled == true) {
- groupUID = usersnapshot.data['currentGroup'];
+ groupUID = usersnapshot.data()['currentGroup'];
}
- if (usersnapshot.data['currentGroup'] == null) {
+ if (usersnapshot.data()['currentGroup'] == null) {
Navigator.pop(context);
}
return StreamBuilder(
- stream: Firestore.instance.collection('group').document(groupUID).snapshots(),
+ stream: FirebaseFirestore.instance
+ .collection('group')
+ .doc(groupUID)
+ .snapshots(),
builder: (context, groupsnapshot) {
if (groupsnapshot.connectionState == ConnectionState.active) {
if (buttonEnabled == true) {
- destination = groupsnapshot.data['destination'];
- start = DateFormat('dd.MM.yyyy - kk:mm a').format(groupsnapshot.data['start'].toDate());
- end = DateFormat('dd.MM.yyyy - kk:mm a').format(groupsnapshot.data['end'].toDate());
- grpOwner = groupsnapshot.data['owner'];
- presentNum = groupsnapshot.data['numberOfMembers'].toString();
- endTimeStamp = groupsnapshot.data['end'];
- maxPoolers = groupsnapshot.data['maxpoolers'];
+ destination = groupsnapshot.data()['destination'];
+ start = DateFormat('dd.MM.yyyy - kk:mm a')
+ .format(groupsnapshot.data()['start'].toDate());
+ end = DateFormat('dd.MM.yyyy - kk:mm a')
+ .format(groupsnapshot.data()['end'].toDate());
+ grpOwner = groupsnapshot.data()['owner'];
+ presentNum =
+ groupsnapshot.data()['numberOfMembers'].toString();
+ endTimeStamp = groupsnapshot.data()['end'];
+ maxPoolers = groupsnapshot.data()['maxpoolers'];
loading = false;
if (endTimeStamp.compareTo(Timestamp.now()) < 0) {
timestampFlag = true;
@@ -93,51 +107,107 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
buttonEnabled
? timestampFlag
? TextButton.icon(
- style: TextButton.styleFrom(textStyle: TextStyle(color: getVisibleColorOnPrimaryColor(context))),
- icon: Icon(FontAwesomeIcons.signOutAlt),
+ style: TextButton.styleFrom(
+ textStyle: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(
+ context))),
+ icon: Icon(
+ FontAwesomeIcons.signOutAlt),
onPressed: () async {
try {
await showDialog(
context: context,
- builder: (BuildContext ctx) {
+ builder:
+ (BuildContext ctx) {
return AlertDialog(
title: Text('End Trip'),
- content: Text('Are you sure you want to end this trip?'),
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
+ content: Text(
+ 'Are you sure you want to end this trip?'),
+ shape: RoundedRectangleBorder(
+ borderRadius:
+ BorderRadius
+ .circular(
+ 20.0)),
actions: [
TextButton(
- child: Text('End', style: TextStyle(color: Theme.of(context).accentColor)),
- onPressed: () async {
+ child: Text('End',
+ style: TextStyle(
+ color: Theme.of(
+ context)
+ .colorScheme
+ .secondary)),
+ onPressed:
+ () async {
ProgressDialog pr;
- pr = ProgressDialog(context, type: ProgressDialogType.Normal, isDismissible: false, showLogs: false);
+ pr = ProgressDialog(
+ context,
+ type: ProgressDialogType
+ .Normal,
+ isDismissible:
+ false,
+ showLogs:
+ false);
pr.style(
- message: 'Ending Trip...',
- backgroundColor: Theme.of(context).backgroundColor,
- messageTextStyle: TextStyle(
- color: getVisibleTextColorOnScaffold(context),
+ message:
+ 'Ending Trip...',
+ backgroundColor:
+ Theme.of(
+ context)
+ .backgroundColor,
+ messageTextStyle:
+ TextStyle(
+ color: getVisibleTextColorOnScaffold(
+ context),
),
);
await pr.show();
- await Future.delayed(Duration(seconds: 1));
+ await Future.delayed(
+ Duration(
+ seconds:
+ 1));
try {
- buttonEnabled = false;
- await _request.exitGroup();
- Navigator.pop(context);
+ buttonEnabled =
+ false;
+ await _request
+ .exitGroup();
+ Navigator.pop(
+ context);
await pr.hide();
} catch (e) {
await pr.hide();
- print(e.toString());
- String errStr = e.message ?? e.toString();
- final snackBar = SnackBar(content: Text(errStr), duration: Duration(seconds: 3));
- ScaffoldMessenger.of(context).showSnackBar(snackBar);
+ print(e
+ .toString());
+ String errStr =
+ e.message ??
+ e.toString();
+ final snackBar = SnackBar(
+ content: Text(
+ errStr),
+ duration: Duration(
+ seconds:
+ 3));
+ ScaffoldMessenger.of(
+ context)
+ .showSnackBar(
+ snackBar);
}
- Navigator.pop(context);
+ Navigator.pop(
+ context);
},
),
TextButton(
- child: Text('Cancel', style: TextStyle(color: Theme.of(context).accentColor)),
+ child: Text(
+ 'Cancel',
+ style: TextStyle(
+ color: Theme.of(
+ context)
+ .colorScheme
+ .secondary)),
onPressed: () {
- Navigator.of(context).pop();
+ Navigator.of(
+ context)
+ .pop();
},
),
],
@@ -150,52 +220,113 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
label: Text('End Trip'),
)
: TextButton.icon(
- style: TextButton.styleFrom(textStyle: TextStyle(color: getVisibleColorOnPrimaryColor(context))),
- icon: Icon(FontAwesomeIcons.signOutAlt),
+ style: TextButton.styleFrom(
+ textStyle: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(
+ context))),
+ icon: Icon(
+ FontAwesomeIcons.signOutAlt),
onPressed: () async {
try {
await showDialog(
context: context,
- builder: (BuildContext ctx) {
+ builder:
+ (BuildContext ctx) {
return AlertDialog(
- title: Text('Leave Group'),
- content: Text('Are you sure you want to leave this group?'),
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
+ title:
+ Text('Leave Group'),
+ content: Text(
+ 'Are you sure you want to leave this group?'),
+ shape: RoundedRectangleBorder(
+ borderRadius:
+ BorderRadius
+ .circular(
+ 20.0)),
actions: [
TextButton(
- child: Text('Leave', style: TextStyle(color: Theme.of(context).accentColor)),
- onPressed: () async {
+ child: Text('Leave',
+ style: TextStyle(
+ color: Theme.of(
+ context)
+ .colorScheme
+ .secondary)),
+ onPressed:
+ () async {
ProgressDialog pr;
- pr = ProgressDialog(context, type: ProgressDialogType.Normal, isDismissible: false, showLogs: false);
+ pr = ProgressDialog(
+ context,
+ type: ProgressDialogType
+ .Normal,
+ isDismissible:
+ false,
+ showLogs:
+ false);
pr.style(
- message: 'Leaving Group...',
- backgroundColor: Theme.of(context).backgroundColor,
- messageTextStyle: TextStyle(
- color: getVisibleTextColorOnScaffold(context),
+ message:
+ 'Leaving Group...',
+ backgroundColor:
+ Theme.of(
+ context)
+ .backgroundColor,
+ messageTextStyle:
+ TextStyle(
+ color: getVisibleTextColorOnScaffold(
+ context),
),
);
await pr.show();
- await Future.delayed(Duration(seconds: 1));
+ await Future.delayed(
+ Duration(
+ seconds:
+ 1));
try {
- buttonEnabled = false;
- await _notifServices.leftGroup(usersnapshot.data['name'], groupUID);
- await _request.exitGroup();
- Navigator.pop(context);
+ buttonEnabled =
+ false;
+ await _notifServices.leftGroup(
+ usersnapshot
+ .data()[
+ 'name'],
+ groupUID);
+ await _request
+ .exitGroup();
+ Navigator.pop(
+ context);
await pr.hide();
} catch (e) {
await pr.hide();
- print(e.toString());
- String errStr = e.message ?? e.toString();
- final snackBar = SnackBar(content: Text(errStr), duration: Duration(seconds: 3));
- ScaffoldMessenger.of(context).showSnackBar(snackBar);
+ print(e
+ .toString());
+ String errStr =
+ e.message ??
+ e.toString();
+ final snackBar = SnackBar(
+ content: Text(
+ errStr),
+ duration: Duration(
+ seconds:
+ 3));
+ ScaffoldMessenger.of(
+ context)
+ .showSnackBar(
+ snackBar);
}
- Navigator.pop(context);
+ Navigator.pop(
+ context);
},
),
TextButton(
- child: Text('Cancel', style: TextStyle(color: Theme.of(context).accentColor)),
+ child: Text(
+ 'Cancel',
+ style: TextStyle(
+ color: Theme.of(
+ context)
+ .colorScheme
+ .secondary)),
onPressed: () {
- Navigator.of(context).pop();
+ Navigator.of(
+ context)
+ .pop();
},
),
],
@@ -209,14 +340,24 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
)
: timestampFlag
? TextButton.icon(
- style: TextButton.styleFrom(textStyle: TextStyle(color: getVisibleColorOnPrimaryColor(context))),
- icon: Icon(FontAwesomeIcons.signOutAlt),
+ style: TextButton.styleFrom(
+ textStyle: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(
+ context))),
+ icon: Icon(
+ FontAwesomeIcons.signOutAlt),
onPressed: null,
label: Text('End Trip'),
)
: TextButton.icon(
- style: TextButton.styleFrom(textStyle: TextStyle(color: getVisibleColorOnPrimaryColor(context))),
- icon: Icon(FontAwesomeIcons.signOutAlt),
+ style: TextButton.styleFrom(
+ textStyle: TextStyle(
+ color:
+ getVisibleColorOnPrimaryColor(
+ context))),
+ icon: Icon(
+ FontAwesomeIcons.signOutAlt),
onPressed: null,
label: Text('Leave Group'),
)
@@ -228,7 +369,8 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
child: Column(
children: [
Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ mainAxisAlignment:
+ MainAxisAlignment.spaceBetween,
children: [
Flexible(
fit: FlexFit.tight,
@@ -238,21 +380,32 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
left: 20,
top: 20,
),
- child: destination == 'New Delhi Railway Station' || destination == 'Hazrat Nizamuddin Railway Station'
+ child: destination ==
+ 'New Delhi Railway Station' ||
+ destination ==
+ 'Hazrat Nizamuddin Railway Station'
? Icon(
Icons.train,
- color: getVisibleIconColorOnScaffold(context),
+ color:
+ getVisibleIconColorOnScaffold(
+ context),
size: 30,
)
- : destination == 'Indira Gandhi International Airport'
+ : destination ==
+ 'Indira Gandhi International Airport'
? Icon(
- Icons.airplanemode_active,
- color: getVisibleIconColorOnScaffold(context),
+ Icons
+ .airplanemode_active,
+ color:
+ getVisibleIconColorOnScaffold(
+ context),
size: 30,
)
: Icon(
Icons.directions_bus,
- color: getVisibleIconColorOnScaffold(context),
+ color:
+ getVisibleIconColorOnScaffold(
+ context),
size: 30,
)),
),
@@ -260,7 +413,8 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
fit: FlexFit.tight,
flex: 4,
child: Padding(
- padding: const EdgeInsets.only(top: 10.0),
+ padding: const EdgeInsets.only(
+ top: 10.0),
child: Text(
destination,
style: TextStyle(
@@ -279,22 +433,34 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
top: 10,
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.end,
+ mainAxisAlignment:
+ MainAxisAlignment.end,
children: [
- Text('Press here to edit the details: '),
+ Text(
+ 'Press here to edit the details: '),
TextButton.icon(
onPressed: () {
- Navigator.push(context, MaterialPageRoute(builder: (context) => EditGroup(groupUID: groupUID)));
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) =>
+ EditGroup(
+ groupUID:
+ groupUID)));
},
icon: Icon(
FontAwesomeIcons.pen,
size: 16.0,
- color: getVisibleTextColorOnScaffold(context),
+ color:
+ getVisibleTextColorOnScaffold(
+ context),
),
label: Text(
'Edit',
style: TextStyle(
- color: getVisibleTextColorOnScaffold(context),
+ color:
+ getVisibleTextColorOnScaffold(
+ context),
),
)),
],
@@ -305,11 +471,15 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
top: 10,
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
children: [
Text(
'*Contact group admin to edit details.',
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary),
),
],
),
@@ -320,7 +490,8 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
top: 10,
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
children: [
Text(
'Start : $start',
@@ -336,7 +507,8 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
bottom: 5,
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
children: [
Text(
'End: $end',
@@ -352,10 +524,11 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
bottom: 5,
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
children: [
Text(
- 'Number of members in group: ${presentNum}',
+ 'Number of members in group: $presentNum',
style: TextStyle(
fontSize: 15,
),
@@ -368,10 +541,11 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
bottom: 5,
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
children: [
Text(
- 'Max number of poolers: ${maxPoolers}',
+ 'Max number of poolers: $maxPoolers',
style: TextStyle(
fontSize: 15,
),
@@ -381,20 +555,33 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
),
Container(
child: StreamBuilder(
- stream: Firestore.instance.collection('group').document(groupUID).collection('users').snapshots(),
+ stream: FirebaseFirestore.instance
+ .collection('group')
+ .doc(groupUID)
+ .collection('users')
+ .snapshots(),
builder: (_, snapshots) {
if (!snapshots.hasData) {
return Center(
- child: CircularProgressIndicator(),
+ child:
+ CircularProgressIndicator(),
);
}
return ListView.builder(
shrinkWrap: true,
- itemCount: snapshots.data == null ? 0 : snapshots.data.documents.length,
+ itemCount: snapshots.data == null
+ ? 0
+ : snapshots.data.docs.length,
itemBuilder: (ctx, index) {
- var cancelledRides = snapshots.data.documents[index].data['cancelledrides'];
- var totalRides = snapshots.data.documents[index].data['totalrides'];
- userRating = 5 - (0.2 * cancelledRides) + (0.35 * totalRides);
+ var cancelledRides = snapshots
+ .data.docs[index]
+ .data()['cancelledrides'];
+ var totalRides = snapshots
+ .data.docs[index]
+ .data()['totalrides'];
+ userRating = 5 -
+ (0.2 * cancelledRides) +
+ (0.35 * totalRides);
if (userRating < 0) {
userRating = 0;
}
@@ -402,81 +589,154 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
userRating = 5;
}
return Card(
- color: Theme.of(context).scaffoldBackgroundColor,
+ color: Theme.of(context)
+ .scaffoldBackgroundColor,
child: ListTile(
- title: Text(snapshots.data.documents[index].data['name']),
+ title: Text(snapshots
+ .data.docs[index]
+ .data()['name']),
subtitle: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
+ crossAxisAlignment:
+ CrossAxisAlignment
+ .start,
children: [
- Text('Hostel: ${snapshots.data.documents[index].data['hostel']}'),
+ Text(
+ 'Hostel: ${snapshots.data.docs[index].data()['hostel']}'),
GestureDetector(
onTap: () async {
try {
- if (Platform.isIOS) {
- await Clipboard.setData(ClipboardData(text: '${snapshots.data.documents[index].data['mobilenum']}')).then((result) {
- final snackBar = SnackBar(
- backgroundColor: Theme.of(context).primaryColor,
- content: Text(
+ if (Platform
+ .isIOS) {
+ await Clipboard.setData(
+ ClipboardData(
+ text:
+ '${snapshots.data.docs[index].data()['mobilenum']}'))
+ .then(
+ (result) {
+ final snackBar =
+ SnackBar(
+ backgroundColor:
+ Theme.of(context)
+ .primaryColor,
+ content:
+ Text(
'Copied to Clipboard',
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary),
),
- duration: Duration(seconds: 1),
+ duration: Duration(
+ seconds:
+ 1),
);
- ScaffoldMessenger.of(context).hideCurrentSnackBar();
- ScaffoldMessenger.of(context).showSnackBar(snackBar);
+ ScaffoldMessenger.of(
+ context)
+ .hideCurrentSnackBar();
+ ScaffoldMessenger.of(
+ context)
+ .showSnackBar(
+ snackBar);
});
} else {
- await launch('tel://${snapshots.data.documents[index].data['mobilenum']}');
+ await launch(
+ 'tel://${snapshots.data.docs[index].data()['mobilenum']}');
}
} catch (e) {
- await Clipboard.setData(ClipboardData(text: '${snapshots.data.documents[index].data['mobilenum']}')).then((result) {
- final snackBar = SnackBar(
- backgroundColor: Theme.of(context).primaryColor,
+ await Clipboard.setData(
+ ClipboardData(
+ text:
+ '${snapshots.data.docs[index].data()['mobilenum']}'))
+ .then(
+ (result) {
+ final snackBar =
+ SnackBar(
+ backgroundColor:
+ Theme.of(
+ context)
+ .primaryColor,
content: Text(
'Copied to Clipboard',
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(
+ color: Theme.of(context)
+ .colorScheme
+ .secondary),
),
- duration: Duration(seconds: 1),
+ duration:
+ Duration(
+ seconds:
+ 1),
);
- ScaffoldMessenger.of(context).hideCurrentSnackBar();
- ScaffoldMessenger.of(context).showSnackBar(snackBar);
+ ScaffoldMessenger.of(
+ context)
+ .hideCurrentSnackBar();
+ ScaffoldMessenger.of(
+ context)
+ .showSnackBar(
+ snackBar);
});
}
},
- child: Text('Mobile Number: ${snapshots.data.documents[index].data['mobilenum']}')),
+ child: Text(
+ 'Mobile Number: ${snapshots.data.docs[index].data()['mobilenum']}')),
Row(
children: [
Text('User Rating:'),
Row(
- children: [],
+ children: <
+ Widget>[],
),
- showRating(userRating),
+ showRating(
+ userRating),
],
)
],
),
- trailing: grpOwner == snapshots.data.documents[index].documentID
+ trailing: grpOwner ==
+ snapshots.data
+ .docs[index].id
? FaIcon(
- FontAwesomeIcons.crown,
- color: getVisibleIconColorOnScaffold(context),
+ FontAwesomeIcons
+ .crown,
+ color:
+ getVisibleIconColorOnScaffold(
+ context),
)
- : grpOwner == currentuser.uid && !timestampFlag
+ : grpOwner ==
+ currentuser
+ .uid &&
+ !timestampFlag
? IconButton(
- icon: Icon(Icons.exit_to_app),
- color: getVisibleIconColorOnScaffold(context),
- tooltip: 'Kick User',
- onPressed: () async {
+ icon: Icon(Icons
+ .exit_to_app),
+ color:
+ getVisibleIconColorOnScaffold(
+ context),
+ tooltip:
+ 'Kick User',
+ onPressed:
+ () async {
await showDialog(
- context: context,
- builder: (BuildContext ctx) {
+ context:
+ context,
+ builder:
+ (BuildContext
+ ctx) {
return AlertDialog(
- title: Text('Kick User'),
- content: Text('Are you sure you want to kick this user?'),
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
- actions: [
+ title: Text(
+ 'Kick User'),
+ content:
+ Text('Are you sure you want to kick this user?'),
+ shape: RoundedRectangleBorder(
+ borderRadius:
+ BorderRadius.circular(20.0)),
+ actions: <
+ Widget>[
TextButton(
- child: Text('Kick', style: TextStyle(color: Theme.of(context).accentColor)),
- onPressed: () async {
+ child:
+ Text('Kick', style: TextStyle(color: Theme.of(context).colorScheme.secondary)),
+ onPressed:
+ () async {
Navigator.pop(context);
ProgressDialog pr;
pr = ProgressDialog(context, type: ProgressDialogType.Normal, isDismissible: false, showLogs: false);
@@ -489,7 +749,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
);
await pr.show();
try {
- await _request.kickUser(groupUID, snapshots.data.documents[index].documentID);
+ await _request.kickUser(groupUID, snapshots.data.docs[index].id);
await pr.hide();
} catch (e) {
await pr.hide();
@@ -498,8 +758,10 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
},
),
TextButton(
- child: Text('Cancel', style: TextStyle(color: Theme.of(context).accentColor)),
- onPressed: () {
+ child:
+ Text('Cancel', style: TextStyle(color: Theme.of(context).colorScheme.secondary)),
+ onPressed:
+ () {
Navigator.of(context).pop();
},
),
@@ -524,7 +786,11 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
),
floatingActionButton: FloatingActionButton(
onPressed: () {
- Navigator.push(context, MaterialPageRoute(builder: (context) => ChatScreen(groupUID)));
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) =>
+ ChatScreen(groupUID)));
},
child: Stack(
alignment: Alignment(-10, -10),
@@ -539,7 +805,8 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
),
);
} else {
- return Container(child: Center(child: CircularProgressIndicator()));
+ return Container(
+ child: Center(child: CircularProgressIndicator()));
}
});
} else {
diff --git a/lib/screens/notifications/services/database.dart b/lib/screens/notifications/services/database.dart
index 43b9e0a..6d3626d 100644
--- a/lib/screens/notifications/services/database.dart
+++ b/lib/screens/notifications/services/database.dart
@@ -3,24 +3,27 @@ import 'package:firebase_auth/firebase_auth.dart';
class NotificationDatabase {
final _auth = FirebaseAuth.instance;
- final CollectionReference groupdetails = Firestore.instance.collection('group');
- final CollectionReference userDetails = Firestore.instance.collection('userdetails');
- final CollectionReference chatLists = Firestore.instance.collection('chatroom');
+ final CollectionReference