Commit 528df0d2 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

14-05-2025 By Sai Srinivas

All UI Adjustments and Font Sizes
parent fd946558
...@@ -15,14 +15,18 @@ PreferredSizeWidget appbar(BuildContext context, title) { ...@@ -15,14 +15,18 @@ PreferredSizeWidget appbar(BuildContext context, title) {
onTap: () => Navigator.pop(context, true), onTap: () => Navigator.pop(context, true),
child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25), child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25),
), ),
Text( InkResponse(
onTap: () => Navigator.pop(context,true),
child: Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
height: 1.1, height: 1.1,
fontFamily: "JakartaSemiBold",
color: AppColors.semi_black, color: AppColors.semi_black,
), ),
), ),
),
], ],
), ),
), ),
...@@ -47,14 +51,18 @@ PreferredSizeWidget appbar2(BuildContext context, title,widget) { ...@@ -47,14 +51,18 @@ PreferredSizeWidget appbar2(BuildContext context, title,widget) {
onTap: () => Navigator.pop(context, true), onTap: () => Navigator.pop(context, true),
child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25), child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25),
), ),
Text( InkResponse(
onTap: () => Navigator.pop(context, true),
child: Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
height: 1.1, height: 1.1,
fontFamily: "JakartaSemiBold",
color: AppColors.semi_black, color: AppColors.semi_black,
), ),
), ),
),
Spacer(), Spacer(),
widget widget
], ],
...@@ -67,3 +75,16 @@ PreferredSizeWidget appbar2(BuildContext context, title,widget) { ...@@ -67,3 +75,16 @@ PreferredSizeWidget appbar2(BuildContext context, title,widget) {
), ),
); );
} }
Future<bool> onBackPressed(BuildContext context) async {
Navigator.pop(context, true);
return true;
}
Widget Emptywidget(BuildContext context){
return SizedBox(
height: MediaQuery.of(context).size.height*0.8,
child: Center(
child: Text("No Data Available")),
);
}
\ No newline at end of file
...@@ -21,7 +21,7 @@ import 'package:generp/Notifiers/PendingComplaintsProvider.dart'; ...@@ -21,7 +21,7 @@ import 'package:generp/Notifiers/PendingComplaintsProvider.dart';
import 'package:generp/Notifiers/ProfileNotifier.dart'; import 'package:generp/Notifiers/ProfileNotifier.dart';
import 'package:generp/Notifiers/ServiceEngineerDashboardProvider.dart'; import 'package:generp/Notifiers/ServiceEngineerDashboardProvider.dart';
import 'package:generp/Notifiers/TodayMontlyVisitsProvider.dart'; import 'package:generp/Notifiers/TodayMontlyVisitsProvider.dart';
import 'package:generp/Notifiers/UpdatePasswordProvider'; import 'package:generp/Notifiers/UpdatePasswordProvider.dart';
import 'package:generp/Notifiers/VisitDetailsProvider.dart'; import 'package:generp/Notifiers/VisitDetailsProvider.dart';
import 'package:generp/Notifiers/loginNotifier.dart'; import 'package:generp/Notifiers/loginNotifier.dart';
import 'package:generp/Notifiers/scanLoginProvider.dart'; import 'package:generp/Notifiers/scanLoginProvider.dart';
...@@ -82,18 +82,18 @@ void main() async { ...@@ -82,18 +82,18 @@ void main() async {
} }
} }
if (Platform.isAndroid) { // if (Platform.isAndroid) {
await Firebase.initializeApp( // await Firebase.initializeApp(
options: FirebaseOptions( // options: FirebaseOptions(
apiKey: "AIzaSyBmkmKdYfBt2n5QRlmZJ9MV_Amh9xR3UOY", // apiKey: "AIzaSyBmkmKdYfBt2n5QRlmZJ9MV_Amh9xR3UOY",
appId: "1:329382566569:android:26dc8519537b04deff67b8", // appId: "1:329382566569:android:26dc8519537b04deff67b8",
messagingSenderId: "329382566569", // messagingSenderId: "329382566569",
projectId: "generp-fe09d", // projectId: "generp-fe09d",
), // ),
); // );
} else if (Platform.isIOS) { // } else if (Platform.isIOS) {
await Firebase.initializeApp(); await Firebase.initializeApp();
} // }
FirebaseMessaging messaging = FirebaseMessaging.instance; FirebaseMessaging messaging = FirebaseMessaging.instance;
...@@ -149,7 +149,7 @@ void main() async { ...@@ -149,7 +149,7 @@ void main() async {
sound: true, sound: true,
); );
FirebaseMessaging.instance.getToken().then((value) { await FirebaseMessaging.instance.getToken().then((value) {
String? token = value; String? token = value;
if (kDebugMode) { if (kDebugMode) {
print("fbstoken:{$token}"); print("fbstoken:{$token}");
...@@ -209,7 +209,7 @@ class MyApp extends StatelessWidget { ...@@ -209,7 +209,7 @@ class MyApp extends StatelessWidget {
return MaterialApp( return MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
theme: ThemeData( theme: ThemeData(
fontFamily: 'Lexend', fontFamily: 'JakartaRegular',
splashColor: Colors.transparent, splashColor: Colors.transparent,
highlightColor: Colors.transparent, highlightColor: Colors.transparent,
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
......
This diff is collapsed.
...@@ -48,29 +48,29 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> { ...@@ -48,29 +48,29 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
return Consumer<CheckInOutProvider>( return Consumer<CheckInOutProvider>(
builder: (context, provider, child) { builder: (context, provider, child) {
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, widget.getAttendanceStatus==0? "Check In":"Check Out"), appBar: appbar(context, widget.getAttendanceStatus==0? "Check In":"Check Out"),
body:Container( body:Container(
child: SafeArea( child: SafeArea(
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
child: ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0),
),
child: Stack( child: Stack(
children: [ children: [
GoogleMap( GoogleMap(
myLocationEnabled: true, myLocationEnabled: true,
zoomGesturesEnabled: true, zoomGesturesEnabled: true,
scrollGesturesEnabled: false,
initialCameraPosition: CameraPosition( initialCameraPosition: CameraPosition(
target: provider.currentLocationLatLng ?? target: provider.currentLocationLatLng ??
provider.startLocation, provider.startLocation,
zoom: 20.0, zoom: 20.0,
), ),
markers: provider.markers.toSet(), markers: provider.markers.toSet(),
myLocationButtonEnabled: true,
mapType: MapType.normal, mapType: MapType.normal,
onMapCreated: (controller) { onMapCreated: (controller) {
provider.mapController = controller; provider.mapController = controller;
...@@ -99,16 +99,30 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> { ...@@ -99,16 +99,30 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 25), SizedBox(height: 25),
Padding( Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 20.0), horizontal: 20.0),
child: Text( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Share Your Details",
style: TextStyle(
color: AppColors.app_blue,
fontFamily: "JakartaSemiBold"
),
),
SizedBox(height: 10,),
Text(
"Location", "Location",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w400, fontFamily: "JakartaMedium",
color: Colors.grey, color: AppColors.semi_black,
), ),
), ),
],
),
), ),
SizedBox(height: 5), SizedBox(height: 5),
Padding( Padding(
...@@ -121,7 +135,7 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> { ...@@ -121,7 +135,7 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: borderRadius:
BorderRadius.circular(25), BorderRadius.circular(14),
), ),
child: Padding( child: Padding(
padding: padding:
...@@ -138,7 +152,8 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> { ...@@ -138,7 +152,8 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
"Enter Check ${widget.getAttendanceStatus==0?"In":"Out"} Location", "Enter Check ${widget.getAttendanceStatus==0?"In":"Out"} Location",
hintStyle: TextStyle( hintStyle: TextStyle(
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontSize: 14 fontSize: 14,
color: Color(0xFF818181)
), ),
enabledBorder: enabledBorder:
InputBorder.none, InputBorder.none,
...@@ -201,12 +216,13 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> { ...@@ -201,12 +216,13 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.app_blue, color: AppColors.app_blue,
borderRadius: borderRadius:
BorderRadius.circular(30.0), BorderRadius.circular(15.0),
), ),
child: Text( child: Text(
widget.getAttendanceStatus==0? "Check In":"Check Out", widget.getAttendanceStatus==0? "Check In":"Check Out",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontFamily: "JakartaMedium",
fontSize: 16,
color: Colors.white color: Colors.white
), ),
), ),
...@@ -220,11 +236,11 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> { ...@@ -220,11 +236,11 @@ class _CheckInOutScreenState extends State<CheckInOutScreen> {
], ],
), ),
), ),
),
], ],
), ),
), ),
), ),
),
); );
}, },
); );
......
This diff is collapsed.
...@@ -108,13 +108,56 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -108,13 +108,56 @@ class _LoginScreenState extends State<LoginScreen>
_scrollController.dispose(); _scrollController.dispose();
super.dispose(); super.dispose();
} }
Future<bool> onBackPressed() async {
return await showDialog<bool>(
context: context,
builder:
(context) => AlertDialog(
title: const Text('Are you sure?'),
content: const Text('Do you want to exit the App'),
actions: [
TextButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.white),
overlayColor: MaterialStateProperty.all(Colors.white),
),
onPressed: () => Navigator.of(context).pop(false),
child: Text(
"NO",
style: TextStyle(fontWeight: FontWeight.w500),
),
),
const SizedBox(height: 16),
TextButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.white),
overlayColor: MaterialStateProperty.all(Colors.white70),
),
onPressed:
() => SystemChannels.platform.invokeMethod(
'SystemNavigator.pop',
),
child: Text(
"YES",
style: TextStyle(fontWeight: FontWeight.w500),
),
),
],
elevation: 30.0,
),
barrierDismissible: false,
) ??
false;
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var loginProv = Provider.of<Loginnotifier>(context,listen: true); var loginProv = Provider.of<Loginnotifier>(context,listen: true);
double screenWidth = MediaQuery.of(context).size.width; double screenWidth = MediaQuery.of(context).size.width;
double screenHeight = MediaQuery.of(context).size.height; double screenHeight = MediaQuery.of(context).size.height;
return Scaffold( return WillPopScope(
onWillPop: onBackPressed,
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: KeyboardVisibilityProvider( body: KeyboardVisibilityProvider(
controller: _keyboardVisibilityController, controller: _keyboardVisibilityController,
...@@ -127,7 +170,7 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -127,7 +170,7 @@ class _LoginScreenState extends State<LoginScreen>
itemBuilder: (context, index) { itemBuilder: (context, index) {
int logoIndex = index % logos.length; int logoIndex = index % logos.length;
return Padding( return Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(3.0),
child: CustomGridRow(logos: logos, logoIndex: logoIndex), child: CustomGridRow(logos: logos, logoIndex: logoIndex),
); );
}, },
...@@ -194,14 +237,7 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -194,14 +237,7 @@ class _LoginScreenState extends State<LoginScreen>
const SizedBox(width: 10), const SizedBox(width: 10),
Expanded( Expanded(
flex: 3, flex: 3,
child: Text( child: Image.asset("assets/images/gen_logo_grad.png"),
"GEN ERP",
style: TextStyle(
fontFamily: 'LexendSemiBold',
color: AppColors.ERP_text_color,
fontSize: 25,
),
),
), ),
Expanded( Expanded(
flex: 1, flex: 1,
...@@ -218,31 +254,28 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -218,31 +254,28 @@ class _LoginScreenState extends State<LoginScreen>
"assets/images/gen_logo.png", "assets/images/gen_logo.png",
), ),
), ),
Text( Image.asset("assets/images/gen_logo_grad.png",width: 150,),
"GEN ERP",
style: TextStyle(
fontFamily: 'LexendSemiBold',
color: AppColors.ERP_text_color,
fontSize: 25,
),
),
], ],
), ),
), ),
SizedBox(height: 10,),
Text( Text(
"Login to enter", "Login to enter",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
fontFamily: "JakartaMedium",
color: AppColors.app_blue, color: AppColors.app_blue,
), ),
), ),
Container( Container(
padding: EdgeInsets.only(left: 10,bottom: 5),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Text( child: Text(
"Enter Email", "Email ID",
style: TextStyle( style: TextStyle(
color: AppColors.semi_black, color: AppColors.semi_black,
fontSize: 12, fontFamily: "JakartaMedium",
fontSize: 14,
), ),
), ),
), ),
...@@ -251,7 +284,7 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -251,7 +284,7 @@ class _LoginScreenState extends State<LoginScreen>
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(14),
border: _emailFocusNode.hasFocus?Border.all(color: AppColors.app_blue,width: 0.5):null border: _emailFocusNode.hasFocus?Border.all(color: AppColors.app_blue,width: 0.5):null
), ),
// alignment: Alignment.center, // alignment: Alignment.center,
...@@ -281,12 +314,13 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -281,12 +314,13 @@ class _LoginScreenState extends State<LoginScreen>
isDense: true, isDense: true,
hintStyle: TextStyle( hintStyle: TextStyle(
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontSize: 14 fontSize: 14,
color: Color(0xFF818181)
), ),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0), //contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
hintText: 'Enter Email', hintText: 'Enter Your Email',
), ),
), ),
), ),
...@@ -306,15 +340,17 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -306,15 +340,17 @@ class _LoginScreenState extends State<LoginScreen>
), ),
), ),
] else ...[ ] else ...[
SizedBox(height: 15.0), SizedBox(height: 10.0),
], ],
Container( Container(
padding: EdgeInsets.only(left: 10,bottom: 5),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Text( child: Text(
"Enter Password", "Password",
style: TextStyle( style: TextStyle(
color: AppColors.semi_black, color: AppColors.semi_black,
fontSize: 12, fontFamily: "JakartaMedium",
fontSize: 14,
), ),
), ),
), ),
...@@ -323,7 +359,7 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -323,7 +359,7 @@ class _LoginScreenState extends State<LoginScreen>
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(14),
border: _passwordFocusNode.hasFocus?Border.all(color: AppColors.app_blue,width: 0.5):null border: _passwordFocusNode.hasFocus?Border.all(color: AppColors.app_blue,width: 0.5):null
), ),
// alignment: Alignment.center, // alignment: Alignment.center,
...@@ -341,7 +377,7 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -341,7 +377,7 @@ class _LoginScreenState extends State<LoginScreen>
obscureText: !loginProv.pwdVisible, obscureText: !loginProv.pwdVisible,
keyboardType: TextInputType.visiblePassword, keyboardType: TextInputType.visiblePassword,
style: TextStyle( style: TextStyle(
fontSize: 14 fontSize: 14,
), ),
onChanged: (value) { onChanged: (value) {
loginProv.updatePassword(password.text); loginProv.updatePassword(password.text);
...@@ -371,6 +407,7 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -371,6 +407,7 @@ class _LoginScreenState extends State<LoginScreen>
), ),
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 14, fontSize: 14,
color: Color(0xFF818181),
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
isDense: true, isDense: true,
...@@ -419,13 +456,14 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -419,13 +456,14 @@ class _LoginScreenState extends State<LoginScreen>
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: loginProv.isButtonEnabled?AppColors.app_blue:AppColors.button_disabled, //1487C9 color: loginProv.isButtonEnabled?AppColors.app_blue:AppColors.button_disabled, //1487C9
borderRadius: BorderRadius.circular(30.0), borderRadius: BorderRadius.circular(15.0),
), ),
child: Center( child: Center(
child: Text( child: Text(
"Login", "Login",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white,
fontFamily: "JakartaRegular",),
), ),
), ),
), ),
...@@ -479,6 +517,7 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -479,6 +517,7 @@ class _LoginScreenState extends State<LoginScreen>
Text("Device ID", Text("Device ID",
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontFamily: "JakartaMedium",
color: AppColors.app_blue color: AppColors.app_blue
),), ),),
SizedBox(height: 15,), SizedBox(height: 15,),
...@@ -574,6 +613,7 @@ class _LoginScreenState extends State<LoginScreen> ...@@ -574,6 +613,7 @@ class _LoginScreenState extends State<LoginScreen>
], ],
), ),
), ),
),
); );
} }
...@@ -611,8 +651,8 @@ class LogoWidget extends StatelessWidget { ...@@ -611,8 +651,8 @@ class LogoWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: 80, width: MediaQuery.of(context).size.width/4.5,
height: 80, height: MediaQuery.of(context).size.width/4.5,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage(image: AssetImage(imagePath), fit: BoxFit.cover), image: DecorationImage(image: AssetImage(imagePath), fit: BoxFit.cover),
), ),
......
...@@ -18,7 +18,10 @@ class _ScannerloginState extends State<Scannerlogin> { ...@@ -18,7 +18,10 @@ class _ScannerloginState extends State<Scannerlogin> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<Scanloginprovider>( return Consumer<Scanloginprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "QR Login"), appBar: appbar(context, "QR Login"),
body: Container( body: Container(
...@@ -65,6 +68,7 @@ class _ScannerloginState extends State<Scannerlogin> { ...@@ -65,6 +68,7 @@ class _ScannerloginState extends State<Scannerlogin> {
], ],
), ),
), ),
),
); );
}, },
); );
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:generp/Notifiers/UpdatePasswordProvider'; import 'package:generp/Notifiers/UpdatePasswordProvider.dart';
import 'package:generp/Utils/app_colors.dart'; import 'package:generp/Utils/app_colors.dart';
import 'package:generp/Utils/commonWidgets.dart'; import 'package:generp/Utils/commonWidgets.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
...@@ -11,7 +11,10 @@ class UpdatePassword extends StatelessWidget { ...@@ -11,7 +11,10 @@ class UpdatePassword extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final provider = Provider.of<UpdatePasswordProvider>(context); final provider = Provider.of<UpdatePasswordProvider>(context);
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Update Password"), appBar: appbar(context, "Update Password"),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Container( body: Container(
...@@ -37,21 +40,33 @@ class UpdatePassword extends StatelessWidget { ...@@ -37,21 +40,33 @@ class UpdatePassword extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
SizedBox(height: 10), SizedBox(height: 10),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text("New Password",style: TextStyle(
color: AppColors.semi_black
),)),
SizedBox(height: 5),
_buildTextField( _buildTextField(
controller: provider.password, controller: provider.password,
hintText: "New Password*", hintText: "New Password*",
errorText: provider.passwordError, errorText: provider.passwordError,
), ),
SizedBox(height: 10), SizedBox(height: 10),
Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text("Confirm Password",style: TextStyle(
color: AppColors.semi_black
),)),
SizedBox(height: 5),
_buildTextField( _buildTextField(
controller: provider.confPassword, controller: provider.confPassword,
hintText: "Confirm New Password*", hintText: "Confirm New Password*",
errorText: provider.confirmPasswordError, errorText: provider.confirmPasswordError,
), ),
Spacer(), Spacer(),
provider.isLoading InkWell(
? CircularProgressIndicator()
: InkWell(
onTap: () => provider.updatePassword(context), onTap: () => provider.updatePassword(context),
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
...@@ -59,9 +74,14 @@ class UpdatePassword extends StatelessWidget { ...@@ -59,9 +74,14 @@ class UpdatePassword extends StatelessWidget {
margin: EdgeInsets.symmetric(horizontal: 15), margin: EdgeInsets.symmetric(horizontal: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.app_blue, color: AppColors.app_blue,
borderRadius: BorderRadius.circular(30.0), borderRadius: BorderRadius.circular(15.0),
), ),
child: Text( child:provider.isLoading
? CircularProgressIndicator(
color: Colors.white,
)
: Text(
"Update", "Update",
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
...@@ -78,6 +98,7 @@ class UpdatePassword extends StatelessWidget { ...@@ -78,6 +98,7 @@ class UpdatePassword extends StatelessWidget {
], ],
), ),
), ),
),
); );
} }
...@@ -103,7 +124,8 @@ class UpdatePassword extends StatelessWidget { ...@@ -103,7 +124,8 @@ class UpdatePassword extends StatelessWidget {
obscureText: true, obscureText: true,
decoration: InputDecoration( decoration: InputDecoration(
hintText: hintText, hintText: hintText,
hintStyle: TextStyle(color: Color(0xFF818181)), hintStyle: TextStyle(color: Color(0xFF818181),
fontSize: 14),
border: InputBorder.none, border: InputBorder.none,
), ),
), ),
......
...@@ -80,6 +80,7 @@ class _WebErpScreenState extends State<WebErpScreen> { ...@@ -80,6 +80,7 @@ class _WebErpScreenState extends State<WebErpScreen> {
return true; // Allow default back button behavior return true; // Allow default back button behavior
}, },
child: Scaffold( child: Scaffold(
resizeToAvoidBottomInset: true,
appBar:appbar(context, "Web ERP"), appBar:appbar(context, "Web ERP"),
body: Container( body: Container(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
......
...@@ -78,6 +78,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> { ...@@ -78,6 +78,7 @@ class _WebWhizzdomScreenState extends State<WebWhizzdomScreen> {
return true; // Allow default back button behavior return true; // Allow default back button behavior
}, },
child: Scaffold( child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Whizzdom"), appBar: appbar(context, "Whizzdom"),
body: Container( body: Container(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
......
...@@ -34,13 +34,18 @@ class _ComplainthistoryState extends State<Complainthistory> { ...@@ -34,13 +34,18 @@ class _ComplainthistoryState extends State<Complainthistory> {
return Consumer<Generatordetailsprovider>( return Consumer<Generatordetailsprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Complaint History"), appBar: appbar(context, "Complaint History"),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
if(provider.complaintList.isNotEmpty)...[
ListView.builder( ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
...@@ -118,12 +123,15 @@ class _ComplainthistoryState extends State<Complainthistory> { ...@@ -118,12 +123,15 @@ class _ComplainthistoryState extends State<Complainthistory> {
], ],
); );
},), },),
]else...[
Emptywidget(context)
]
], ],
), ),
), ),
), ),
),
); );
}, },
); );
......
...@@ -18,7 +18,10 @@ class Gentrackerdashboard extends StatefulWidget { ...@@ -18,7 +18,10 @@ class Gentrackerdashboard extends StatefulWidget {
class _GentrackerdashboardState extends State<Gentrackerdashboard> { class _GentrackerdashboardState extends State<Gentrackerdashboard> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Gen Tracker"), appBar: appbar(context, "Gen Tracker"),
body: GridView.builder( body: GridView.builder(
...@@ -37,6 +40,12 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> { ...@@ -37,6 +40,12 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
"Tag Generator", "Tag Generator",
]; ];
final icons = [
"gent_gen_det",
"gent_reg_comp",
"gent_tag_loc",
"gent_tag_den",
];
return InkResponse( return InkResponse(
onTap: () { onTap: () {
switch (names[index]) { switch (names[index]) {
...@@ -68,8 +77,9 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> { ...@@ -68,8 +77,9 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SvgPicture.asset( SvgPicture.asset(
"assets/svg/home_icons_${index + 1}.svg", "assets/svg/${icons[index]}.svg",
), ),
SizedBox(height: 10,),
Text(names[index]), Text(names[index]),
], ],
), ),
...@@ -77,6 +87,7 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> { ...@@ -77,6 +87,7 @@ class _GentrackerdashboardState extends State<Gentrackerdashboard> {
); );
}, },
), ),
),
); );
} }
} }
...@@ -53,7 +53,7 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -53,7 +53,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
homeProvider, homeProvider,
context, context,
"", "",
details.genID, widget.generatorId,
); );
} }
}); });
...@@ -89,7 +89,10 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -89,7 +89,10 @@ class _GeneratordetailsState extends State<Generatordetails> {
child: Icon(Icons.directions), child: Icon(Icons.directions),
), ),
); );
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appBar:
widget.activityName == "NearByGenerators" widget.activityName == "NearByGenerators"
? appbar2(context, "Generator Details", sendwidget) ? appbar2(context, "Generator Details", sendwidget)
...@@ -100,52 +103,41 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -100,52 +103,41 @@ class _GeneratordetailsState extends State<Generatordetails> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text("Customer Details"), Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
child: Text(
"Customer Details",
style: TextStyle(color: Color(0xFF818181),
fontFamily: "JakartaMedium"),
),
),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5), margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10), padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
), ),
child: Column( child: Column(
children: [ children: [
Row( Container(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(4, (j) {
final textheads = [
"${provider.cname}",
"Mobile Number",
"Contact Person Number",
"Mail ID",
];
final textSubheads = [
"${provider.aname}",
"${provider.mob1}",
"${provider.mob2}",
"${provider.mail}",
];
return Container(
padding: EdgeInsets.symmetric(vertical: 3),
child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 3, vertical: 3,
horizontal: 0, horizontal: 0,
), ),
child: Column( child: Row(
children: [
Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: [ children: [
if (j == 0) ...[
SvgPicture.asset( SvgPicture.asset(
"assets/svg/se_block_head.svg", "assets/svg/se_block_head.svg",
), ),
SizedBox(width: 5), SizedBox(width: 5),
],
Column( Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
...@@ -156,8 +148,16 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -156,8 +148,16 @@ class _GeneratordetailsState extends State<Generatordetails> {
context, context,
).size.width * ).size.width *
0.75, 0.75,
child: Text(textheads[j].toString(),maxLines: 2, child: Text(
overflow: TextOverflow.ellipsis,), "${provider.cname}",
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14
),
),
), ),
SizedBox( SizedBox(
// height:45, // height:45,
...@@ -167,45 +167,108 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -167,45 +167,108 @@ class _GeneratordetailsState extends State<Generatordetails> {
).size.width * ).size.width *
0.75, 0.75,
child: Text( child: Text(
textSubheads[j], "${provider.aname}",
maxLines: 2, maxLines: 2,
overflow: overflow:
TextOverflow.ellipsis, TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: Color(0xFF818181), fontSize: 14,
color: Color(
0xFF818181,
), ),
), ),
), ),
],
), ),
], ],
), ),
], ],
), ),
), ),
); Column(
}), crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(3, (j) {
final textheads = [
"Mobile Number",
"Contact Person Number",
"Mail ID",
];
final textSubheads = [
"${provider.mob1}",
"${provider.mob2}",
"${provider.mail}",
];
return Container(
padding: EdgeInsets.symmetric(
vertical: 6,
horizontal: 0,
),
child: Row(
children: [
Expanded(
flex:1,
child: SizedBox(
child: Text(
textheads[j].toString(),
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 14
),
),
),
),
SizedBox(width: 5,),
Expanded(
flex: 2,
child: SizedBox(
child: Text(
textSubheads[j],
maxLines: 2,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14,
color: Color(
0xFF818181,
),
),
),
),
), ),
], ],
), ),
);
}),
),
], ],
), ),
), ),
Text("Generator Details"), Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
child: Text(
"Generator Details",
style: TextStyle(color: Color(0xFF818181),
fontFamily: "JakartaMedium"),
),
),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5), margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10), padding: EdgeInsets.symmetric(
horizontal: 15,
vertical: 10,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
), ),
child: Column( child: Column(
children: [
Row(
children: [
SvgPicture.asset("assetName"),
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(6, (j) { children: List.generate(6, (j) {
final textheads = [ final textheads = [
...@@ -225,54 +288,44 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -225,54 +288,44 @@ class _GeneratordetailsState extends State<Generatordetails> {
"${provider.dateOfEngineSale}", "${provider.dateOfEngineSale}",
]; ];
return Container( return Container(
padding: EdgeInsets.symmetric(vertical: 3),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 3, vertical: 6,
horizontal: 0, horizontal: 0,
), ),
child: Column( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text(textheads[j].toString()), Expanded(
SizedBox( flex:1,
// height:45, child: Text(textheads[j].toString(),style: TextStyle(
width: fontSize: 14,
MediaQuery.of( fontFamily: "JakartaMedium"
context, ),),),
).size.width * SizedBox(width: 5,),
0.8, Expanded(
flex:2,
child: SizedBox(
child: Text( child: Text(
textSubheads[j], textSubheads[j],
maxLines: 2, maxLines: 2,
overflow: overflow:
TextOverflow.ellipsis, TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: Color(0xFF818181), fontSize: 14,
), color: Color(
0xFF818181,
), ),
), ),
],
), ),
), ),
],
), ),
], ],
), ),
); );
}), }),
), ),
],
),
],
),
), ),
SizedBox(height: 75), SizedBox(height: 75),
...@@ -296,13 +349,16 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -296,13 +349,16 @@ class _GeneratordetailsState extends State<Generatordetails> {
margin: EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.app_blue, color: AppColors.app_blue,
borderRadius: BorderRadius.circular(30.0), borderRadius: BorderRadius.circular(15.0),
), ),
child: Center( child: Center(
child: Text( child: Text(
"Complaint History", "Complaint History",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 15,
color: Colors.white),
), ),
), ),
), ),
...@@ -310,6 +366,7 @@ class _GeneratordetailsState extends State<Generatordetails> { ...@@ -310,6 +366,7 @@ class _GeneratordetailsState extends State<Generatordetails> {
), ),
floatingActionButtonLocation: floatingActionButtonLocation:
FloatingActionButtonLocation.centerFloat, FloatingActionButtonLocation.centerFloat,
),
); );
}, },
); );
......
...@@ -24,7 +24,10 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -24,7 +24,10 @@ class _RegistercomplaintState extends State<Registercomplaint> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer2<Generatordetailsprovider, HomescreenNotifier>( return Consumer2<Generatordetailsprovider, HomescreenNotifier>(
builder: (context, provider, homeProvider, child) { builder: (context, provider, homeProvider, child) {
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Register Complaint"), appBar: appbar(context, "Register Complaint"),
body: Container( body: Container(
...@@ -40,9 +43,14 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -40,9 +43,14 @@ class _RegistercomplaintState extends State<Registercomplaint> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 25), SizedBox(height: 25),
Text( Container(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Customer Details", "Customer Details",
style: TextStyle(color: Color(0xFF818181)), style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181)),
),
), ),
Container( Container(
padding: EdgeInsets.fromLTRB(10, 10, 10, 10), padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
...@@ -74,7 +82,9 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -74,7 +82,9 @@ class _RegistercomplaintState extends State<Registercomplaint> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text("${provider.cname}"), Text("${provider.cname}",style: TextStyle(
fontFamily: "JakartaMedium"
),),
Text( Text(
"${provider.aname}", "${provider.aname}",
maxLines: 2, maxLines: 2,
...@@ -111,7 +121,9 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -111,7 +121,9 @@ class _RegistercomplaintState extends State<Registercomplaint> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text(textheads[j].toString()), Text(textheads[j].toString(),style: TextStyle(
fontFamily: "JakartaMedium"
),),
], ],
), ),
), ),
...@@ -144,9 +156,15 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -144,9 +156,15 @@ class _RegistercomplaintState extends State<Registercomplaint> {
], ],
), ),
), ),
Text("Complaint Details", style: TextStyle( Container(
color: Color(0xFF818181) padding: EdgeInsets.symmetric(horizontal: 10),
),), child: Text(
"Complaint Details",
style: TextStyle(
fontFamily: "JakartaMedium",
color: Color(0xFF818181)),
),
),
Container( Container(
padding: EdgeInsets.fromLTRB(10, 10, 10, 10), padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
...@@ -158,7 +176,12 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -158,7 +176,12 @@ class _RegistercomplaintState extends State<Registercomplaint> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text("Complaint Type"), Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Complaint Type",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline( DropdownButtonHideUnderline(
child: Row( child: Row(
children: [ children: [
...@@ -172,6 +195,7 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -172,6 +195,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
'Select Complaint Type', 'Select Complaint Type',
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
), ),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
...@@ -267,7 +291,12 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -267,7 +291,12 @@ class _RegistercomplaintState extends State<Registercomplaint> {
), ),
), ),
SizedBox(height: 10.0), SizedBox(height: 10.0),
Text("Complaint Category"), Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Complaint Category",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline( DropdownButtonHideUnderline(
child: Row( child: Row(
children: [ children: [
...@@ -370,7 +399,12 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -370,7 +399,12 @@ class _RegistercomplaintState extends State<Registercomplaint> {
), ),
SizedBox(height: 10.0), SizedBox(height: 10.0),
Text("Select Description"), Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Select Description",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
DropdownButtonHideUnderline( DropdownButtonHideUnderline(
child: Row( child: Row(
children: [ children: [
...@@ -474,7 +508,12 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -474,7 +508,12 @@ class _RegistercomplaintState extends State<Registercomplaint> {
), ),
SizedBox(height: 10.0), SizedBox(height: 10.0),
Text("Duration"), Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Duration",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
Container( Container(
height: 50, height: 50,
...@@ -513,7 +552,12 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -513,7 +552,12 @@ class _RegistercomplaintState extends State<Registercomplaint> {
), ),
), ),
SizedBox(height: 10.0), SizedBox(height: 10.0),
Text("Message"), Padding(
padding: const EdgeInsets.only(bottom: 5.0),
child: Text("Message",style: TextStyle(
fontFamily: "JakartaMedium",
),),
),
Container( Container(
height: 150, height: 150,
...@@ -589,6 +633,8 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -589,6 +633,8 @@ class _RegistercomplaintState extends State<Registercomplaint> {
"Submit Complaint", "Submit Complaint",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontFamily: "JakartaMedium",
fontSize: 15,
color: Colors.white color: Colors.white
), ),
), ),
...@@ -597,6 +643,7 @@ class _RegistercomplaintState extends State<Registercomplaint> { ...@@ -597,6 +643,7 @@ class _RegistercomplaintState extends State<Registercomplaint> {
), ),
floatingActionButtonLocation: FloatingActionButtonLocation floatingActionButtonLocation: FloatingActionButtonLocation
.centerFloat, .centerFloat,
),
); );
}, },
); );
......
...@@ -47,7 +47,10 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -47,7 +47,10 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<Generatordetailsprovider>( return Consumer<Generatordetailsprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "${widget.from}"), appBar: appbar(context, "${widget.from}"),
body: Container( body: Container(
...@@ -55,7 +58,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -55,7 +58,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
child: Column( child: Column(
children: [ children: [
Spacer(), Spacer(),
Container( SizedBox(
height: 250, height: 250,
child: QRView( child: QRView(
...@@ -66,7 +69,6 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -66,7 +69,6 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
}, },
formatsAllowed: [BarcodeFormat.qrcode], formatsAllowed: [BarcodeFormat.qrcode],
cameraFacing: CameraFacing.back, cameraFacing: CameraFacing.back,
overlay: QrScannerOverlayShape( overlay: QrScannerOverlayShape(
borderColor: AppColors.app_blue, borderColor: AppColors.app_blue,
...@@ -81,7 +83,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -81,7 +83,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
Text( Text(
"Scan QR", "Scan QR",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, color: Colors.white), style: TextStyle(fontSize: 18,fontFamily: "JakartaMedium", color: Colors.white),
), ),
Text( Text(
provider.subTitle, provider.subTitle,
...@@ -92,7 +94,8 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -92,7 +94,8 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
Text( Text(
"or", "or",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, color: Colors.white), style: TextStyle(fontSize: 18,
fontFamily: "JakartaMedium",color: Colors.white),
), ),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
...@@ -101,13 +104,16 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -101,13 +104,16 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
child: Text( child: Text(
"Tap to Enter Generator ID", "Tap to Enter Generator ID",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: Colors.white), style: TextStyle(fontSize: 18,
fontFamily: "JakartaMedium",
color: AppColors.app_blue),
), ),
), ),
SizedBox(height: 50), SizedBox(height: 50),
], ],
), ),
), ),
),
); );
}, },
); );
...@@ -148,12 +154,14 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -148,12 +154,14 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Container(
padding: EdgeInsets.symmetric(horizontal: 10,vertical: 5),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Text( child: Text(
"Generator ID", "Generator ID",
style: TextStyle( style: TextStyle(
color: AppColors.semi_black, color: AppColors.semi_black,
fontSize: 12, fontFamily: "JakartaMedium",
fontSize: 14,
), ),
), ),
), ),
...@@ -162,7 +170,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -162,7 +170,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(14),
border: border:
genIDFocusNode.hasFocus genIDFocusNode.hasFocus
? Border.all( ? Border.all(
...@@ -195,7 +203,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -195,7 +203,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
hintStyle: TextStyle( hintStyle: TextStyle(
fontWeight: FontWeight.w400, color: Color(0xFF818181),
fontSize: 14, fontSize: 14,
), ),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0), //contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
...@@ -206,6 +214,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -206,6 +214,7 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
), ),
), ),
), ),
SizedBox(height: 15,),
InkWell( InkWell(
onTap: () { onTap: () {
switch(widget.from){ switch(widget.from){
...@@ -248,13 +257,16 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen> ...@@ -248,13 +257,16 @@ class _ScanentergeneratoridscreenState extends State<Scanentergeneratoridscreen>
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.app_blue, //1487C9 color: AppColors.app_blue, //1487C9
borderRadius: BorderRadius.circular(30.0), borderRadius: BorderRadius.circular(15.0),
), ),
child: Center( child: Center(
child: Text( child: Text(
"Submit", "Submit",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white,
fontFamily: "JakartaMedium",
fontSize: 16
),
), ),
), ),
), ),
......
...@@ -36,7 +36,10 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -36,7 +36,10 @@ class _InventoryScreenState extends State<InventoryScreen> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<InventoryProvider>( return Consumer<InventoryProvider>(
builder: (context, provider, child) { builder: (context, provider, child) {
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
appBar: appbar(context, "Gen Inventory"), appBar: appbar(context, "Gen Inventory"),
body: Container( body: Container(
...@@ -70,7 +73,7 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -70,7 +73,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
Text( Text(
"Scan QR", "Scan QR",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, color: Colors.white), style: TextStyle(fontSize: 18,fontFamily: "JakartaMedium", color: Colors.white),
), ),
Text( Text(
"to open Inventory", "to open Inventory",
...@@ -81,7 +84,8 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -81,7 +84,8 @@ class _InventoryScreenState extends State<InventoryScreen> {
Text( Text(
"or", "or",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, color: Colors.white), style: TextStyle(fontSize: 18,
fontFamily: "JakartaMedium",color: Colors.white),
), ),
InkResponse( InkResponse(
onTap: () async { onTap: () async {
...@@ -90,13 +94,16 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -90,13 +94,16 @@ class _InventoryScreenState extends State<InventoryScreen> {
child: Text( child: Text(
"Tap To Enter Part ID", "Tap To Enter Part ID",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(fontSize: 14, color: Colors.white), style: TextStyle(fontSize: 17,
fontFamily: "JakartaMedium",
color: AppColors.app_blue),
), ),
), ),
SizedBox(height: 50), SizedBox(height: 50),
], ],
), ),
), ),
),
); );
}, },
); );
...@@ -137,21 +144,24 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -137,21 +144,24 @@ class _InventoryScreenState extends State<InventoryScreen> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Container(
padding: EdgeInsets.symmetric(horizontal: 10),
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Text( child: Text(
"Part ID", "Part ID",
style: TextStyle( style: TextStyle(
color: AppColors.semi_black, color: Color(0xFF818181),
fontSize: 12, fontFamily: "JakartaMedium",
fontSize: 14,
), ),
), ),
), ),
SizedBox(height: 5,),
Container( Container(
height: 48, height: 48,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.text_field_color, color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(14),
border: border:
partIDfocusNode.hasFocus partIDfocusNode.hasFocus
? Border.all( ? Border.all(
...@@ -173,6 +183,8 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -173,6 +183,8 @@ class _InventoryScreenState extends State<InventoryScreen> {
controller: partIDcontroller, controller: partIDcontroller,
keyboardType: TextInputType.emailAddress, keyboardType: TextInputType.emailAddress,
focusNode: partIDfocusNode, focusNode: partIDfocusNode,
textCapitalization: TextCapitalization.characters,
style: TextStyle(fontSize: 14), style: TextStyle(fontSize: 14),
onChanged: (value) {}, onChanged: (value) {},
onTapOutside: (event) { onTapOutside: (event) {
...@@ -182,7 +194,7 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -182,7 +194,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
hintStyle: TextStyle( hintStyle: TextStyle(
fontWeight: FontWeight.w400, color: Color(0xFF818181),
fontSize: 14, fontSize: 14,
), ),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0), //contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
...@@ -193,6 +205,7 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -193,6 +205,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
), ),
), ),
), ),
SizedBox(height: 15,),
InkWell( InkWell(
onTap: () { onTap: () {
provider.LoadPartDetailsApifunction( provider.LoadPartDetailsApifunction(
...@@ -201,6 +214,7 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -201,6 +214,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
"inventory", "inventory",
partIDcontroller.text, partIDcontroller.text,
); );
partIDcontroller.clear();
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
...@@ -213,13 +227,15 @@ class _InventoryScreenState extends State<InventoryScreen> { ...@@ -213,13 +227,15 @@ class _InventoryScreenState extends State<InventoryScreen> {
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColors.app_blue, //1487C9 color: AppColors.app_blue, //1487C9
borderRadius: BorderRadius.circular(30.0), borderRadius: BorderRadius.circular(15.0),
), ),
child: Center( child: Center(
child: Text( child: Text(
"Submit", "Submit",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white,
fontFamily: "JakartaMedium",
fontSize: 15),
), ),
), ),
), ),
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:generp/Notifiers/PaymentCollectionProvider.dart'; import 'package:generp/Notifiers/PaymentCollectionProvider.dart';
import 'package:generp/Utils/app_colors.dart'; import 'package:generp/Utils/app_colors.dart';
import 'package:generp/Utils/commonWidgets.dart'; import 'package:generp/Utils/commonWidgets.dart';
...@@ -14,38 +15,75 @@ class Accountsuggestions extends StatefulWidget { ...@@ -14,38 +15,75 @@ class Accountsuggestions extends StatefulWidget {
class _AccountsuggestionsState extends State<Accountsuggestions> { class _AccountsuggestionsState extends State<Accountsuggestions> {
final TextEditingController _searchController = TextEditingController(); final TextEditingController _searchController = TextEditingController();
FocusNode searchFocusNode = FocusNode();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<Paymentcollectionprovider>( return Consumer<Paymentcollectionprovider>(
builder: (context,provider,child) { builder: (context, provider, child) {
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Accounts"), appBar: appbar(context, "Accounts"),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Column( body: Container(
decoration: BoxDecoration(color: Colors.white),
child: Column(
children: [ children: [
const SizedBox( const SizedBox(height: 10),
height: 10, Container(
alignment: Alignment.topLeft,
padding: EdgeInsets.symmetric(horizontal: 10),
child: Text(
"Search Account",
style: TextStyle(color: Color(0xFF2d2d2d)),
), ),
),
SizedBox(height: 5),
Container( Container(
height: 48,
alignment: Alignment.center, alignment: Alignment.center,
height: 55, decoration: BoxDecoration(
margin: EdgeInsets.only(left: 15.0, right: 15.0), color: AppColors.text_field_color,
borderRadius: BorderRadius.circular(16),
border:
searchFocusNode.hasFocus
? Border.all(color: AppColors.app_blue, width: 0.5)
: null,
),
// alignment: Alignment.center,
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: Padding(
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 15, 0),
child: TextField( child: TextField(
controller: _searchController, controller: _searchController,
keyboardType: TextInputType.text, keyboardType: TextInputType.text,
onChanged: (value) { focusNode: searchFocusNode,
textCapitalization: TextCapitalization.characters,
style: TextStyle(fontSize: 14),
onChanged: (value) {
if (value.length >= 3) { if (value.length >= 3) {
provider.AccountSuggestionAPI(context, value); provider.AccountSuggestionAPI(context, value);
} }
}, },
onTapOutside: (event) {
// Handle onTapOutside
FocusScope.of(context).unfocus();
},
decoration: InputDecoration( decoration: InputDecoration(
hintText: "Enter Account Name.....", isDense: true,
hintStyle: TextStyle( hintStyle: TextStyle(
fontWeight: FontWeight.w400), fontWeight: FontWeight.w400,
filled: true, color: Color(0xFF818181),
fontSize: 14,
),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
hintText: 'Enter Account Name',
),
), ),
), ),
), ),
...@@ -54,9 +92,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -54,9 +92,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: Text( child: Text(
"Note: Enter Minimum 3 Characters", "Note: Enter Minimum 3 Characters",
style: TextStyle( style: TextStyle(fontWeight: FontWeight.w300),
fontWeight: FontWeight.w300,
),
), ),
), ),
...@@ -64,17 +100,11 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -64,17 +100,11 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
child: SingleChildScrollView( child: SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(), physics: AlwaysScrollableScrollPhysics(),
child: Container( child: Container(
child: GridView.builder( child: ListView.builder(
itemCount: provider.accountList!.length, itemCount: provider.accountList!.length,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount:
1, // 4 items in a row for tablet
crossAxisSpacing: 4,
mainAxisSpacing: 2,
childAspectRatio: (100 / 25)),
padding: const EdgeInsets.all(5), padding: const EdgeInsets.all(5),
physics: const BouncingScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (context, index) { itemBuilder: (context, index) {
var accountList = provider.accountList; var accountList = provider.accountList;
...@@ -85,29 +115,65 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -85,29 +115,65 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => Paymentdetails( builder:
(context) => Paymentdetails(
accountName: "Account", accountName: "Account",
name: name: accountList![index].accountName,
accountList![index].accountName,
genId: "", genId: "",
referenceID: referenceID:
accountList![index].accountId, accountList![index].accountId,
), ),
)); ),
);
// } // }
}, },
child: SizedBox( child: SizedBox(
child: Container( child: Container(
width: MediaQuery.of(context).size.width * 0.9, width:
padding: EdgeInsets.fromLTRB(0, 5, 0, 5), MediaQuery.of(context).size.width * 0.9,
padding: EdgeInsets.fromLTRB(0, 5, 0, 10),
child: Row(
children: [
Expanded(
flex: 1,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10,
vertical: 10,
),
decoration: BoxDecoration(
color: Color(0xFFE6F6FF),
borderRadius: BorderRadius.circular(
8,
),
),
child: SvgPicture.asset(
width: 30,
height: 30,
"assets/svg/se_block_head.svg",
),
),
),
SizedBox(width: 10,),
Expanded(
flex: 5,
child: Text( child: Text(
"${accountList![index].accountName}", "${accountList![index].accountName}",
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLines: 3, maxLines: 3,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w300, color: AppColors.semi_black
),
),
),
Expanded(
flex: 1,
child: SvgPicture.asset(
"assets/svg/arrow_right_new.svg",
),
), ),
],
), ),
), ),
), ),
...@@ -118,17 +184,15 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -118,17 +184,15 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
physics: AlwaysScrollableScrollPhysics(), physics: AlwaysScrollableScrollPhysics(),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: MediaQuery.of(context) height: MediaQuery.of(context).size.height,
.size // Set width to fill parent width
.height, // Set width to fill parent width
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(30.0), topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0), topRight: Radius.circular(30.0),
), ),
), ),
padding: padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
EdgeInsets.fromLTRB(10, 10, 10, 10),
child: Container( child: Container(
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
...@@ -138,17 +202,24 @@ class _AccountsuggestionsState extends State<Accountsuggestions> { ...@@ -138,17 +202,24 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
)), ),
)), ),
)); ),
),
),
);
} }
}), },
),
),
),
), ),
))
], ],
), ),
),
),
); );
} },
); );
} }
} }
import 'package:flutter/material.dart';
class Complaintdetailsscreen extends StatefulWidget {
const Complaintdetailsscreen({super.key});
@override
State<Complaintdetailsscreen> createState() => _ComplaintdetailsscreenState();
}
class _ComplaintdetailsscreenState extends State<Complaintdetailsscreen> {
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}
...@@ -34,7 +34,10 @@ class _FollowupdetailsState extends State<Followupdetails> { ...@@ -34,7 +34,10 @@ class _FollowupdetailsState extends State<Followupdetails> {
return Consumer<Visitdetailsprovider>( return Consumer<Visitdetailsprovider>(
builder: (context, provider, child) { builder: (context, provider, child) {
var followups = provider.followUpList; var followups = provider.followUpList;
return Scaffold( return WillPopScope(
onWillPop: () => onBackPressed(context),
child: Scaffold(
resizeToAvoidBottomInset: true,
appBar: appbar(context, "Follow Up Details"), appBar: appbar(context, "Follow Up Details"),
backgroundColor: AppColors.scaffold_bg_color, backgroundColor: AppColors.scaffold_bg_color,
body: Container( body: Container(
...@@ -122,6 +125,7 @@ class _FollowupdetailsState extends State<Followupdetails> { ...@@ -122,6 +125,7 @@ class _FollowupdetailsState extends State<Followupdetails> {
}, },
), ),
), ),
),
); );
}, },
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment