From 889bba79dbb7a4179045eeb57ca1be35c7efb4fc Mon Sep 17 00:00:00 2001 From: Harishankar Kumar Date: Fri, 26 Aug 2022 17:06:18 +0530 Subject: [PATCH] a --- android/app/build.gradle | 2 +- lib/firebase/booking_db.dart | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index d5ab317..bce78ea 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -48,7 +48,7 @@ android { applicationId "com.shark.mera_aadhar" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 19 + minSdkVersion 20 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/lib/firebase/booking_db.dart b/lib/firebase/booking_db.dart index 3f57710..7e6ee75 100644 --- a/lib/firebase/booking_db.dart +++ b/lib/firebase/booking_db.dart @@ -7,7 +7,11 @@ class BookingDB { CollectionReference _collectionRef = FirebaseFirestore.instance.collection('bookings'); - Future addNewBooking(Booking booking) { + Future addNewBooking(Booking booking) async { + Booking? bookin = await getMyCurrentBooking(); + if(booking != null){ + print("already open request"); + } return _collectionRef .add(booking.toJson()) .then((value) => print("Booking entry added"))