diff --git a/.vscode/settings.json b/.vscode/settings.json
index 0dc3292..0968b6b 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -26,5 +26,6 @@
"username": "balcetus",
"password": "groundhogDay.12"
}
- ]
+ ],
+ "java.configuration.updateBuildConfiguration": "interactive"
}
\ No newline at end of file
diff --git a/android/app/build.gradle b/android/app/build.gradle
index d66a4a1..3990469 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -47,10 +47,11 @@ android {
applicationId "com.example.aub_pickusup"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
- minSdkVersion flutter.minSdkVersion
+ minSdkVersion 20
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
+ multiDexEnabled true
}
buildTypes {
@@ -68,4 +69,6 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation 'com.android.support:multidex:1.0.3'
}
+apply plugin: 'com.google.gms.google-services'
diff --git a/android/app/google-services.json b/android/app/google-services.json
new file mode 100644
index 0000000..2e33711
--- /dev/null
+++ b/android/app/google-services.json
@@ -0,0 +1,83 @@
+{
+ "project_info": {
+ "project_number": "645186470981",
+ "firebase_url": "https://aub-pickusup-default-rtdb.europe-west1.firebasedatabase.app",
+ "project_id": "aub-pickusup",
+ "storage_bucket": "aub-pickusup.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:645186470981:android:672ca2019135789bf38f2c",
+ "android_client_info": {
+ "package_name": "com.DMR.aubpickusup"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "645186470981-7pj4ap9n7vd34u74euocvl1i2a7qrjrt.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDQCy6x3z38KV22yUztkQVZ8ppy53Ihkxg"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "645186470981-7pj4ap9n7vd34u74euocvl1i2a7qrjrt.apps.googleusercontent.com",
+ "client_type": 3
+ },
+ {
+ "client_id": "645186470981-5nofdlrotprplr9h8qdkdrfuo36i85k8.apps.googleusercontent.com",
+ "client_type": 2,
+ "ios_info": {
+ "bundle_id": "com.example.aubPickusup"
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:645186470981:android:1ea20d28e4e3d7f6f38f2c",
+ "android_client_info": {
+ "package_name": "com.example.aub_pickusup"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "645186470981-7pj4ap9n7vd34u74euocvl1i2a7qrjrt.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDQCy6x3z38KV22yUztkQVZ8ppy53Ihkxg"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "645186470981-7pj4ap9n7vd34u74euocvl1i2a7qrjrt.apps.googleusercontent.com",
+ "client_type": 3
+ },
+ {
+ "client_id": "645186470981-5nofdlrotprplr9h8qdkdrfuo36i85k8.apps.googleusercontent.com",
+ "client_type": 2,
+ "ios_info": {
+ "bundle_id": "com.example.aubPickusup"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index c373d61..8b42ea9 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,10 @@
+
+
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
index 58a8c74..d1adb74 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -6,6 +6,7 @@ buildscript {
}
dependencies {
+ classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
diff --git a/image/carpool-vector.jpg b/image/carpool-vector.jpg
new file mode 100644
index 0000000..bc65ce0
Binary files /dev/null and b/image/carpool-vector.jpg differ
diff --git a/image/carpool.png b/image/carpool.png
new file mode 100644
index 0000000..9d32a50
Binary files /dev/null and b/image/carpool.png differ
diff --git a/image/choose-driver.gif b/image/choose-driver.gif
new file mode 100644
index 0000000..015e5d7
Binary files /dev/null and b/image/choose-driver.gif differ
diff --git a/image/choose-user.gif b/image/choose-user.gif
new file mode 100644
index 0000000..dfe575d
Binary files /dev/null and b/image/choose-user.gif differ
diff --git a/image/download.png b/image/download.png
new file mode 100644
index 0000000..002b57e
Binary files /dev/null and b/image/download.png differ
diff --git a/image/download1.png b/image/download1.png
new file mode 100644
index 0000000..093a406
Binary files /dev/null and b/image/download1.png differ
diff --git a/image/images (1).jpg b/image/images (1).jpg
new file mode 100644
index 0000000..d6f7766
Binary files /dev/null and b/image/images (1).jpg differ
diff --git a/image/images.jpg b/image/images.jpg
new file mode 100644
index 0000000..05bd0ba
Binary files /dev/null and b/image/images.jpg differ
diff --git a/image/logo.png b/image/logo.png
new file mode 100644
index 0000000..623818a
Binary files /dev/null and b/image/logo.png differ
diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist
new file mode 100644
index 0000000..9297f72
--- /dev/null
+++ b/ios/Runner/GoogleService-Info.plist
@@ -0,0 +1,36 @@
+
+
+
+
+ CLIENT_ID
+ 645186470981-5nofdlrotprplr9h8qdkdrfuo36i85k8.apps.googleusercontent.com
+ REVERSED_CLIENT_ID
+ com.googleusercontent.apps.645186470981-5nofdlrotprplr9h8qdkdrfuo36i85k8
+ API_KEY
+ AIzaSyDy8mrAwG7VUqB25mVQLC1zx2n1OnXIblQ
+ GCM_SENDER_ID
+ 645186470981
+ PLIST_VERSION
+ 1
+ BUNDLE_ID
+ com.example.aubPickusup
+ PROJECT_ID
+ aub-pickusup
+ STORAGE_BUCKET
+ aub-pickusup.appspot.com
+ IS_ADS_ENABLED
+
+ IS_ANALYTICS_ENABLED
+
+ IS_APPINVITE_ENABLED
+
+ IS_GCM_ENABLED
+
+ IS_SIGNIN_ENABLED
+
+ GOOGLE_APP_ID
+ 1:645186470981:ios:e94ab63e3fb48bbff38f2c
+ DATABASE_URL
+ https://aub-pickusup-default-rtdb.europe-west1.firebasedatabase.app
+
+
\ No newline at end of file
diff --git a/ios/firebase_app_id_file.json b/ios/firebase_app_id_file.json
new file mode 100644
index 0000000..fd75c84
--- /dev/null
+++ b/ios/firebase_app_id_file.json
@@ -0,0 +1,7 @@
+{
+ "file_generated_by": "FlutterFire CLI",
+ "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
+ "GOOGLE_APP_ID": "1:645186470981:ios:e94ab63e3fb48bbff38f2c",
+ "FIREBASE_PROJECT_ID": "aub-pickusup",
+ "GCM_SENDER_ID": "645186470981"
+}
\ No newline at end of file
diff --git a/lib/components/my_textfield.dart b/lib/components/my_textfield.dart
deleted file mode 100644
index 4c401bf..0000000
--- a/lib/components/my_textfield.dart
+++ /dev/null
@@ -1,41 +0,0 @@
-import 'package:flutter/material.dart';
-
-class MyTextField extends StatelessWidget {
- final String labelText;
- final bool obscureText;
- final IconData? specIcon;
- final controller;
-
- const MyTextField(
- {super.key,
- required this.obscureText,
- required this.specIcon,
- required this.controller,
- required this.labelText});
-
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.fromLTRB(70, 0, 70, 0),
- child: TextFormField(
- controller: controller,
- obscureText: obscureText,
- decoration: InputDecoration(
- enabledBorder: const OutlineInputBorder(
- borderRadius: BorderRadius.all(Radius.circular(8)),
- ),
- focusedBorder: OutlineInputBorder(
- borderRadius: const BorderRadius.all(Radius.circular(25)),
- borderSide: BorderSide(color: Colors.orange.shade200),
- ),
- labelText: labelText,
- fillColor: Colors.grey[900],
- filled: true,
- labelStyle: TextStyle(color: Colors.orange[200]),
- prefixIcon: Icon(specIcon, color: Colors.white, size: 22),
- ),
- style: const TextStyle(color: Colors.white),
- ),
- );
- }
-}
diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart
new file mode 100644
index 0000000..efbc583
--- /dev/null
+++ b/lib/firebase_options.dart
@@ -0,0 +1,87 @@
+// File generated by FlutterFire CLI.
+// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
+import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
+import 'package:flutter/foundation.dart'
+ show defaultTargetPlatform, kIsWeb, TargetPlatform;
+
+/// Default [FirebaseOptions] for use with your Firebase apps.
+///
+/// Example:
+/// ```dart
+/// import 'firebase_options.dart';
+/// // ...
+/// await Firebase.initializeApp(
+/// options: DefaultFirebaseOptions.currentPlatform,
+/// );
+/// ```
+class DefaultFirebaseOptions {
+ static FirebaseOptions get currentPlatform {
+ if (kIsWeb) {
+ return web;
+ }
+ switch (defaultTargetPlatform) {
+ case TargetPlatform.android:
+ return android;
+ case TargetPlatform.iOS:
+ return ios;
+ case TargetPlatform.macOS:
+ return macos;
+ case TargetPlatform.windows:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for windows - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ case TargetPlatform.linux:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for linux - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ default:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions are not supported for this platform.',
+ );
+ }
+ }
+
+ static const FirebaseOptions web = FirebaseOptions(
+ apiKey: 'AIzaSyAVNZmJ2dD4bhAT_OFZh0_7kr2krR_oqO8',
+ appId: '1:645186470981:web:3430baa6622bbe8df38f2c',
+ messagingSenderId: '645186470981',
+ projectId: 'aub-pickusup',
+ authDomain: 'aub-pickusup.firebaseapp.com',
+ databaseURL: 'https://aub-pickusup-default-rtdb.europe-west1.firebasedatabase.app',
+ storageBucket: 'aub-pickusup.appspot.com',
+ measurementId: 'G-VLY053XQ4N',
+ );
+
+ static const FirebaseOptions android = FirebaseOptions(
+ apiKey: 'AIzaSyDQCy6x3z38KV22yUztkQVZ8ppy53Ihkxg',
+ appId: '1:645186470981:android:1ea20d28e4e3d7f6f38f2c',
+ messagingSenderId: '645186470981',
+ projectId: 'aub-pickusup',
+ databaseURL: 'https://aub-pickusup-default-rtdb.europe-west1.firebasedatabase.app',
+ storageBucket: 'aub-pickusup.appspot.com',
+ );
+
+ static const FirebaseOptions ios = FirebaseOptions(
+ apiKey: 'AIzaSyDy8mrAwG7VUqB25mVQLC1zx2n1OnXIblQ',
+ appId: '1:645186470981:ios:e94ab63e3fb48bbff38f2c',
+ messagingSenderId: '645186470981',
+ projectId: 'aub-pickusup',
+ databaseURL: 'https://aub-pickusup-default-rtdb.europe-west1.firebasedatabase.app',
+ storageBucket: 'aub-pickusup.appspot.com',
+ iosClientId: '645186470981-5nofdlrotprplr9h8qdkdrfuo36i85k8.apps.googleusercontent.com',
+ iosBundleId: 'com.example.aubPickusup',
+ );
+
+ static const FirebaseOptions macos = FirebaseOptions(
+ apiKey: 'AIzaSyDy8mrAwG7VUqB25mVQLC1zx2n1OnXIblQ',
+ appId: '1:645186470981:ios:e94ab63e3fb48bbff38f2c',
+ messagingSenderId: '645186470981',
+ projectId: 'aub-pickusup',
+ databaseURL: 'https://aub-pickusup-default-rtdb.europe-west1.firebasedatabase.app',
+ storageBucket: 'aub-pickusup.appspot.com',
+ iosClientId: '645186470981-5nofdlrotprplr9h8qdkdrfuo36i85k8.apps.googleusercontent.com',
+ iosBundleId: 'com.example.aubPickusup',
+ );
+}
diff --git a/lib/global/map_key.dart b/lib/global/map_key.dart
new file mode 100644
index 0000000..398334c
--- /dev/null
+++ b/lib/global/map_key.dart
@@ -0,0 +1 @@
+String map="AIzaSyDLKFrIEeUutobnb4lWRpuHd1ICor2s2kc";
\ No newline at end of file
diff --git a/lib/main.dart b/lib/main.dart
index 16577c2..7651a20 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,30 +1,57 @@
-import 'package:aub_pickusup/pages/signin.dart';
+import 'package:aub_pickusup/pages/choose_type.dart';
+import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
-import 'pages/home.dart';
+import 'package:firebase_core/firebase_core.dart';
+import 'firebase_options.dart';
-void main() => runApp(
- MaterialApp(
- debugShowCheckedModeBanner: false,
- theme: ThemeData(
- fontFamily: 'Jost',
- colorScheme: ColorScheme(
- brightness: Brightness.dark,
- primary: Colors.white,
- onPrimary: Colors.black,
- secondary: Colors.orange.shade200,
- onSecondary: Colors.black,
- error: Colors.red,
- onError: Colors.white,
- background: Colors.black,
- onBackground: Colors.white,
- surface: Colors.grey.shade200,
- onSurface: Colors.black,
- outline: Colors.orange[200]),
- ),
- initialRoute: '/signin',
- routes: {
- '/signin': (context) => const SignIn(),
- '/': (context) => const Home(),
- },
- ),
+const Color aubRed = Color.fromRGBO(106, 19, 44, 1);
+const Color aubGrey = Color.fromRGBO(197, 197, 197, 1);
+const Color aubBlue = Color.fromRGBO(58, 136, 198, 1);
+final FirebaseFirestore db = FirebaseFirestore.instance;
+final CollectionReference userDataRef = db.collection('users');
+
+void main() async {
+ WidgetsFlutterBinding.ensureInitialized();
+ await Firebase.initializeApp(
+ options: DefaultFirebaseOptions.currentPlatform,
+ );
+ runApp(
+ const AUBPickUsUp(),
+ );
+}
+
+class AUBPickUsUp extends StatelessWidget {
+ const AUBPickUsUp({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ ThemeData themeData = ThemeData(
+ visualDensity: VisualDensity.adaptivePlatformDensity,
+ fontFamily: 'Jost',
+ colorScheme: const ColorScheme(
+ brightness: Brightness.light,
+ primary: Colors.white,
+ onPrimary: aubRed,
+ secondary: aubRed,
+ onSecondary: Colors.white,
+ error: Colors.lightBlue,
+ onError: Colors.white,
+ background: Colors.black,
+ onBackground: Colors.white,
+ surface: Colors.black,
+ onSurface: Colors.white,
+ outline: aubRed),
+ );
+ return MaterialApp(
+ debugShowCheckedModeBanner: false,
+ theme: themeData,
+ title: 'AUB PickUsUp',
+ initialRoute: '/home',
+ routes: {
+ '/home': (context) => const HomePage(),
+ },
);
+ }
+}
diff --git a/lib/pages/RideInfo_screen.dart b/lib/pages/RideInfo_screen.dart
new file mode 100644
index 0000000..5d7a204
--- /dev/null
+++ b/lib/pages/RideInfo_screen.dart
@@ -0,0 +1,205 @@
+
+import 'dart:convert';
+
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:cloud_firestore/cloud_firestore.dart';
+import 'package:flutter/services.dart';
+import 'package:get/get.dart';
+import 'package:get/get_core/src/get_main.dart';
+import 'package:cloud_firestore/cloud_firestore.dart';
+
+class RideInfoScreen extends StatefulWidget {
+ final String placeName;
+ final double latitude;
+ final double longitude;
+ final String userId;
+
+ const RideInfoScreen({
+ Key? key,
+ required this.placeName,
+ required this.latitude,
+ required this.longitude,
+ required this.userId,
+ }) : super(key: key);
+
+ @override
+ _RideInfoScreenState createState() => _RideInfoScreenState();
+}
+
+class _RideInfoScreenState extends State {
+ final _formKey = GlobalKey();
+ final _rideTimeController = TextEditingController();
+ final _numberOfPassengersController = TextEditingController();
+ final _phoneNumberController = TextEditingController();
+
+//The _saveRideInfo function saves the entered ride information to a Firestore collection called rides using the
+// widget.userId as the document ID.
+ Future _saveRideInfo() async {
+ final rideInfo = {
+ 'placeName': widget.placeName,
+ 'latitude': widget.latitude,
+ 'longitude': widget.longitude,
+ 'rideTime': _rideTimeController.text,
+ 'numberOfPassengers': _numberOfPassengersController.text,
+ 'phoneNumber': _phoneNumberController.text,
+ };
+
+ final rideInfoRef = FirebaseFirestore.instance.collection('rides').doc(widget.userId);
+ await rideInfoRef.set(rideInfo);
+
+ }
+ static const Color aubColor = Color.fromRGBO(166, 27, 46, 1.0);
+
+
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ title: Text('Ride Info',
+ style: TextStyle(
+ fontSize: 24,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ ),),
+ backgroundColor: aubColor,
+ elevation: 0,
+ ),
+ body: SingleChildScrollView(
+ child: Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Form(
+ key: _formKey,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ 'Destination:',
+
+ style: TextStyle(fontSize: 18,color: aubColor,
+ fontWeight: FontWeight.bold,),
+ ),
+
+ SizedBox(height: 8),
+ Text(widget.placeName,
+ style: TextStyle(
+ fontSize: 16,
+ color: Colors.grey[700],
+ ),),
+ SizedBox(height: 16),
+
+ TextFormField(
+ controller: _rideTimeController,
+ decoration: InputDecoration(
+ labelText: 'Ride Time',
+ prefixIcon: Icon(
+ Icons.timer,
+ color: Colors.black,
+ )
+ ),
+ keyboardType: TextInputType.number,
+ inputFormatters: [
+ FilteringTextInputFormatter.digitsOnly,
+ LengthLimitingTextInputFormatter(4),
+ // Add separator character after every 2 digits
+ TextInputFormatter.withFunction((oldValue, newValue) {
+ final text = newValue.text;
+
+ if (text.length == 1) {
+ final hour = int.parse(text);
+ if (hour > 2) {
+ return oldValue;
+ }
+ }
+
+ if (text.length == 2) {
+ final hour = int.parse(text.substring(0, 2));
+ if (hour > 23) {
+ return oldValue;
+ }
+ return TextEditingValue(
+ text: '$text:',
+ selection: TextSelection.collapsed(offset: text.length + 1),
+ );
+ }
+
+ return newValue;
+ }),
+ ],
+ validator: (value) {
+ if (value == null || value.isEmpty) {
+ return 'Please enter the ride time';
+ }
+ return null;
+ },
+ ),
+ SizedBox(height: 16),
+ TextFormField(
+ controller: _numberOfPassengersController,
+ decoration: InputDecoration(
+ labelText: 'Number of Passengers',
+ prefixIcon: Icon(
+ Icons.people,
+ color: Colors.black,
+ )
+ ),
+ keyboardType: TextInputType.number,
+ validator: (value) {//to range the number of passengers between 1 and 4
+ if (value == null || value.isEmpty) {
+ return 'Please enter the number of passengers';
+ } else if (int.tryParse(value) == null || int.tryParse(value)! < 1 || int.tryParse(value)! > 4) {
+ return 'Please enter a number between 1 and 4';
+ }
+ return null;
+ },
+ ),
+ SizedBox(height: 16),
+ TextFormField(
+ controller: _phoneNumberController,
+ decoration: InputDecoration(
+ labelText: 'Phone Number',
+ prefixIcon: Icon(
+ Icons.phone,
+ color: Colors.black,
+ )
+ ),
+
+ keyboardType: TextInputType.phone, // Set the keyboardType to TextInputType.phone
+ validator: (value) {
+ if (value == null || value.isEmpty) {
+ return 'Please enter your phone number';
+ }
+ return null;
+ },
+ ),
+ SizedBox(height: 32),
+ ElevatedButton(
+
+ onPressed: () {//The ElevatedButton at the bottom of the form triggers the _saveRideInfo function when pressed.
+ if (_formKey.currentState!.validate()) {
+ _saveRideInfo().then((_) {
+ Navigator.pop(context);
+ });
+ }
+ },
+ style: ElevatedButton.styleFrom(
+ primary: aubColor, // background color
+ ),
+ child: Text(
+ 'Save',
+ style: TextStyle(
+ color: Colors.white,
+ ),
+ ),
+
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/api_key.dart b/lib/pages/api_key.dart
new file mode 100644
index 0000000..f61c019
--- /dev/null
+++ b/lib/pages/api_key.dart
@@ -0,0 +1 @@
+const String apiKey = "AIzaSyDNnWldPx48hApWjLEhXLDCKWlDwZmKDXU";
\ No newline at end of file
diff --git a/lib/pages/choose_type.dart b/lib/pages/choose_type.dart
new file mode 100644
index 0000000..c977c97
--- /dev/null
+++ b/lib/pages/choose_type.dart
@@ -0,0 +1,159 @@
+import 'package:aub_pickusup/main.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'main_screen_driver.dart';
+import 'main_screen_user.dart';
+
+class HomePage extends StatelessWidget {
+ const HomePage({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ elevation: 5,
+ centerTitle: true,
+ backgroundColor: aubRed,
+ toolbarHeight: 150,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.only(
+ bottomLeft: Radius.elliptical(70, 40),
+ bottomRight: Radius.elliptical(70, 40),
+ ),
+ ),
+ systemOverlayStyle: const SystemUiOverlayStyle(
+ statusBarColor: aubRed,
+ statusBarIconBrightness: Brightness.light,
+ ),
+ title: const Text(
+ 'WHAT ARE\nYOU?',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: 35.0,
+ fontWeight: FontWeight.w900,
+ letterSpacing: 10.0,
+ color: Colors.white,
+ fontFamily: 'JosefinSans'),
+ ),
+ ),
+ body: Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ InkWell(
+ onTap: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const MainScreenUser()),
+ );
+ },
+ child: Stack(
+ children: [
+ Container(
+ width: 310.0,
+ height: 240.0,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(
+ 25.0,
+ ),
+ image: const DecorationImage(
+ image: AssetImage('image/choose-user.gif'),
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ Positioned(
+ bottom: 0.0,
+ left: 0.0,
+ right: 0.0,
+ child: Hero(
+ tag: 'user',
+ child: Container(
+ decoration: const BoxDecoration(
+ borderRadius: BorderRadius.only(
+ bottomLeft: Radius.circular(25.0),
+ bottomRight: Radius.circular(25.0),
+ ),
+ color: aubRed,
+ ),
+ padding: const EdgeInsets.symmetric(
+ vertical: 10.0,
+ ),
+ child: const Text(
+ 'User',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: 25.0,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(height: 45.0),
+ InkWell(
+ onTap: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const DriverScreen(),
+ ),
+ );
+ },
+ child: Stack(
+ children: [
+ Container(
+ width: 310.0,
+ height: 240.0,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(25.0),
+ image: const DecorationImage(
+ image: AssetImage('image/choose-driver.gif'),
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ Positioned(
+ bottom: 0.0,
+ left: 0.0,
+ right: 0.0,
+ child: Hero(
+ tag: 'driver',
+ child: Container(
+ decoration: const BoxDecoration(
+ borderRadius: BorderRadius.only(
+ bottomLeft: Radius.circular(25.0),
+ bottomRight: Radius.circular(25.0)),
+ color: aubBlue,
+ ),
+ padding: const EdgeInsets.symmetric(
+ vertical: 10.0,
+ ),
+ child: const Text(
+ 'Driver',
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: 25.0,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/home.dart b/lib/pages/home.dart
deleted file mode 100644
index 950b3c6..0000000
--- a/lib/pages/home.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/src/widgets/framework.dart';
-import 'package:flutter/src/widgets/placeholder.dart';
-
-class Home extends StatefulWidget {
- const Home({super.key});
-
- @override
- State createState() => _HomeState();
-}
-
-class _HomeState extends State {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
-
- );
- }
-}
\ No newline at end of file
diff --git a/lib/pages/main_screen_driver.dart b/lib/pages/main_screen_driver.dart
new file mode 100644
index 0000000..f59aa53
--- /dev/null
+++ b/lib/pages/main_screen_driver.dart
@@ -0,0 +1,197 @@
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:geocoding/geocoding.dart';
+import 'package:http/http.dart' as http;
+import 'package:google_maps_flutter/google_maps_flutter.dart';
+import 'package:get/get.dart';
+import 'package:uuid/uuid.dart';
+import 'rideInfo_screen.dart';
+import 'package:firebase_auth/firebase_auth.dart';
+import 'package:firebase_auth/firebase_auth.dart';
+import 'package:cloud_firestore/cloud_firestore.dart';
+
+final User? user = FirebaseAuth.instance.currentUser;
+final String userId = user!.uid;
+final FirebaseAuth _auth = FirebaseAuth.instance;
+
+//getCurrentUserId to get the current user's ID using the FirebaseAuth instance that we created above
+String? getCurrentUserId() {
+ final User? user = _auth.currentUser;
+ if (user != null) {
+ return user.uid;
+ }
+ return null;
+}
+
+class DriverScreen extends StatefulWidget {
+ const DriverScreen({Key? key}) : super(key: key);
+
+ @override
+ State createState() => _DriverScreenState();
+}
+
+class _DriverScreenState extends State {
+ final TextEditingController _controller = TextEditingController();
+
+ static const CameraPosition _cameraPosition = CameraPosition(
+ target: LatLng(33.899787466379394,
+ 35.480203404979), // this have to be connected to the database
+ zoom: 15,
+ );
+
+ late GoogleMapController _mapController;
+ //the Uuid object is created to generate a unique session token for the Google Places API requests.
+ var uuid = const Uuid();
+ String _sessionToken = "12345";
+ List _placesList =
+ []; //placesList list is initialized to an empty list to store the suggestions returned by the Google Places API.
+
+ @override
+ void initState() {
+ // to initialize the _controller and set a listener on it to call onChange when the text changes.
+ //todo
+ super.initState();
+ _controller.addListener(() {
+ onChange();
+ });
+ }
+
+ void onChange() {
+ //generates a new sessionToken if it is null, and calls getSuggestions to get suggestions from the Google Places API.
+ if (_sessionToken == null) {
+ setState(() {
+ _sessionToken = uuid.v4();
+ });
+ }
+ getSuggesion(_controller.text);
+ }
+
+// constructs a request URL with the input text and the session token, sends an HTTP GET request to the Google Places API,
+// and updates the _placesList with the suggestions returned by the API.
+ void getSuggesion(String input) async {
+ String kplacesApiKey = "AIzaSyDNnWldPx48hApWjLEhXLDCKWlDwZmKDXU";
+ String baseURL =
+ 'https://maps.googleapis.com/maps/api/place/autocomplete/json';
+ String request =
+ '$baseURL?input=$input&key=$kplacesApiKey&sessiontoken=$_sessionToken';
+
+ var response = await http.get(Uri.parse(request));
+ var data = response.body.toString();
+ print('data');
+ print(data);
+
+ if (response.statusCode == 200) {
+ setState(() {
+ _placesList = jsonDecode(response.body.toString())['predictions'];
+ });
+ } else {
+ throw Exception('Failed to load data');
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ body: Stack(
+ children: [
+ GoogleMap(
+ onMapCreated: (GoogleMapController mapController) {
+ _mapController = mapController;
+ },
+ initialCameraPosition: _cameraPosition),
+ Positioned(
+ top: 50,
+ right: 16,
+ child: GestureDetector(
+ onTap: () {
+ // Navigate to profile page
+ },
+ child: const CircleAvatar(
+ radius: 20,
+ backgroundImage: AssetImage('image/download.png'),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.only(top: 100.0),
+ child: Column(children: [
+ Container(
+ height: 50,
+ width: double.infinity,
+ margin: const EdgeInsets.all(16),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(25),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.grey.withOpacity(0.5),
+ spreadRadius: 1,
+ blurRadius: 7,
+ offset: const Offset(0, 3),
+ ),
+ ],
+ ),
+ child: Row(
+ children: [
+ const SizedBox(width: 16),
+ const Icon(Icons.search),
+ const SizedBox(width: 16),
+ Expanded(
+ child: TextFormField(
+ controller: _controller,
+ decoration: const InputDecoration(
+ hintText: 'Choose your destination',
+ border: InputBorder.none,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Expanded(
+ //The suggestions list is implemented as a ListView.builder widget that displays the suggestions stored in _placesList.
+
+ child: ListView.builder(
+ itemCount: _placesList.length,
+ itemBuilder: (context, index) {
+ // Each suggestion is represented by a ListTile widget that displays the suggestion text and navigates the user to the RideInfoScreen when tapped
+ return ListTile(
+ //In the onTap callback of each ListTile, the location information (latitude, longitude, and name)
+ // is extracted from the suggestion text using the locationFromAddress function from the geocoding package,
+ // and passed to the RideInfoScreen widget along with the UserId.
+ onTap: () async {
+ List locations = await locationFromAddress(
+ _placesList[index]['description']);
+ String name = _placesList[index]['description'];
+ double latitude = locations.last.latitude;
+ double longitude = locations.last.longitude;
+
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => RideInfoScreen(
+ placeName: name,
+ latitude: latitude,
+ longitude: longitude,
+ userId: userId,
+ ),
+ ),
+ );
+ },
+ title: Text(
+ _placesList[index]['description'],
+ style: const TextStyle(
+ color: Colors.black, // Set text color here
+ fontSize: 16,
+ fontWeight: FontWeight.normal,
+ ),
+ ),
+ tileColor: Colors.white,
+ );
+ })),
+ ]),
+ ),
+ ],
+ ));
+ }
+}
diff --git a/lib/pages/main_screen_user.dart b/lib/pages/main_screen_user.dart
new file mode 100644
index 0000000..48c5a2a
--- /dev/null
+++ b/lib/pages/main_screen_user.dart
@@ -0,0 +1,164 @@
+import 'dart:async';
+import 'package:flutter/material.dart';
+import 'package:google_maps_flutter/google_maps_flutter.dart';
+import 'package:geolocator/geolocator.dart';
+import 'package:geocoding/geocoding.dart';
+
+import 'rides_list.dart';
+
+class MainScreenUser extends StatefulWidget {
+ const MainScreenUser({Key? key}) : super(key: key);
+ @override
+ _MainScreenUserState createState() => _MainScreenUserState();
+}
+
+class _MainScreenUserState extends State {
+ final Completer _controller =
+ Completer();
+
+ CameraPosition _kGooglePlex = const CameraPosition(
+ target: LatLng(
+ 33.89971809068136, 35.48022013654691), // initialize with default value
+ zoom: 15,
+ );
+
+ final List _marker = [];
+
+ List _list = [];
+
+ //In the initState method, the widget calls the _determinePosition method, which determines the user's current location
+ // and updates the _kGooglePlex camera position and the _marker list with the user's location.
+ // The _marker list contains a single Marker instance that represents the user's current location on the map
+ @override
+ void initState() {
+ super.initState();
+ _determinePosition().then((position) {
+ // update camera position and marker with current location
+ setState(() {
+ _kGooglePlex = CameraPosition(
+ target: LatLng(position.latitude, position.longitude),
+ zoom: 15,
+ );
+
+ _list = [
+ const Marker(
+ markerId: MarkerId('1'),
+ position: LatLng(33.89971809068136, 35.48022013654691),
+ infoWindow: InfoWindow(
+ title: 'my location',
+ ),
+ ),
+ ];
+
+ _marker.addAll(_list);
+ });
+ });
+ }
+// in the _determinePosition method here we get the
+
+ Future _determinePosition() async {
+ bool serviceEnabled;
+ LocationPermission permission;
+//These variables will be used to determine whether the user has enabled location services and whether the app has permission to access the user's location.
+
+ serviceEnabled = await Geolocator.isLocationServiceEnabled();
+ if (!serviceEnabled) {
+ return Future.error('Location services are disabled.');
+ }
+ permission = await Geolocator.checkPermission();
+ if (permission == LocationPermission.denied) {
+ permission = await Geolocator.requestPermission();
+ if (permission == LocationPermission.denied) {
+ return Future.error('Location permissions are denied');
+ }
+ }
+ if (permission == LocationPermission.deniedForever) {
+ return Future.error(
+ 'Location permissions are permanently denied, we cannot request permissions.');
+ }
+ //If the user has enabled location services and granted permission to the app, the function uses Geolocator.getCurrentPosition()
+ // to get the user's current position.
+ // and then the function returns the Future object that contains the user's position.
+ return await Geolocator.getCurrentPosition();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ body: Stack(
+ children: [
+ GoogleMap(
+ initialCameraPosition: _kGooglePlex,
+ markers: Set.of(_marker),
+ onMapCreated: (GoogleMapController controller) {
+ _controller.complete(controller);
+ },
+ ),
+ Positioned(
+ top: 50,
+ right: 16,
+ child: GestureDetector(
+ onTap: () {
+ // Navigate to profile page
+ },
+ child: const CircleAvatar(
+ radius: 20,
+ backgroundImage: AssetImage('image/download.png'),
+ ),
+ ),
+ ),
+ ],
+ ),
+ floatingActionButton: Padding(
+ padding: const EdgeInsets.only(bottom: 16.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ SizedBox(
+ width: 150,
+ height: 50,
+ child: ElevatedButton(
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => RidesList(
+ userId: '',
+ )),
+ );
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: Colors.black,
+ foregroundColor: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(40.0),
+ ),
+ ),
+ child: const Text(
+ 'Rides List',
+ style: TextStyle(fontSize: 18),
+ ),
+ ),
+ ),
+ const SizedBox(height: 16),
+ SizedBox(
+ width: 50,
+ height: 50,
+ child: FloatingActionButton(
+ onPressed: () async {
+ Position position = await _determinePosition();
+ print('my current location');
+ print(position.latitude.toString() +
+ " " +
+ position.longitude.toString());
+ },
+ backgroundColor: Colors.black,
+ child: const Icon(Icons.location_on),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/rides_list.dart b/lib/pages/rides_list.dart
new file mode 100644
index 0000000..94edafe
--- /dev/null
+++ b/lib/pages/rides_list.dart
@@ -0,0 +1,81 @@
+import 'dart:async';
+import 'package:flutter/material.dart';
+import 'package:cloud_firestore/cloud_firestore.dart';
+
+
+//This is a Flutter code that defines a stateless widget called UserScreen,
+// which displays a list of rides retrieved from a Firestore database.
+
+
+class RidesList extends StatelessWidget {
+ final String userId;
+//The RidesList widget takes a required parameter called userId of type String, which is not used in this code snippet.
+ RidesList({required this.userId});
+
+
+
+
+
+ @override
+ Widget build(BuildContext context) {
+
+ //Timer function that periodically checks if any ride's createdAt time is older than 24 hours,
+ // and if so, marks the ride as "expired" by setting the expired field to true in the Firestore document.
+ Timer.periodic(Duration(hours: 1), (timer) async {
+ // It uses the Timer.periodic method to run a function every hour. The function retrieves all the rides from the Firestore database,
+ // checks their createdAt time, and updates the expired field if necessary.
+ QuerySnapshot snapshot =
+ await FirebaseFirestore.instance.collection('rides').get();
+ for (QueryDocumentSnapshot doc in snapshot.docs) {
+ Timestamp createdAt = (doc.data() as Map)['createdAt'];
+ if (DateTime.now().difference(createdAt.toDate()).inHours >= 24) {
+ doc.reference.update({'expired': true});
+ }
+ }
+ });
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('Rides'),
+ ),
+
+ //The StreamBuilder widget listens to a stream of Firestore snapshots that contain the rides data,
+ // and filters out any rides that have already expired by querying for rides where expired is equal to false.
+ body: StreamBuilder(
+ stream: FirebaseFirestore.instance.collection('rides').where('expired', isEqualTo: false).snapshots(),
+
+ builder: (BuildContext context, AsyncSnapshot snapshot) {
+ //If the snapshot has an error, the widget displays an error message. If the connection state is waiting, the widget displays a loading message.
+ // Otherwise, it retrieves the list of rides from the snapshot, and displays them in a ListView.builder widget.
+ if (snapshot.hasError) {
+ return Text('Error: ${snapshot.error}');
+ }
+ if (snapshot.connectionState == ConnectionState.waiting) {
+ return Text('Loading...');
+ }
+
+ final List rides = snapshot.data!.docs;
+ final List filteredRides = rides;
+
+ // widget returns a ListView.builder widget that displays a list of rides.
+ return ListView.builder(
+ itemCount: filteredRides.length,
+ itemBuilder: (BuildContext context, int index) {
+ final ride = filteredRides[index];
+ return ListTile(
+ title: Text(ride['placeName']),
+ subtitle: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text('${ride['numberOfPassengers']} passengers'),
+ Text('Phone: ${ride['phoneNumber']}'),
+ ],
+ ),
+ trailing: Text(ride['rideTime']),
+ );
+ },
+ );
+ },
+ ),
+ );
+ }
+}
diff --git a/lib/pages/signin.dart b/lib/pages/signin.dart
deleted file mode 100644
index d3b5230..0000000
--- a/lib/pages/signin.dart
+++ /dev/null
@@ -1,92 +0,0 @@
-import 'package:aub_pickusup/components/my_textfield.dart';
-import 'package:flutter/material.dart';
-import 'package:aub_pickusup/components/confirm_sign_in.dart';
-
-class SignIn extends StatefulWidget {
- const SignIn({super.key});
-
- @override
- State createState() => _SignInState();
-}
-
-class _SignInState extends State {
- final emailController = TextEditingController();
-
- final passwordController = TextEditingController();
-
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.black,
- body: SafeArea(
- child: SingleChildScrollView(
- child: SizedBox(
- height: MediaQuery.of(context).size.height -
- MediaQuery.of(context).padding.top,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- const SizedBox(
- height: 50,
- ),
- Text(
- 'WELCOME',
- style: TextStyle(
- fontSize: 40.0,
- fontWeight: FontWeight.w900,
- letterSpacing: 16.0,
- color: Colors.orange[200],
- fontFamily: 'JosefinSans'),
- ),
- Divider(
- height: 20.0,
- thickness: 2,
- color: Colors.orange[200],
- ),
- const Padding(
- padding: EdgeInsets.fromLTRB(0, 110.0, 0.0, 110.0),
- child: Text(
- 'SIGN IN',
- style: TextStyle(
- fontSize: 30.0,
- fontFamily: 'JosefinSans',
- fontWeight: FontWeight.bold,
- color: Colors.white,
- letterSpacing: 8.0),
- ),
- ),
- SizedBox(
- height: 80,
- child: MyTextField(
- obscureText: false,
- specIcon: Icons.email_rounded,
- controller: emailController,
- labelText: 'Email'),
- ),
- SizedBox(
- height: 80,
- child: MyTextField(
- obscureText: true,
- specIcon: Icons.password_rounded,
- controller: passwordController,
- labelText: 'Password'),
- ),
- const ConfirmSignIn(),
- Expanded(
- child: Container(
- margin: const EdgeInsets.fromLTRB(0, 220, 0, 0),
- alignment: Alignment.center,
- color: Colors.grey.shade900,
- child: const Text(
- 'Please log in using your AUBnet Credentials',
- style: TextStyle(fontSize: 16)),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
-}
diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift
index cccf817..3dafe49 100644
--- a/macos/Flutter/GeneratedPluginRegistrant.swift
+++ b/macos/Flutter/GeneratedPluginRegistrant.swift
@@ -5,6 +5,18 @@
import FlutterMacOS
import Foundation
+import cloud_firestore
+import firebase_auth
+import firebase_core
+import firebase_database
+import geolocator_apple
+import package_info_plus
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
+ FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
+ FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
+ FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
+ FLTFirebaseDatabasePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseDatabasePlugin"))
+ GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
+ FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
}
diff --git a/macos/Runner/GoogleService-Info.plist b/macos/Runner/GoogleService-Info.plist
new file mode 100644
index 0000000..9297f72
--- /dev/null
+++ b/macos/Runner/GoogleService-Info.plist
@@ -0,0 +1,36 @@
+
+
+
+
+ CLIENT_ID
+ 645186470981-5nofdlrotprplr9h8qdkdrfuo36i85k8.apps.googleusercontent.com
+ REVERSED_CLIENT_ID
+ com.googleusercontent.apps.645186470981-5nofdlrotprplr9h8qdkdrfuo36i85k8
+ API_KEY
+ AIzaSyDy8mrAwG7VUqB25mVQLC1zx2n1OnXIblQ
+ GCM_SENDER_ID
+ 645186470981
+ PLIST_VERSION
+ 1
+ BUNDLE_ID
+ com.example.aubPickusup
+ PROJECT_ID
+ aub-pickusup
+ STORAGE_BUCKET
+ aub-pickusup.appspot.com
+ IS_ADS_ENABLED
+
+ IS_ANALYTICS_ENABLED
+
+ IS_APPINVITE_ENABLED
+
+ IS_GCM_ENABLED
+
+ IS_SIGNIN_ENABLED
+
+ GOOGLE_APP_ID
+ 1:645186470981:ios:e94ab63e3fb48bbff38f2c
+ DATABASE_URL
+ https://aub-pickusup-default-rtdb.europe-west1.firebasedatabase.app
+
+
\ No newline at end of file
diff --git a/macos/firebase_app_id_file.json b/macos/firebase_app_id_file.json
new file mode 100644
index 0000000..fd75c84
--- /dev/null
+++ b/macos/firebase_app_id_file.json
@@ -0,0 +1,7 @@
+{
+ "file_generated_by": "FlutterFire CLI",
+ "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
+ "GOOGLE_APP_ID": "1:645186470981:ios:e94ab63e3fb48bbff38f2c",
+ "FIREBASE_PROJECT_ID": "aub-pickusup",
+ "GCM_SENDER_ID": "645186470981"
+}
\ No newline at end of file
diff --git a/pubspec.lock b/pubspec.lock
index 087b13b..77faed2 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -1,6 +1,30 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
+ _flutterfire_internals:
+ dependency: transitive
+ description:
+ name: _flutterfire_internals
+ sha256: "6a0ad72b2bcdb461749e40c01c478212a78db848dfcb2f10f2a461988bc5fb29"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ animated_splash_screen:
+ dependency: "direct main"
+ description:
+ name: animated_splash_screen
+ sha256: f45634db6ec4e8cf034c53e03f3bd83898a16fe3c9286bf5510b6831dfcf2124
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
+ archive:
+ dependency: transitive
+ description:
+ name: archive
+ sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.3.7"
async:
dependency: transitive
description:
@@ -33,6 +57,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.1"
+ cloud_firestore:
+ dependency: "direct main"
+ description:
+ name: cloud_firestore
+ sha256: "7e15d929d3d82774bffaf4b2c0bfc85b429fe08dff7280a601c43f309cea1ebf"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.5.3"
+ cloud_firestore_platform_interface:
+ dependency: transitive
+ description:
+ name: cloud_firestore_platform_interface
+ sha256: "76ba7b9dd43ce7f07e75a2349f3eb3e2c61e1bea88fec4798c3377cccf44cd7a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.12.1"
+ cloud_firestore_web:
+ dependency: transitive
+ description:
+ name: cloud_firestore_web
+ sha256: "0c1305722339e0b3fc0ce62bf6233b3f8762cc105a26af02171b849e6a3b3727"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.4.2"
collection:
dependency: transitive
description:
@@ -41,6 +89,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.17.0"
+ convert:
+ dependency: transitive
+ description:
+ name: convert
+ sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.1"
+ crypto:
+ dependency: transitive
+ description:
+ name: crypto
+ sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.2"
cupertino_icons:
dependency: "direct main"
description:
@@ -57,24 +121,349 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
+ ffi:
+ dependency: transitive
+ description:
+ name: ffi
+ sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.1"
+ firebase_auth:
+ dependency: "direct main"
+ description:
+ name: firebase_auth
+ sha256: "8c97619ed2633148c41c344a59461f23c73bf8aa477ae48296703f06d9621fb0"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.4.2"
+ firebase_auth_platform_interface:
+ dependency: transitive
+ description:
+ name: firebase_auth_platform_interface
+ sha256: f7db119be795d79533c503887075a0315fc3ae1da6f9a9cd4f9100a62c68859c
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.13.1"
+ firebase_auth_web:
+ dependency: transitive
+ description:
+ name: firebase_auth_web
+ sha256: "45687246f5be811baf3810652460acd0f3d8c98f9d8f8b1961d7cc5c15c1e803"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.3.2"
+ firebase_core:
+ dependency: "direct main"
+ description:
+ name: firebase_core
+ sha256: "239e4ac688674a7e7b5476fd16b0d8e2b5a453d464f32091af3ce1df4ebb7316"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.10.0"
+ firebase_core_platform_interface:
+ dependency: transitive
+ description:
+ name: firebase_core_platform_interface
+ sha256: "0df0a064ab0cad7f8836291ca6f3272edd7b83ad5b3540478ee46a0849d8022b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.6.0"
+ firebase_core_web:
+ dependency: transitive
+ description:
+ name: firebase_core_web
+ sha256: "347351a8f0518f3343d79a9a0690fa67ad232fc32e2ea270677791949eac792b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.0"
+ firebase_database:
+ dependency: "direct main"
+ description:
+ name: firebase_database
+ sha256: "39e4fe701ffc9e6d963018348c4bfcf989671c1eb9f29c04663a4e7130c2107c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "10.1.1"
+ firebase_database_platform_interface:
+ dependency: transitive
+ description:
+ name: firebase_database_platform_interface
+ sha256: "0490b234c72e84cc8b35991a7c02956e58f9fb52fd1705a5fb80d2b434d60078"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.3+1"
+ firebase_database_web:
+ dependency: transitive
+ description:
+ name: firebase_database_web
+ sha256: c3ab578fd2bf0fe6d4af61554e325b1f629c769cb61d509162f2d5942fa2c983
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.2+1"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
+ flutter_google_places:
+ dependency: "direct main"
+ description:
+ name: flutter_google_places
+ sha256: e9fb23ceacdc7359aa759627550146f7fd3ae6c067d16f39f3c50d8feebf4809
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.3.0"
+ flutter_keyboard_visibility:
+ dependency: transitive
+ description:
+ name: flutter_keyboard_visibility
+ sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.4.1"
+ flutter_keyboard_visibility_linux:
+ dependency: transitive
+ description:
+ name: flutter_keyboard_visibility_linux
+ sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
+ flutter_keyboard_visibility_macos:
+ dependency: transitive
+ description:
+ name: flutter_keyboard_visibility_macos
+ sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
+ flutter_keyboard_visibility_platform_interface:
+ dependency: transitive
+ description:
+ name: flutter_keyboard_visibility_platform_interface
+ sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.0"
+ flutter_keyboard_visibility_web:
+ dependency: transitive
+ description:
+ name: flutter_keyboard_visibility_web
+ sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.0"
+ flutter_keyboard_visibility_windows:
+ dependency: transitive
+ description:
+ name: flutter_keyboard_visibility_windows
+ sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
flutter_lints:
- dependency: "direct dev"
+ dependency: "direct main"
description:
name: flutter_lints
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
url: "https://pub.dev"
source: hosted
version: "2.0.1"
+ flutter_plugin_android_lifecycle:
+ dependency: transitive
+ description:
+ name: flutter_plugin_android_lifecycle
+ sha256: "2818f5233cf8fa5fc51f6d78ce0028feb4e7c18d0b6d40b57b91f366eea7e656"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.12"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
+ flutter_typeahead:
+ dependency: "direct main"
+ description:
+ name: flutter_typeahead
+ sha256: edfc51579ca3756adaa32b6849cf44af03276b93e8a8a68d8247ee243598f1b2
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.3.7"
+ flutter_web_plugins:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ fluttertoast:
+ dependency: "direct main"
+ description:
+ name: fluttertoast
+ sha256: "2f9c4d3f4836421f7067a28f8939814597b27614e021da9d63e5d3fb6e212d25"
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.2.1"
+ geocoding:
+ dependency: "direct main"
+ description:
+ name: geocoding
+ sha256: b34c0501bbbaf3190b85bef3078b27cf66c28a8915c6d3af50d67f356aa7da31
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ geocoding_android:
+ dependency: transitive
+ description:
+ name: geocoding_android
+ sha256: "5a1fc0cec9b0497b44ca31c1fa8d1c891f3aded1053e6bb2eac075d3bd1bf046"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ geocoding_ios:
+ dependency: transitive
+ description:
+ name: geocoding_ios
+ sha256: c85495ce8fb34e4fbd2dd8fc5f79263d622d9f88c4af948c965daf6b27a7f3a1
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ geocoding_platform_interface:
+ dependency: transitive
+ description:
+ name: geocoding_platform_interface
+ sha256: "8848605d307d844d89937cdb4b8ad7dfa880552078f310fa24d8a460f6dddab4"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.1"
+ geolocator:
+ dependency: "direct main"
+ description:
+ name: geolocator
+ sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "9.0.2"
+ geolocator_android:
+ dependency: transitive
+ description:
+ name: geolocator_android
+ sha256: "2ba24690aee0a3e1b6b7bd47c2711a50c874e95e4c758346589d35194adf6d6a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.1.7"
+ geolocator_apple:
+ dependency: transitive
+ description:
+ name: geolocator_apple
+ sha256: "22b60ca3b8c0f58e6a9688ff855ee39ab813ca3f0c0609a48d282f6631266f2e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.5"
+ geolocator_platform_interface:
+ dependency: transitive
+ description:
+ name: geolocator_platform_interface
+ sha256: af4d69231452f9620718588f41acc4cb58312368716bfff2e92e770b46ce6386
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.7"
+ geolocator_web:
+ dependency: transitive
+ description:
+ name: geolocator_web
+ sha256: f68a122da48fcfff68bbc9846bb0b74ef651afe84a1b1f6ec20939de4d6860e1
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.6"
+ geolocator_windows:
+ dependency: transitive
+ description:
+ name: geolocator_windows
+ sha256: f5911c88e23f48b598dd506c7c19eff0e001645bdc03bb6fecb9f4549208354d
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.1.1"
+ get:
+ dependency: "direct main"
+ description:
+ name: get
+ sha256: "2ba20a47c8f1f233bed775ba2dd0d3ac97b4cf32fc17731b3dfc672b06b0e92a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.6.5"
+ google_api_headers:
+ dependency: transitive
+ description:
+ name: google_api_headers
+ sha256: ac6f4e27e35c9eb4fbe8ce4ce7380e651d3a7bee3ad4c2ff30e67aaa73f005d3
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.5.0+1"
+ google_maps_flutter:
+ dependency: "direct main"
+ description:
+ name: google_maps_flutter
+ sha256: "24392ef192f3b00bcd93151375676805a9933574423a5bd5509a0ead2e8a4215"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.5"
+ google_maps_flutter_android:
+ dependency: transitive
+ description:
+ name: google_maps_flutter_android
+ sha256: e2415bdf73f8453461fe4c3ba9e93608f03f26492a96c39e4d51158ba53f758d
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.12"
+ google_maps_flutter_ios:
+ dependency: transitive
+ description:
+ name: google_maps_flutter_ios
+ sha256: e9ad74415a222573625a2c1717adc1e375b18e8ce660fc12db734d1bda1132d4
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.1"
+ google_maps_flutter_platform_interface:
+ dependency: transitive
+ description:
+ name: google_maps_flutter_platform_interface
+ sha256: a07811d2b82055815ede75e1fe4b7b76f71a0b4820b26f71bdaddd157d6a3e20
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.6"
+ google_maps_webservice:
+ dependency: transitive
+ description:
+ name: google_maps_webservice
+ sha256: d0ae4e4508afd74a3f051565261a3cdbae59db29448f9b6e6beb5674545e1eb7
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.0.20-nullsafety.5"
+ http:
+ dependency: "direct main"
+ description:
+ name: http
+ sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.13.5"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.2"
+ intl:
+ dependency: transitive
+ description:
+ name: intl
+ sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.17.0"
js:
dependency: transitive
description:
@@ -83,6 +472,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.5"
+ json_annotation:
+ dependency: transitive
+ description:
+ name: json_annotation
+ sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.0"
lints:
dependency: transitive
description:
@@ -91,6 +488,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
+ lottie:
+ dependency: "direct main"
+ description:
+ name: lottie
+ sha256: "23522951540d20a57a60202ed7022e6376bed206a4eee1c347a91f58bd57eb9f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
matcher:
dependency: transitive
description:
@@ -115,6 +520,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.0"
+ package_info_plus:
+ dependency: transitive
+ description:
+ name: package_info_plus
+ sha256: "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.2"
+ package_info_plus_platform_interface:
+ dependency: transitive
+ description:
+ name: package_info_plus_platform_interface
+ sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.1"
+ page_transition:
+ dependency: transitive
+ description:
+ name: page_transition
+ sha256: a7694bc120b7064a7f57c336914bb8885acf4f70bb3772c30c2fcfe6a85e43ff
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.9"
path:
dependency: transitive
description:
@@ -123,6 +552,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.8.2"
+ plugin_platform_interface:
+ dependency: transitive
+ description:
+ name: plugin_platform_interface
+ sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ pointycastle:
+ dependency: transitive
+ description:
+ name: pointycastle
+ sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.7.3"
+ rxdart:
+ dependency: transitive
+ description:
+ name: rxdart
+ sha256: "2ef8b4e91cb3b55d155e0e34eeae0ac7107974e451495c955ac04ddee8cc21fd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.26.0"
sky_engine:
dependency: transitive
description: flutter
@@ -152,6 +605,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
+ stream_transform:
+ dependency: transitive
+ description:
+ name: stream_transform
+ sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
string_scanner:
dependency: transitive
description:
@@ -176,6 +637,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.4.16"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.1"
+ uuid:
+ dependency: "direct main"
+ description:
+ name: uuid
+ sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.7"
vector_math:
dependency: transitive
description:
@@ -184,5 +661,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
+ win32:
+ dependency: transitive
+ description:
+ name: win32
+ sha256: dd8f9344bc305ae2923e3d11a2a911d9a4e2c7dd6fe0ed10626d63211a69676e
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.1.3"
sdks:
dart: ">=2.19.4 <3.0.0"
+ flutter: ">=3.3.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index cffa312..d72fd7d 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -35,6 +35,25 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
+
+ firebase_core: ^2.8.0
+ firebase_auth: ^4.3.0
+ firebase_database: ^10.0.16
+ fluttertoast: ^8.2.1
+ google_maps_flutter: ^2.2.5
+ animated_splash_screen: ^1.3.0
+ lottie: ^2.3.1
+ geolocator: ^9.0.2
+ geocoding: ^2.1.0
+ flutter_typeahead: ^4.3.7
+ flutter_google_places: ^0.3.0
+ flutter_lints: ^2.0.1
+ get: ^4.6.5
+ http:
+ uuid: ^3.0.7
+ cloud_firestore: ^4.5.0
+
+
dev_dependencies:
flutter_test:
@@ -45,7 +64,6 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
- flutter_lints: ^2.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
@@ -59,9 +77,16 @@ flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
- # assets:
- # - images/a_dot_burr.jpeg
- # - images/a_dot_ham.jpeg
+ assets:
+ - image/carpool-vector.jpg
+ - image/carpool.png
+ - image/download1.png
+ - image/logo.png
+ - image/images.jpg
+ - image/images (1).jpg
+ - image/download.png
+ - image/choose-user.gif
+ - image/choose-driver.gif
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc
index 8b6d468..1ece8f2 100644
--- a/windows/flutter/generated_plugin_registrant.cc
+++ b/windows/flutter/generated_plugin_registrant.cc
@@ -6,6 +6,9 @@
#include "generated_plugin_registrant.h"
+#include
void RegisterPlugins(flutter::PluginRegistry* registry) {
+ GeolocatorWindowsRegisterWithRegistrar(
+ registry->GetRegistrarForPlugin("GeolocatorWindows"));
}
diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake
index b93c4c3..7f101a7 100644
--- a/windows/flutter/generated_plugins.cmake
+++ b/windows/flutter/generated_plugins.cmake
@@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
+ geolocator_windows
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST