From 97e39289638f136f3d251af24c0466887da59497 Mon Sep 17 00:00:00 2001 From: kishan06 Date: Mon, 29 Jul 2024 19:02:59 +0530 Subject: [PATCH] login and minor bug fix --- .../EditProfile/View/ProfileTab.dart | 87 +------------------ lib/Login/View/loginscreen.dart | 45 ++++------ lib/Utils/Common/CustomTextformfield.dart | 4 +- 3 files changed, 23 insertions(+), 113 deletions(-) diff --git a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart index 132b92c..62dbc7c 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart @@ -488,39 +488,7 @@ class _ProfileTabState extends State { getEditProfileIndi!.data! .timelines![index]; - // List> - // abilities = - // timeline.abilities! - // .map((ability) => { - // 'id': ability.id, - // 'name': - // ability.name, - // }) - // .toList(); - return - // commonTimelineCard( - // imagePath: getEditProfileIndi - // ?.data - // ?.profileImage ?? - // '', - // title: getEditProfileIndi! - // .data! - // .timelines![index] - // .clubName!, - // role: getEditProfileIndi! - // .data! - // .timelines![index] - // .roleName!, - // teamname: getEditProfileIndi! - // .data! - // .timelines![index] - // .teamName!, - // abilities: abilities, - // id: getEditProfileIndi!.data! - // .timelines![index].id, - // starttoend: startToEnd, - // ); - Row( + return Row( children: [ Container( width: 10, @@ -560,7 +528,7 @@ class _ProfileTabState extends State { commonGlassUI( width: double.infinity, - height: 170.h, + height: 174.h, borderRadius: BorderRadius .circular( @@ -627,17 +595,6 @@ class _ProfileTabState extends State { InkWell( onTap: () { - // setState( - // () { - // timelineremoveid = - // getEditProfileIndi!.data!.timelines![index].id ?? 0; - // getEditProfileIndi!.data!.timelines!.removeWhere((item) => - // item.id! == - // timelineremoveid); - // // .removeAt(index); - // RemoveTimelineUploadata(); - // }); - Get.toNamed(RouteName.addtimeline, arguments: { 'id': getEditProfileIndi!.data!.timelines![index].id, 'edit': true, @@ -715,42 +672,7 @@ class _ProfileTabState extends State { .isEmpty ? text10400whiteblur( 'No data') - : - - // Container( - // height: - // 30.h, // Adjust the height as needed - // child: - // ListView.builder( - // shrinkWrap: - // true, - // scrollDirection: - // Axis.horizontal, - // itemCount: - // getEditProfileIndi!.data!.timelines![index].abilities!.length, - // itemBuilder: - // (context, index) { - // String abilityName = getEditProfileIndi!.data!.timelines![index].abilities![index].name!; - // // String abilitiesString = abilities.map((ability) => ability['name']).join(', '); - // return Padding( - // padding: EdgeInsets.only(right: 8.w), - // child: text10400whiteblur(abilityName), - // ); - - // // if (index < abilities.length) { - // // // String abilityName = abilities[index]['name']; - // // String abilitiesString = abilities.map((ability) => ability['name']).join(', '); - // // return Padding( - // // padding: EdgeInsets.only(right: 8.w), - // // child: text10400whiteblur(abilitiesString), - // // ); - // // } else { - // // return SizedBox(); - // // } - // }, - // ), - // ), - Container( + : Container( height: 30.h, // Adjust the height as needed child: @@ -768,7 +690,6 @@ class _ProfileTabState extends State { // String formattedNames = abilityName.join(', '); List abilityNames = abilityName.split(',').map((e) => e.trim()).toList(); String formattedNames = abilityNames.join(', '); - print(formattedNames); return Padding( padding: EdgeInsets.only(right: 8.w), child: text10400whiteblur(formattedNames), @@ -833,7 +754,7 @@ class _ProfileTabState extends State { children: [ commonGlassUI( width: 266.w, - height: 70.h, + height: 75.h, borderRadius: BorderRadius .circular(10.r), diff --git a/lib/Login/View/loginscreen.dart b/lib/Login/View/loginscreen.dart index 40749ce..edfdfc8 100644 --- a/lib/Login/View/loginscreen.dart +++ b/lib/Login/View/loginscreen.dart @@ -75,21 +75,21 @@ class _LoginScreenState extends State { ); // Get.toNamed(RouteName.mainscreen,arguments: 0); await Getuserdetails().Getuser().then((value) { - if (getuserobj?.data?.userData?.isProfileUpdated == 0) { - String? accountype = - getuserobj?.data?.userData?.principalTypeXid.toString(); + if (getuserobj?.data?.userData?.isProfileUpdated == 0) { + String? accountype = + getuserobj?.data?.userData?.principalTypeXid.toString(); - if (accountype == "1") { - Get.toNamed(RouteName.tellusindividualscreen, - arguments: {'pageroute': "mainscreen"}); - } else if (accountype == "2") { - Get.toNamed(RouteName.tellusbusinessscreen, - arguments: {'pageroute': "mainscreen"}); + if (accountype == "1") { + Get.toNamed(RouteName.tellusindividualscreen, + arguments: {'pageroute': "mainscreen"}); + } else if (accountype == "2") { + Get.toNamed(RouteName.tellusbusinessscreen, + arguments: {'pageroute': "mainscreen"}); + } + } else { + Get.toNamed(RouteName.mainscreen, arguments: 0); } - } else { - Get.toNamed(RouteName.mainscreen,arguments: 0); - } - }); + }); logger.d("go to login"); } } else { @@ -294,13 +294,13 @@ class _LoginScreenState extends State { image: DecorationImage( image: AssetImage("assets/images/png/Choice screen.png"), - fit: BoxFit.cover)), + fit: BoxFit.fill)), ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( - height: 150.h, + height: 130.h, ), Padding( padding: EdgeInsets.symmetric(horizontal: 16.w), @@ -308,7 +308,7 @@ class _LoginScreenState extends State { alignment: Alignment.center, child: Container( width: 107.w, - height: 70.h, + height: 86.h, child: SvgPicture.asset( "assets/images/svg/onboarding2.svg", fit: BoxFit.cover, @@ -356,18 +356,7 @@ class _LoginScreenState extends State { } return null; }, - // onInput: (p0) { - // if (p0!.isEmpty) { - // errormsg.value = 'Enter your e-mail address'; - // } - // if (!RegExp( - // r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$') - // .hasMatch(p0!)) { - // errormsg.value = 'Enter a valid e-mail address'; - // } - // return null; - // }, - // validatorText: "Email Id", + inputFormatters: [ LengthLimitingTextInputFormatter(30), diff --git a/lib/Utils/Common/CustomTextformfield.dart b/lib/Utils/Common/CustomTextformfield.dart index 5dddff3..eb78628 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -81,7 +81,7 @@ class _CustomTextFormFieldState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ GlassContainer( - height: 50.h, + height: 52.h, width: double.infinity, gradient: LinearGradient( begin: Alignment.topLeft, @@ -463,7 +463,7 @@ class _CustomtextFormFieldPasswordState decoration: InputDecoration( hintStyle: TextStyle( fontSize: 16.sp, - color: const Color.fromARGB(255, 130, 128, 128), + color: const Color.fromARGB(255, 130, 128, 128), fontWeight: FontWeight.w400, fontFamily: 'Helvetica'), labelStyle: const TextStyle(color: Colors.white),