|
@@ -9,143 +9,141 @@ class HomePage extends StatelessWidget {
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
return Scaffold(
|
|
|
- backgroundColor: Colors.white,
|
|
|
- body:
|
|
|
- SingleChildScrollView(
|
|
|
- child: Column(
|
|
|
- children: <Widget>[
|
|
|
-
|
|
|
- Padding(
|
|
|
- padding: const EdgeInsets.all(16.0),
|
|
|
- child: Column(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
- children: [
|
|
|
- const SizedBox(height: 20),
|
|
|
- const Align(
|
|
|
- alignment: Alignment.centerLeft,
|
|
|
- child: Text(
|
|
|
- 'Share the ride',
|
|
|
- style: TextStyle(
|
|
|
- fontFamily: 'Poppins',
|
|
|
- fontSize: 27,
|
|
|
- fontWeight: FontWeight.bold,
|
|
|
- color: Colors.black,
|
|
|
+ backgroundColor: Colors.white,
|
|
|
+ body: SingleChildScrollView(
|
|
|
+ child: Column(
|
|
|
+ children: <Widget>[
|
|
|
+ Padding(
|
|
|
+ padding: const EdgeInsets.all(16.0),
|
|
|
+ child: Column(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
+ children: [
|
|
|
+ const SizedBox(height: 20),
|
|
|
+ const Align(
|
|
|
+ alignment: Alignment.centerLeft,
|
|
|
+ child: Text(
|
|
|
+ 'Share the ride',
|
|
|
+ style: TextStyle(
|
|
|
+ fontFamily: 'Poppins',
|
|
|
+ fontSize: 27,
|
|
|
+ fontWeight: FontWeight.bold,
|
|
|
+ color: Colors.black,
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- const SizedBox(height: 0),
|
|
|
- const Align(
|
|
|
- alignment: Alignment.centerLeft,
|
|
|
- child: Text(
|
|
|
- 'Split the fare',
|
|
|
- style: TextStyle(
|
|
|
- fontFamily: 'Poppins',
|
|
|
- fontSize: 27,
|
|
|
- color: Colors.black,
|
|
|
+ const SizedBox(height: 0),
|
|
|
+ const Align(
|
|
|
+ alignment: Alignment.centerLeft,
|
|
|
+ child: Text(
|
|
|
+ 'Split the fare',
|
|
|
+ style: TextStyle(
|
|
|
+ fontFamily: 'Poppins',
|
|
|
+ fontSize: 27,
|
|
|
+ color: Colors.black,
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- const SizedBox(height: 70),
|
|
|
- Image.asset(
|
|
|
- 'assets/images/putrago.png',
|
|
|
- height: 70,
|
|
|
- ),
|
|
|
- const SizedBox(height: 70),
|
|
|
- Container(
|
|
|
- width: 334,
|
|
|
- height: 65,
|
|
|
- decoration: BoxDecoration(
|
|
|
- borderRadius: BorderRadius.circular(10),
|
|
|
- color: const Color.fromRGBO(119, 97, 255, 1.0),
|
|
|
+ const SizedBox(height: 70),
|
|
|
+ Image.asset(
|
|
|
+ 'assets/images/putrago.png',
|
|
|
+ height: 70,
|
|
|
),
|
|
|
- child: TextButton(
|
|
|
- onPressed: () {
|
|
|
- // Handle login button press
|
|
|
- Navigator.push(
|
|
|
- context,
|
|
|
- MaterialPageRoute(builder: (context) => userLogin()),
|
|
|
- );
|
|
|
- },
|
|
|
- child: const Text(
|
|
|
- 'Login',
|
|
|
- style: TextStyle(
|
|
|
- fontFamily: 'Poppins',
|
|
|
- fontSize: 17,
|
|
|
- fontWeight: FontWeight.bold,
|
|
|
- color: Colors.white,
|
|
|
+ const SizedBox(height: 70),
|
|
|
+ Container(
|
|
|
+ width: 334,
|
|
|
+ height: 65,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.circular(10),
|
|
|
+ color: const Color.fromRGBO(119, 97, 255, 1.0),
|
|
|
+ ),
|
|
|
+ child: TextButton(
|
|
|
+ onPressed: () {
|
|
|
+ // Handle login button press
|
|
|
+ Navigator.push(
|
|
|
+ context,
|
|
|
+ MaterialPageRoute(
|
|
|
+ builder: (context) => userLogin()),
|
|
|
+ );
|
|
|
+ },
|
|
|
+ child: const Text(
|
|
|
+ 'Login',
|
|
|
+ style: TextStyle(
|
|
|
+ fontFamily: 'Poppins',
|
|
|
+ fontSize: 17,
|
|
|
+ fontWeight: FontWeight.bold,
|
|
|
+ color: Colors.white,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+
|
|
|
+ //Go to user register page
|
|
|
+ const SizedBox(height: 10),
|
|
|
+ Container(
|
|
|
+ width: 334,
|
|
|
+ height: 65,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.circular(10),
|
|
|
+ color: Colors.white,
|
|
|
+ border: Border.all(color: Colors.black, width: 2),
|
|
|
+ ),
|
|
|
+ child: TextButton(
|
|
|
+ onPressed: () {
|
|
|
+ // Handle register button press
|
|
|
+ Navigator.push(
|
|
|
+ context,
|
|
|
+ MaterialPageRoute(
|
|
|
+ builder: (context) => userRegister()),
|
|
|
+ );
|
|
|
+ },
|
|
|
+ child: const Text(
|
|
|
+ 'Register',
|
|
|
+ style: TextStyle(
|
|
|
+ fontFamily: 'Poppins',
|
|
|
+ fontSize: 17,
|
|
|
+ fontWeight: FontWeight.bold,
|
|
|
+ color: Colors.black,
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
|
|
|
- //Go to user register page
|
|
|
- const SizedBox(height: 10),
|
|
|
- Container(
|
|
|
- width: 334,
|
|
|
- height: 65,
|
|
|
- decoration: BoxDecoration(
|
|
|
- borderRadius: BorderRadius.circular(10),
|
|
|
- color: Colors.white,
|
|
|
- border: Border.all(color: Colors.black, width: 2),
|
|
|
+ const SizedBox(height: 20),
|
|
|
+ const Text(
|
|
|
+ 'or',
|
|
|
+ style: TextStyle(
|
|
|
+ fontFamily: 'Poppins',
|
|
|
+ fontSize: 17,
|
|
|
+ fontWeight: FontWeight.bold,
|
|
|
+ color: Color.fromRGBO(165, 165, 165, 1),
|
|
|
+ ),
|
|
|
),
|
|
|
- child: TextButton(
|
|
|
+ const SizedBox(height: 20),
|
|
|
+ TextButton(
|
|
|
onPressed: () {
|
|
|
- // Handle register button press
|
|
|
+ // Handle login as a user button press
|
|
|
Navigator.push(
|
|
|
context,
|
|
|
- MaterialPageRoute(builder: (context) => userRegister()),
|
|
|
+ MaterialPageRoute(builder: (context) => driverMain()),
|
|
|
);
|
|
|
},
|
|
|
child: const Text(
|
|
|
- 'Register',
|
|
|
+ 'Login as a Driver',
|
|
|
style: TextStyle(
|
|
|
fontFamily: 'Poppins',
|
|
|
fontSize: 17,
|
|
|
- fontWeight: FontWeight.bold,
|
|
|
- color: Colors.black,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ decoration: TextDecoration.underline,
|
|
|
+ color: Color.fromRGBO(119, 97, 255, 1.0),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
-
|
|
|
-
|
|
|
- const SizedBox(height: 20),
|
|
|
- const Text(
|
|
|
- 'or',
|
|
|
- style: TextStyle(
|
|
|
- fontFamily: 'Poppins',
|
|
|
- fontSize: 17,
|
|
|
- fontWeight: FontWeight.bold,
|
|
|
- color: Color.fromRGBO(165, 165, 165, 1),
|
|
|
- ),
|
|
|
- ),
|
|
|
- const SizedBox(height: 20),
|
|
|
- TextButton(
|
|
|
- onPressed: () {
|
|
|
- // Handle login as a user button press
|
|
|
- Navigator.push( context,
|
|
|
- MaterialPageRoute(builder: (context) => driverMain()),
|
|
|
- );
|
|
|
- },
|
|
|
- child: const Text(
|
|
|
- 'Login as a Driver',
|
|
|
- style: TextStyle(
|
|
|
- fontFamily: 'Poppins',
|
|
|
- fontSize: 17,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- decoration: TextDecoration.underline,
|
|
|
- color: Color.fromRGBO(119, 97, 255, 1.0),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ],
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- )
|
|
|
-
|
|
|
- );
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ));
|
|
|
}
|
|
|
-}
|
|
|
+}
|