From 9da18101432938e1b3fd831d68d904d2ebbb8fdd Mon Sep 17 00:00:00 2001 From: Sneha Date: Fri, 22 Aug 2025 14:40:27 +0530 Subject: [PATCH] signup screen --- images/business.png | Bin 0 -> 1455 bytes images/maps.png | Bin 0 -> 2865 bytes lib/common/settings.dart | 4 +- lib/login/login.dart | 341 +++++++++++++---------------- lib/login/login_signup_screen.dart | 134 ++++++------ lib/login/starting_screen.dart | 120 +++++----- lib/{login => signup}/signup.dart | 3 +- 7 files changed, 280 insertions(+), 322 deletions(-) create mode 100644 images/business.png create mode 100644 images/maps.png rename lib/{login => signup}/signup.dart (98%) diff --git a/images/business.png b/images/business.png new file mode 100644 index 0000000000000000000000000000000000000000..7657ca452ee52b207eec37a96bdde379f21832b6 GIT binary patch literal 1455 zcmV;g1yK5lP)@~0drDELIAGL9O(c600d`2O+f$vv5yPyR#0~b?h5R#!0J;kez3BF z=%IP3B2Lc{B|y1oX2=meq;x(&uq_S`;q%YsaISzL2!bF8f*=U{MgRxW__i0~Xh3G3 zDdZ<)tVh2`*lE;60n-4%B!~J9nBSz?cN0{kk^pJ^XB43O3*Fp@K&Z@Bmg?rH#K3|uUtAbkk{-cPW%JTjF0AcBF?T@jyRYUOvCZB)I^ z0tjx10G_c3L+fX)dz+&MZn&=KRetEw&;F41UGQE4R{c!N?(J37aL(WHH8@hYeOJ5- z5F+F^#V>_x*8M3y?Yq)|HXuCPbY)p(G~B)$O>czj?t%5*!|VPY;82hL9RFj?fo->M z!dZY2!8s~2x2OWzZr}WTN2n+C4An_Y3EFPogtGt~-c^|mz+=odeI;$TZ(=Kra0i_v zEm0qG+D?hw({}qhwiN~Ss4l&>$w|e$qTm|kB9OM*--vNc_*HzTPy$s<-5UY_jnnM= zMSuD7ZSy$Y-tfF4a?E7)9shojJ$*usdjm)6 zw(p9w06Dt!kEmZu-GpGuj^TTg?3;Mg;C7Ndjhk*CjyQ**t1yeF?S+_etlTg9*?Bt4 zYF=p)(HjUc*BJra_~ zdrxRoYe3_<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~-t(+Tv90pR@xJzal35L`;Z1@iZ`SoAIBfaRb9!kEQ!ZNUS8u+j*>_ zSM;7`(I`iAvN&MGb=%b>B*uWKuo8N9?ik{^bh}WRV57^2O4*F%Z%nfFCJ_}h!qwG( zyPJRA;@G07ABoHK!QXuOmp}hNHe{x)A-@M(h+h~7NBe^7El3ct09m-hT`UBbB}&TYE6JXR82HhKTs|Ee{^7I7hoWq{0A6ab*@vkP@H2 zC9RXZQc*!8M5j^(!8KSk!A?sZNr<1s85bs`+M37{x7jYln1&=siO+LSyV*GP-cYVW z@%fuJW7A}UjQB(t#NBBeDm9hnTt57iw~^Y6O@j$i;`3bV^>hzx{rIjaf`YFS`Ttf) zxuk4@3-M{?w_r+`DgzkPWJ1=7KX~U1FbyWm1Mvs%oe|Px!n_cF@a`ER4JOPJ@dxjp zF&vmM@z7Ms;jxTa6Q42jJz`7%iHn+})jjEYZjM&|2#KbnT|pJH&eqoEdm@WXJL4A{ zTbqUJtE*3T!Si`TV3C1kWQF*QOfY~UVFHx|*QvD0_gwP7hi8}m11yjw;xlG$1MWg% z6ZrUGrMxxU { super.initState(); } - Future onWillPop() async { - final shouldPop = await showDialog(context: context, builder: (context) { - return AlertDialog( - title: const Text('Do you want to exit app?', - style: TextStyle( - color: primaryColor, - fontSize: 20, - )), - actionsAlignment: MainAxisAlignment.spaceBetween, - actions: [ - TextButton( - onPressed: () { - SystemNavigator.pop(); - }, - child: const Text('Yes', - style: TextStyle( - color: primaryColor, - fontSize: 20, - )), - ), - TextButton( - onPressed: () { - Navigator.of(context).pop(false); - }, - child: const Text('No', - style: TextStyle( - color: primaryColor, - fontSize: 20, - )), - ), - ], - ); - }, - ); - return shouldPop!; - } - @override Widget build(BuildContext context) { - String lastInputValue=""; - return WillPopScope( - onWillPop: () async => onWillPop(), - child: Scaffold( - backgroundColor: Colors.white, - body: Stack( - children: [ - /*Container( + return Scaffold( + backgroundColor: Colors.white, + body: Stack( + children: [ + /*Container( decoration: const BoxDecoration( image: DecorationImage(image: AssetImage("images/backgroundimage.png"), fit: BoxFit.cover,), ), ),*/ - GestureDetector( - onTap: () { - FocusManager.instance.primaryFocus?.unfocus(); - }, - child: SafeArea( - child: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.fromLTRB(24, 0, 24, 0), - child: Column( - - children: [ - Image( - image: const AssetImage('images/login_logo.png'), - height: MediaQuery.of(context).size.height * .30, - width:MediaQuery.of(context).size.width * .30, + GestureDetector( + onTap: () { + FocusManager.instance.primaryFocus?.unfocus(); + }, + child: SafeArea( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.fromLTRB(24, 0, 24, 0), + child: Column( + + children: [ + Image( + image: const AssetImage('images/login_logo.png'), + height: MediaQuery.of(context).size.height * .30, + width:MediaQuery.of(context).size.width * .30, + ), + + SizedBox(height:MediaQuery.of(context).size.height * .04,), + SizedBox(height:MediaQuery.of(context).size.height * .024,), + Container( + child: TextFormField( + controller: mobileNumberController, + keyboardType: TextInputType.number, + textCapitalization: TextCapitalization.sentences, + maxLength: 10, + decoration: textFormFieldDecoration(Icons.phone,'Mobile Number'), + style:fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400), + cursorColor: Color(0XFF8270DB), + + //TextStyle(color: Colors.black,fontWeight: FontWeight.bold), ), - - SizedBox(height:MediaQuery.of(context).size.height * .04,), - SizedBox(height:MediaQuery.of(context).size.height * .024,), - Container( - child: TextFormField( - controller: mobileNumberController, - keyboardType: TextInputType.number, - textCapitalization: TextCapitalization.sentences, - maxLength: 10, - decoration: textFormFieldDecoration(Icons.phone,'Mobile Number'), - style:fontTextStyle(14,Color(0XFF101214),FontWeight.w400), - cursorColor: Color(0XFF1D7AFC), - - //TextStyle(color: Colors.black,fontWeight: FontWeight.bold), - ), - ), - SizedBox(height:MediaQuery.of(context).size.height * .016,), - - Container( - child: TextFormField( - cursorColor:Color(0XFF1D7AFC), - obscureText: isObscureText, - obscuringCharacter: '*', - controller: passwordController, - decoration: InputDecoration( - filled: false, - fillColor: Colors.white, - labelText: 'Password', - //prefixIcon: const Icon(Icons.lock, color: Colors.white,), - labelStyle: fontTextStyle(14,Color(0XFF7E7F80),FontWeight.w400), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(4.0), - borderSide: BorderSide(color: greyColor, - width: 1, )), - focusedBorder: OutlineInputBorder( + ), + SizedBox(height:MediaQuery.of(context).size.height * .016,), + + Container( + child: TextFormField( + cursorColor:Color(0XFF8270DB), + obscureText: isObscureText, + obscuringCharacter: '*', + controller: passwordController, + decoration: InputDecoration( + filled: false, + fillColor: Colors.white, + labelText: 'Password', + //prefixIcon: const Icon(Icons.lock, color: Colors.white,), + labelStyle: fontTextStyle(14,Color(0XFF7E7F80),FontWeight.w400), + border: OutlineInputBorder( borderRadius: BorderRadius.circular(4.0), - borderSide: BorderSide(color: Color(0XFF1D7AFC),width: 2,), - ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(4.0), - borderSide: BorderSide(color: greyColor), - ), + borderSide: BorderSide(color: greyColor, + width: 1, )), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + borderSide: BorderSide(color: Color(0XFF8270DB),width: 2,), + ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(4.0), + borderSide: BorderSide(color: greyColor), + ), - suffixIcon: IconButton( - icon: isObscureText==true?Image.asset('images/eye_icon.png',color: Color(0XFF7E7F80),width: 30,height: 30,):Image.asset('images/open_eye.png',color:Color(0XFF7E7F80),width: 30,height: 30,), - /* Icon( + suffixIcon: IconButton( + icon: isObscureText==true?Image.asset('images/eye_icon.png',color: Color(0XFF7E7F80),width: 30,height: 30,):Image.asset('images/open_eye.png',color:Color(0XFF7E7F80),width: 30,height: 30,), + /* Icon( icon:Image.asset('assets/your_image.png'), color: isObscureText==true?greyColor:primaryColor, ),*/ - onPressed: () { - - print("show password"); - setState(() { - isObscureText = !isObscureText; - }); - }, - ), + onPressed: () { + print("show password"); + setState(() { + isObscureText = !isObscureText; + }); + }, ), - style: fontTextStyle(14,Color(0XFF101214),FontWeight.w400), ), - ), + style: fontTextStyle(14,Color(0XFF2A2A2A),FontWeight.w400), - SizedBox(height:MediaQuery.of(context).size.height * .016,), - Align( - alignment: Alignment.bottomLeft, - child:GestureDetector( - onTap: (){ - /* Navigator.push( + ), + ), + + SizedBox(height:MediaQuery.of(context).size.height * .016,), + Align( + alignment: Alignment.bottomLeft, + child:GestureDetector( + onTap: (){ + /* Navigator.push( context, MaterialPageRoute(builder: (context) => ForgotpasswordNew()), );*/ - }, - child: Text( - 'Forgot Password?', - style: fontTextStyle(12,Color(0XFF1D7AFC),FontWeight.w600), + }, + child: Text( + 'Forgot Password?', + style: fontTextStyle(12,Color(0XFF1D7AFC),FontWeight.w600), + ), + ) + ), + SizedBox(height:MediaQuery.of(context).size.height * .024,), + Container( + width:double.infinity, + height: MediaQuery.of(context).size.height * .06, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, + backgroundColor: primaryColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12.0), // Customize the radius ), - ) - ), - SizedBox(height:MediaQuery.of(context).size.height * .024,), - Container( - width:double.infinity, - height: MediaQuery.of(context).size.height * .06, - child: ElevatedButton( - style: ElevatedButton.styleFrom( - foregroundColor: Colors.white, - backgroundColor: primaryColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12.0), // Customize the radius - ), - ), - onPressed: () async{ - - if (mobileNumberController.text != ''&& - passwordController.text != '') { - AppSettings.preLoaderDialog(context); - - bool isOnline = await AppSettings.internetConnectivity(); + ), + onPressed: () async{ - if(isOnline){ - SharedPreferences prefs = await SharedPreferences.getInstance(); - String? fcmToken = prefs.getString('fcmToken'); - var payload = new Map(); - payload["phone"] = mobileNumberController.text.toString(); - payload["password"] = passwordController.text.toString(); - payload["fcmIds"] = [fcmToken]; + if (mobileNumberController.text != ''&& + passwordController.text != '') { + AppSettings.preLoaderDialog(context); - bool signinStatus = await AppSettings.login(payload); + bool isOnline = await AppSettings.internetConnectivity(); - try{ - if (signinStatus) { - Navigator.of(context,rootNavigator: true).pop(); - String token = AppSettings.accessToken; - await storage.write(key: 'authToken', value: token); + if(isOnline){ + SharedPreferences prefs = await SharedPreferences.getInstance(); + String? fcmToken = prefs.getString('fcmToken'); + var payload = new Map(); + payload["phone"] = mobileNumberController.text.toString(); + payload["password"] = passwordController.text.toString(); + payload["fcmIds"] = [fcmToken]; - print('Token saved: $token'); - await Navigator.push( - context, - MaterialPageRoute( - builder: (context) => const DashboardScreen()), - ); - AppSettings.longSuccessToast("Logged in Successfully"); - mobileNumberController.text=''; - passwordController.text=''; + bool signinStatus = await AppSettings.login(payload); - } else { - Navigator.of(context,rootNavigator: true).pop(); - AppSettings.longFailedToast("Invalid details"); - } - } - catch(exception){ + try{ + if (signinStatus) { Navigator.of(context,rootNavigator: true).pop(); - print(exception); + String token = AppSettings.accessToken; + await storage.write(key: 'authToken', value: token); + + print('Token saved: $token'); + await Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const DashboardScreen()), + ); + AppSettings.longSuccessToast("Logged in Successfully"); + mobileNumberController.text=''; + passwordController.text=''; + + } else { + Navigator.of(context,rootNavigator: true).pop(); + AppSettings.longFailedToast("Invalid details"); } } - else{ + catch(exception){ Navigator.of(context,rootNavigator: true).pop(); - AppSettings.longFailedToast("Please Check internet"); + print(exception); } - - } else{ - - AppSettings.longFailedToast("Please enter valid details"); + Navigator.of(context,rootNavigator: true).pop(); + AppSettings.longFailedToast("Please Check internet"); } - }, - child: Text('Login',style: fontTextStyle(12,Colors.white,FontWeight.w600),), - )), - ], - ), - ) - )), - ), - ], - ) - ), + + } + else{ + + AppSettings.longFailedToast("Please enter valid details"); + } + + }, + child: Text('Login',style: fontTextStyle(12,Colors.white,FontWeight.w600),), + )), + ], + ), + ) + )), + ), + ], + ) ); } } diff --git a/lib/login/login_signup_screen.dart b/lib/login/login_signup_screen.dart index 6e1b377..11046cc 100644 --- a/lib/login/login_signup_screen.dart +++ b/lib/login/login_signup_screen.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:supplier_new/common/settings.dart'; import 'package:supplier_new/login/login.dart'; -import 'package:supplier_new/login/signup.dart'; +import 'package:supplier_new/signup/signup.dart'; class LoginSignUpScreen extends StatefulWidget { const LoginSignUpScreen({super.key}); @@ -13,90 +13,88 @@ class LoginSignUpScreen extends StatefulWidget { class _LoginSignUpScreenState extends State { @override Widget build(BuildContext context) { - return SafeArea( - child: Scaffold( - body: Padding( - padding: EdgeInsets.all(24), - child: Column( - children: [ - SizedBox(height: MediaQuery.of(context).size.height * .2), - Center( - child: Text("AQUICK SUPPLIER", - style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)), + return Scaffold( + body: Padding( + padding: EdgeInsets.all(24), + child: Column( + children: [ + SizedBox(height: MediaQuery.of(context).size.height * .2), + Center( + child: Text("AQUICK SUPPLIER", + style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)), + ), + SizedBox(height: MediaQuery.of(context).size.height * .05), + CircleAvatar(radius: 80, backgroundColor: Color(0XFFC9DFFE)), + SizedBox(height: MediaQuery.of(context).size.height * .05), + Center( + child: Text( + "Welcome to Aquick Supplier", + style: fontTextStyle(20, Color(0XFF343637), FontWeight.w700), ), - SizedBox(height: MediaQuery.of(context).size.height * .05), - CircleAvatar(radius: 80, backgroundColor: Color(0XFFC9DFFE)), - SizedBox(height: MediaQuery.of(context).size.height * .05), - Center( - child: Text( - "Welcome to Aquick Supplier", - style: fontTextStyle(20, Color(0XFF343637), FontWeight.w700), - ), + ), + SizedBox(height: MediaQuery.of(context).size.height * .012), + Center( + child: Text( + "Sign up or login to be listed as a supplier, start deliveries and track orders", + style: fontTextStyle(12, Color(0XFF7E7F80), FontWeight.w400), + textAlign: TextAlign.center, // Keeps text centered in multiple lines ), - SizedBox(height: MediaQuery.of(context).size.height * .012), - Center( - child: Text( - "Sign up or login to be listed as a supplier, start deliveries and track orders", - style: fontTextStyle(12, Color(0XFF7E7F80), FontWeight.w400), - textAlign: TextAlign.center, // Keeps text centered in multiple lines - ), - ) - , - SizedBox(height: MediaQuery.of(context).size.height * .04), - Container( - width:double.infinity, - height: MediaQuery.of(context).size.height * .06, - child: ElevatedButton( - style: ElevatedButton.styleFrom( - foregroundColor: Colors.white, - backgroundColor: primaryColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(24.0), // Customize the radius - ), - ), - onPressed: () async{ - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => Login()), - ); - }, - child: Text('Login',style: fontTextStyle(14,Colors.white,FontWeight.w500),), - )), - SizedBox(height: MediaQuery.of(context).size.height * .012), - Container( - width: double.infinity, + ) + , + SizedBox(height: MediaQuery.of(context).size.height * .04), + Container( + width:double.infinity, height: MediaQuery.of(context).size.height * .06, child: ElevatedButton( style: ElevatedButton.styleFrom( - foregroundColor: Color(0XFF757575), - backgroundColor: Colors.white, + foregroundColor: Colors.white, + backgroundColor: primaryColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(24.0), // Customize the radius - side: BorderSide( - color: Color(0XFF757575), // Border color - width: 1, // Border width - ), ), ), - onPressed: () async { + onPressed: () async{ Navigator.push( context, MaterialPageRoute( - builder: (context) => SignUp()), + builder: (context) => Login()), ); }, - child: Text( - 'Sign up', - style: fontTextStyle(12, Color(0XFF757575), FontWeight.w500), + child: Text('Login',style: fontTextStyle(14,Colors.white,FontWeight.w500),), + )), + SizedBox(height: MediaQuery.of(context).size.height * .012), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * .06, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + foregroundColor: Color(0XFF757575), + backgroundColor: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(24.0), // Customize the radius + side: BorderSide( + color: Color(0XFF757575), // Border color + width: 1, // Border width + ), ), ), - ) + onPressed: () async { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => SignUp()), + ); + }, + child: Text( + 'Sign up', + style: fontTextStyle(12, Color(0XFF757575), FontWeight.w500), + ), + ), + ) - ], - ), - ) - ), + ], + ), + ) ); } } diff --git a/lib/login/starting_screen.dart b/lib/login/starting_screen.dart index 740ed57..8c78c0f 100644 --- a/lib/login/starting_screen.dart +++ b/lib/login/starting_screen.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:supplier_new/common/settings.dart'; import 'package:supplier_new/login/login_signup_screen.dart'; @@ -12,78 +13,77 @@ class StartingScreen extends StatefulWidget { class _StartingScreenState extends State { @override Widget build(BuildContext context) { - return SafeArea( - child: Scaffold( - body: Padding( - padding: EdgeInsets.all(24), - child: Column( - children: [ - SizedBox(height: MediaQuery.of(context).size.height * .2), - Center( - child: Text("AQUICK SUPPLIER", - style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)), - ), - SizedBox(height: MediaQuery.of(context).size.height * .05), - CircleAvatar(radius: 80, backgroundColor: Color(0XFFC9DFFE)), - SizedBox(height: MediaQuery.of(context).size.height * .05), - Center( - child: Text("Want to be a supplier on Aquick Tankers?", - style: fontTextStyle(16, Color(0XFF343637), FontWeight.w600)), - ), - SizedBox(height: MediaQuery.of(context).size.height * .04), - Container( + + return Scaffold( + body: Padding( + padding: EdgeInsets.all(24), + child: Column( + children: [ + SizedBox(height: MediaQuery.of(context).size.height * .2), + Center( + child: Text("AQUICK SUPPLIER", + style: fontTextStyle(20, Color(0XFF515253), FontWeight.w800)), + ), + SizedBox(height: MediaQuery.of(context).size.height * .05), + CircleAvatar(radius: 80, backgroundColor: Color(0XFFC9DFFE)), + SizedBox(height: MediaQuery.of(context).size.height * .05), + Center( + child: Text("Want to be a supplier on Aquick Tankers?", + style: fontTextStyle(16, Color(0XFF343637), FontWeight.w600)), + ), + SizedBox(height: MediaQuery.of(context).size.height * .04), + Container( + width: double.infinity, + height: MediaQuery.of(context).size.height * .06, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + foregroundColor: Colors.white, + backgroundColor: primaryColor, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(24.0), // Customize the radius + ), + ), + onPressed: () async { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => LoginSignUpScreen()), + ); + }, + child: Text( + 'Yes', + style: fontTextStyle(14, Colors.white, FontWeight.w500), + ), + )), + SizedBox(height: MediaQuery.of(context).size.height * .012), + Container( width: double.infinity, height: MediaQuery.of(context).size.height * .06, child: ElevatedButton( style: ElevatedButton.styleFrom( - foregroundColor: Colors.white, - backgroundColor: primaryColor, + foregroundColor: Color(0XFF757575), + backgroundColor: Colors.white, shape: RoundedRectangleBorder( borderRadius: - BorderRadius.circular(24.0), // Customize the radius + BorderRadius.circular(24.0), // Customize the radius + side: BorderSide( + color: Color(0XFF757575), // Border color + width: 1, // Border width + ), ), ), onPressed: () async { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => LoginSignUpScreen()), - ); + // Your onPressed logic }, child: Text( - 'Yes', - style: fontTextStyle(14, Colors.white, FontWeight.w500), - ), - )), - SizedBox(height: MediaQuery.of(context).size.height * .012), - Container( - width: double.infinity, - height: MediaQuery.of(context).size.height * .06, - child: ElevatedButton( - style: ElevatedButton.styleFrom( - foregroundColor: Color(0XFF757575), - backgroundColor: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(24.0), // Customize the radius - side: BorderSide( - color: Color(0XFF757575), // Border color - width: 1, // Border width - ), + 'No, I want to buy water', + style: fontTextStyle(12, Color(0XFF757575), FontWeight.w500), ), ), - onPressed: () async { - // Your onPressed logic - }, - child: Text( - 'No, I want to buy water', - style: fontTextStyle(12, Color(0XFF757575), FontWeight.w500), - ), - ), - ) - ], - ), - )), - ); + ) + ], + ), + )); } } diff --git a/lib/login/signup.dart b/lib/signup/signup.dart similarity index 98% rename from lib/login/signup.dart rename to lib/signup/signup.dart index 8d60fee..ddbdf4f 100644 --- a/lib/login/signup.dart +++ b/lib/signup/signup.dart @@ -88,9 +88,10 @@ class _SignUpState extends State { child: Row( children: [ Image.asset( - 'images/Maps.png', + 'images/maps.png', width: 20, height: 20, + color: primaryColor, ), const SizedBox(width: 8), Text(