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
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
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 4c2a5d5..1ce92e9 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,4 +1,4 @@
include: package:pedantic/analysis_options.yaml
analyzer:
errors:
- # omit_local_variable_types: ignore
+ omit_local_variable_types: ignore
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..9a9c64f 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -78,7 +78,6 @@
F523DB7D5FBDE13AA19376B1 /* Pods-Runner.release.xcconfig */,
2596A5A1C733469C49985A17 /* Pods-Runner.profile.xcconfig */,
);
- name = Pods;
path = Pods;
sourceTree = "";
};
@@ -167,7 +166,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1020;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -230,9 +229,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 +347,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -351,7 +386,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 = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -373,6 +408,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
@@ -388,7 +424,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -434,7 +469,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 = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -444,7 +479,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -484,7 +518,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 = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -507,6 +541,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
@@ -534,6 +569,7 @@
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
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/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
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 @@
Colors.green;
Color sendMessageIcon(BuildContext context) => Colors.green;
@@ -59,7 +63,7 @@ Color getVisibleColorOnPrimaryColor(BuildContext context) {
}
Color getVisibleColorOnAccentColor(BuildContext context) {
- var color = Theme.of(context).accentColor;
+ var color = Theme.of(context).colorScheme.secondary;
var list = [Colors.tealAccent, Colors.cyanAccent, Colors.yellowAccent, Colors.greenAccent];
if (list.contains(color)) {
return Colors.black;
@@ -68,7 +72,7 @@ Color getVisibleColorOnAccentColor(BuildContext context) {
}
Color getVisibleTextColorOnScaffold(BuildContext context) {
- var color = Theme.of(context).accentColor;
+ var color = Theme.of(context).colorScheme.secondary;
var theme;
if (Theme.of(context).brightness == Brightness.dark) {
theme = 'dark';
@@ -84,7 +88,7 @@ Color getVisibleTextColorOnScaffold(BuildContext context) {
}
Color getVisibleIconColorOnScaffold(BuildContext context) {
- var color = Theme.of(context).accentColor;
+ var color = Theme.of(context).colorScheme.secondary;
var theme;
if (Theme.of(context).brightness == Brightness.dark) {
theme = 'dark';
@@ -137,15 +141,18 @@ class ThemeNotifier with ChangeNotifier {
}
}
-void main() {
+Future main() async {
WidgetsFlutterBinding.ensureInitialized();
- SharedPreferences.getInstance().then((prefs) {
+ await Firebase.initializeApp(
+ options: DefaultFirebaseOptions.currentPlatform,
+ );
+ await SharedPreferences.getInstance().then((prefs) {
if (prefs.getBool('darkMode') == null || prefs.getString('accentColor') == null) {
prefs.setBool('darkMode', true);
prefs.setString('accentColor', 'Blue');
}
});
- SharedPreferences.getInstance().then((prefs) {
+ await SharedPreferences.getInstance().then((prefs) {
var darkModeOn = prefs.getBool('darkMode') ?? true;
var _theme = prefs.getString('theme') ?? 'system';
var chosenAccentColor = prefs.getString('accentColor') ?? 'Blue';
@@ -232,7 +239,8 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final themeNotifier = Provider.of(context);
- return StreamProvider.value(
+ return StreamProvider.value(
+ initialData: FirebaseAuth.instance.currentUser,
value: AuthService().user,
child: MaterialApp(
initialRoute: '/wrapper',
@@ -249,8 +257,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 +272,23 @@ 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),
+ 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 +296,6 @@ 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/models/requestdetails.dart b/lib/models/requestdetails.dart
index 22c4672..7d959ea 100644
--- a/lib/models/requestdetails.dart
+++ b/lib/models/requestdetails.dart
@@ -1,4 +1,3 @@
-import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
class RequestDetails {
diff --git a/lib/screens/authenticate/change_email.dart b/lib/screens/authenticate/change_email.dart
index f15a564..b7c0394 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,7 @@ 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 +68,7 @@ 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',
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..74dcc6a 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;
@@ -96,7 +96,7 @@ class _VerificationCheckState extends State {
SizedBox(height: 30.0),
RichText(
text: TextSpan(
- text: 'The registered email id is: ${email}',
+ text: 'The registered email id is: $email',
style: TextStyle(fontSize: 17.0, color: getBorderColorForInputFields(context), fontWeight: FontWeight.w700),
),
),
@@ -108,7 +108,7 @@ 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',
@@ -128,7 +128,7 @@ 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',
diff --git a/lib/screens/chatscreen/chat_database/database.dart b/lib/screens/chatscreen/chat_database/database.dart
index b4bd679..7e60534 100644
--- a/lib/screens/chatscreen/chat_database/database.dart
+++ b/lib/screens/chatscreen/chat_database/database.dart
@@ -4,39 +4,39 @@ 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({
+ 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..28b4cfa 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,8 @@ 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;
+ fbm.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..ad07406 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),
@@ -47,13 +48,13 @@ class MessageBubble extends StatelessWidget {
username,
style: TextStyle(
fontWeight: FontWeight.bold,
- color: isMe ? Colors.black : Theme.of(context).accentTextTheme.subtitle1.color,
+ color: isMe ? Colors.black : Theme.of(context).textTheme.subtitle1.color,
),
),
Text(
message,
style: TextStyle(
- color: isMe ? Colors.black : Theme.of(context).accentTextTheme.subtitle1.color,
+ color: isMe ? Colors.black : Theme.of(context).textTheme.subtitle1.color,
),
textAlign: TextAlign.start,
),
@@ -68,7 +69,7 @@ class MessageBubble extends StatelessWidget {
Text(
time,
style: TextStyle(
- color: isMe ? Colors.black : Theme.of(context).accentTextTheme.subtitle1.color,
+ color: isMe ? Colors.black : Theme.of(context).textTheme.subtitle1.color,
fontSize: 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..3fe5003 100644
--- a/lib/screens/chatscreen/chat_widgets/chat_users_list.dart
+++ b/lib/screens/chatscreen/chat_widgets/chat_users_list.dart
@@ -5,15 +5,15 @@ 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 +21,11 @@ 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..5e7226a 100644
--- a/lib/screens/chatscreen/chat_widgets/message.dart
+++ b/lib/screens/chatscreen/chat_widgets/message.dart
@@ -11,50 +11,40 @@ 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..c591845 100644
--- a/lib/screens/chatscreen/chat_widgets/new_message.dart
+++ b/lib/screens/chatscreen/chat_widgets/new_message.dart
@@ -18,12 +18,12 @@ 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 +56,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..b08f8bd 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 settings;
import 'package:shareacab/screens/tripslist.dart';
import 'package:shareacab/services/auth.dart';
@@ -53,7 +53,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,7 +72,7 @@ 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(
@@ -101,14 +101,14 @@ class _DashboardState extends State with AutomaticKeepAliveClientMixi
tooltip: 'Settings',
onPressed: () {
return Navigator.push(context, MaterialPageRoute(builder: (context) {
- return Settings(_auth);
+ return settings.Settings(_auth);
}));
}),
],
),
resizeToAvoidBottomInset: false,
body: StreamBuilder(
- stream: Firestore.instance.collection('userdetails').document(currentuser.uid).snapshots(),
+ stream: FirebaseFirestore.instance.collection('userdetails').doc(currentuser.uid).snapshots(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
if (snapshot.connectionState == ConnectionState.active) {
var temp = snapshot.data['currentGroup'];
diff --git a/lib/screens/edituserdetails.dart b/lib/screens/edituserdetails.dart
index 49cef96..515ac2e 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) {
@@ -102,7 +102,7 @@ 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))),
+ 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,7 +111,7 @@ 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))),
+ 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],
@@ -121,7 +121,7 @@ class _EditFormState 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 ?? snapshot.data['hostel'],
onTap: () => FocusScope.of(context).requestFocus(FocusNode()),
onChanged: (newValue) {
@@ -132,15 +132,15 @@ class _EditFormState 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 ?? snapshot.data['sex'],
onTap: () => FocusScope.of(context).requestFocus(FocusNode()),
onChanged: (newValue) {
@@ -151,8 +151,8 @@ class _EditFormState 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,
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..a7f3bdd 100644
--- a/lib/screens/groupdetailscreen/ended_group_details.dart
+++ b/lib/screens/groupdetailscreen/ended_group_details.dart
@@ -29,8 +29,8 @@ 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;
@@ -78,7 +78,7 @@ class _EndedGroupDetailsState extends State {
Hero(
tag: widget.docId,
child: Card(
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(25.0))),
elevation: 5,
margin: EdgeInsets.symmetric(vertical: 6, horizontal: 5),
@@ -99,12 +99,12 @@ class _EndedGroupDetailsState extends State {
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,
)),
),
@@ -179,11 +179,11 @@ class _EndedGroupDetailsState extends State {
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,7 +191,7 @@ 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,
content: Text(
@@ -204,10 +204,10 @@ class _EndedGroupDetailsState extends State {
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,
content: Text(
@@ -223,7 +223,7 @@ class _EndedGroupDetailsState extends State {
},
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..d83f189 100644
--- a/lib/screens/groupdetailscreen/groupdetails.dart
+++ b/lib/screens/groupdetailscreen/groupdetails.dart
@@ -38,7 +38,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
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 +65,29 @@ 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 {
@@ -119,7 +119,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
Hero(
tag: widget.docId,
child: Card(
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(25.0))),
elevation: 5,
margin: EdgeInsets.symmetric(vertical: 6, horizontal: 5),
@@ -140,12 +140,12 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
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,
)),
),
@@ -158,7 +158,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
child: Row(
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))),
],
),
),
@@ -170,7 +170,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
- 'End : ${end}',
+ 'End : $end',
style: TextStyle(fontSize: 15, color: getVisibleColorOnAccentColor(context)),
),
],
@@ -185,7 +185,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
children: [
Text(
'Number of members in group: '
- '${presentNum}',
+ '$presentNum',
style: TextStyle(color: getVisibleColorOnAccentColor(context)),
)
],
@@ -200,7 +200,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
children: [
Text(
'Max Number of members: '
- '${max}',
+ '$max',
style: TextStyle(color: getVisibleColorOnAccentColor(context)),
)
],
@@ -216,7 +216,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
margin: EdgeInsets.only(top: 60),
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) {
return Column(
@@ -227,7 +227,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
}
return ListView.builder(
physics: NeverScrollableScrollPhysics(),
- itemCount: futureSnapshot.data.documents.length,
+ itemCount: futureSnapshot.data.docs.length,
itemBuilder: (ctx, index) {
return Container(
margin: EdgeInsets.symmetric(vertical: 2, horizontal: 10),
@@ -239,11 +239,11 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
children: [
Padding(
padding: const EdgeInsets.all(8.0),
- child: Text(futureSnapshot.data.documents[index].data['name']),
+ child: Text(futureSnapshot.data.docs[index].data()['name']),
),
Padding(
padding: const EdgeInsets.all(8.0),
- child: Text(futureSnapshot.data.documents[index].data['hostel']),
+ child: Text(futureSnapshot.data.docs[index].data()['hostel']),
),
Padding(
padding: const EdgeInsets.all(8.0),
@@ -251,7 +251,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
onPressed: () async {
try {
if (Platform.isIOS) {
- await Clipboard.setData(ClipboardData(text: '${futureSnapshot.data.documents[index].data['mobilenum'].toString()}')).then((result) {
+ await Clipboard.setData(ClipboardData(text: '${futureSnapshot.data.docs[index].data()['mobilenum'].toString()}')).then((result) {
final snackBar = SnackBar(
backgroundColor: Theme.of(context).primaryColor,
content: Text(
@@ -264,10 +264,10 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
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) {
+ await Clipboard.setData(ClipboardData(text: '${futureSnapshot.data.docs[index].data()['mobilenum'].toString()}')).then((result) {
final snackBar = SnackBar(
backgroundColor: Theme.of(context).primaryColor,
content: Text(
@@ -283,7 +283,7 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
},
icon: Icon(
Icons.phone,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
)),
),
],
@@ -322,20 +322,20 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
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.style(
message: 'Requesting...',
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));
try {
await _notifServices.createRequest(widget.docId);
- await Navigator.of(context).pop();
+ Navigator.of(context).pop();
await pr.hide();
} catch (e) {
await pr.hide();
@@ -344,7 +344,7 @@ 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();
},
@@ -361,21 +361,21 @@ class _GroupDetailsState extends State with AutomaticKeepAliveClie
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.style(
message: 'Joining Group...',
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));
try {
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 +395,7 @@ 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();
},
diff --git a/lib/screens/groupscreen/editgroup.dart b/lib/screens/groupscreen/editgroup.dart
index cf437f3..1ffc4df 100644
--- a/lib/screens/groupscreen/editgroup.dart
+++ b/lib/screens/groupscreen/editgroup.dart
@@ -136,7 +136,7 @@ class _EditGroupState extends State {
IconButton(
icon: Icon(
Icons.calendar_today,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
onPressed: () => DatePicker(),
),
@@ -144,7 +144,7 @@ class _EditGroupState extends State {
IconButton(
icon: Icon(
Icons.schedule,
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
onPressed: () => TimePicker(),
),
@@ -155,16 +155,16 @@ 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'];
+ _maxPoolers = value.data()['maxpoolers'];
});
if (tempPrivacy == 'true') {
privacy = true;
@@ -222,7 +222,7 @@ class _EditGroupState extends State {
child: Text(
dropDownIntItem.toString(),
style: TextStyle(
- color: Theme.of(context).accentColor,
+ color: Theme.of(context).colorScheme.secondary,
),
),
);
@@ -253,7 +253,7 @@ class _EditGroupState extends State {
children: [
Checkbox(
checkColor: getVisibleColorOnAccentColor(context),
- activeColor: Theme.of(context).accentColor,
+ activeColor: Theme.of(context).colorScheme.secondary,
value: privacy,
onChanged: (bool value) {
setState(() {
@@ -277,7 +277,7 @@ class _EditGroupState extends State {
),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
- primary: Theme.of(context).accentColor,
+ primary: Theme.of(context).colorScheme.secondary,
textStyle: TextStyle(color: getVisibleColorOnAccentColor(context)),
),
onPressed: () {
@@ -292,7 +292,7 @@ class _EditGroupState 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),
),
));
}
diff --git a/lib/screens/groupscreen/group.dart b/lib/screens/groupscreen/group.dart
index bfc3cc1..e0091aa 100644
--- a/lib/screens/groupscreen/group.dart
+++ b/lib/screens/groupscreen/group.dart
@@ -44,8 +44,8 @@ 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 +56,29 @@ 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;
@@ -106,7 +106,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
actions: [
TextButton(
- child: Text('End', style: TextStyle(color: Theme.of(context).accentColor)),
+ 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);
@@ -135,7 +135,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
},
),
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();
},
@@ -163,7 +163,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
actions: [
TextButton(
- child: Text('Leave', style: TextStyle(color: Theme.of(context).accentColor)),
+ 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);
@@ -178,7 +178,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
await Future.delayed(Duration(seconds: 1));
try {
buttonEnabled = false;
- await _notifServices.leftGroup(usersnapshot.data['name'], groupUID);
+ await _notifServices.leftGroup(usersnapshot.data()['name'], groupUID);
await _request.exitGroup();
Navigator.pop(context);
await pr.hide();
@@ -193,7 +193,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
},
),
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();
},
@@ -309,7 +309,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
children: [
Text(
'*Contact group admin to edit details.',
- style: TextStyle(color: Theme.of(context).accentColor),
+ style: TextStyle(color: Theme.of(context).colorScheme.secondary),
),
],
),
@@ -355,7 +355,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
- 'Number of members in group: ${presentNum}',
+ 'Number of members in group: $presentNum',
style: TextStyle(
fontSize: 15,
),
@@ -371,7 +371,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
- 'Max number of poolers: ${maxPoolers}',
+ 'Max number of poolers: $maxPoolers',
style: TextStyle(
fontSize: 15,
),
@@ -381,7 +381,7 @@ 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(
@@ -390,10 +390,10 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
}
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'];
+ 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;
@@ -404,21 +404,21 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
return Card(
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,
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) {
+ 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),
);
@@ -426,15 +426,15 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
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) {
+ 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),
);
@@ -443,7 +443,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
});
}
},
- 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:'),
@@ -455,7 +455,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
)
],
),
- trailing: grpOwner == snapshots.data.documents[index].documentID
+ trailing: grpOwner == snapshots.data.docs[index].id
? FaIcon(
FontAwesomeIcons.crown,
color: getVisibleIconColorOnScaffold(context),
@@ -475,7 +475,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
actions: [
TextButton(
- child: Text('Kick', style: TextStyle(color: Theme.of(context).accentColor)),
+ child: Text('Kick', style: TextStyle(color: Theme.of(context).colorScheme.secondary)),
onPressed: () async {
Navigator.pop(context);
ProgressDialog pr;
@@ -489,7 +489,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,7 +498,7 @@ class _GroupPageState extends State with AutomaticKeepAliveClientMixi
},
),
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();
},
diff --git a/lib/screens/notifications/services/database.dart b/lib/screens/notifications/services/database.dart
index 43b9e0a..cba6a20 100644
--- a/lib/screens/notifications/services/database.dart
+++ b/lib/screens/notifications/services/database.dart
@@ -3,24 +3,24 @@ 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