diff --git a/lib/Common/CommonGlassmorphism.dart b/lib/Common/CommonGlassmorphism.dart index 0163d9f..0faa4c9 100644 --- a/lib/Common/CommonGlassmorphism.dart +++ b/lib/Common/CommonGlassmorphism.dart @@ -12,7 +12,10 @@ Widget commonGlassContainer({ double opacity2 = 0.05, Color borderColor = const Color(0xff434A53), }) { - return GlassmorphicContainer( + return + + + GlassmorphicContainer( width: width, height: height, borderRadius: borderradius, diff --git a/lib/Common/CommonTabBar.dart b/lib/Common/CommonTabBar.dart index b5b8751..90b1596 100644 --- a/lib/Common/CommonTabBar.dart +++ b/lib/Common/CommonTabBar.dart @@ -10,6 +10,7 @@ class CommonTabBar extends StatelessWidget { @override Widget build(BuildContext context) { return TabBar( + dividerColor: Color(0xFFFFFFFF).withOpacity(0.07), labelStyle: TextStyle( fontSize: 14.sp, diff --git a/lib/Feed Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart b/lib/Feed Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart index c857f56..fb9f5e6 100644 --- a/lib/Feed Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart +++ b/lib/Feed Module/Main_Screens/CalenderTab/AddUsers/AddUsers.dart @@ -59,6 +59,8 @@ class _AddUsersState extends State { List isCheckedList = [false, false, false, false, false, false, false]; + + @override Widget build(BuildContext context) { return Scaffold( @@ -99,10 +101,12 @@ class _AddUsersState extends State { ), sizedBoxHeight(16.h), DefaultTabController( + length: 3, // initialIndex: selectedIndex.value, child: Column(children: [ - CommonTabBar(tabs: const [ + CommonTabBar( + tabs: const [ Tab( text: 'Group', ), diff --git a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart index a7bc2b9..ff04ce0 100644 --- a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart +++ b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart @@ -179,7 +179,10 @@ class _CalenderTabState extends State { // initialIndex: selectedIndex.value, child: Column( children: [ - CommonTabBar(tabs: const [ + CommonTabBar( + + + tabs: const [ Tab( text: 'My sessions', ), @@ -189,6 +192,7 @@ class _CalenderTabState extends State { ]), Expanded( child: TabBarView( + children: [ MySessionsTab(), ComSessionTab(), diff --git a/lib/Feed Module/Main_Screens/Community/PostScreen.dart b/lib/Feed Module/Main_Screens/Community/PostScreen.dart index 18cbe83..a4f69e2 100644 --- a/lib/Feed Module/Main_Screens/Community/PostScreen.dart +++ b/lib/Feed Module/Main_Screens/Community/PostScreen.dart @@ -92,11 +92,11 @@ class _PostScreenState extends State { borderType: BorderType.RRect, radius: Radius.circular(14.r), color: Color(0xFF434A53), - child: commonGlassContainer( - border: 0, + child: commonGlassUI( width: double.infinity, height: 130.h, - borderradius: 10.r, + borderRadius: BorderRadius.circular(10.r), + borderColor: Colors.transparent, customWidget: bannerPath.isNotEmpty && isbannerAdded ? Stack(children: [ Image.file( diff --git a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/BusEditProfile.dart b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/BusEditProfile.dart index c134233..20a07ed 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/BusEditProfile.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/BusEditProfile.dart @@ -12,6 +12,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewMo import 'package:regroup/Utils/Common/CommonAppbar.dart'; import 'package:regroup/Utils/Common/CommonDropdown.dart'; import 'package:regroup/Utils/Common/ImageUpload.dart'; +import 'package:regroup/Utils/Common/ShimmerCommon.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/dialogs.dart'; import 'package:regroup/Utils/texts.dart'; @@ -160,11 +161,13 @@ class _BusEditProfileState extends State { future: myfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( - child: CircularProgressIndicator( - color: Colors.blue, - ), - ); + return ShimmerCommon(); + + // Center( + // child: CircularProgressIndicator( + // color: Colors.blue, + // ), + // ); } if (snapshot.hasError) { 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 ee0ff8d..a0d16c9 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/EditProfile/View/ProfileTab.dart @@ -12,7 +12,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/Model/ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart'; import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/view_model/profilePostmethod.dart'; -import 'package:regroup/Utils/Common/blureffect.dart'; +import 'package:regroup/Utils/Common/ShimmerCommon.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/dialogs.dart'; @@ -202,11 +202,13 @@ class _ProfileTabState extends State { future: individualfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( - child: CircularProgressIndicator( - color: Colors.blue, - ), - ); + return ShimmerCommon(); + + // Center( + // child: CircularProgressIndicator( + // color: Colors.blue, + // ), + // ); } if (snapshot.hasError) { @@ -299,7 +301,11 @@ class _ProfileTabState extends State { GestureDetector( onTap: () { Get.toNamed( - RouteName.mynetwork); + RouteName.mynetwork, + // arguments: { + // "From": 'MainIndProfile', + // } + ); }, child: Container( height: 34.h, @@ -1061,15 +1067,14 @@ class _ProfileTabState extends State { return Container(); }, ) + + //BusProfile : FutureBuilder( future: businessfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( - child: CircularProgressIndicator( - color: Colors.blue, - ), - ); + return ShimmerCommon(); + } if (snapshot.hasError) { @@ -1152,7 +1157,11 @@ class _ProfileTabState extends State { GestureDetector( onTap: () { Get.toNamed( - RouteName.followers); + RouteName.followers, + arguments: { + "From": + 'MainBusProfile', + }); }, child: Column( children: [ @@ -1192,7 +1201,11 @@ class _ProfileTabState extends State { GestureDetector( onTap: () { Get.toNamed( - RouteName.following); + RouteName.following, + arguments: { + "From": + 'MainBusProfile', + }); }, child: Column( children: [ diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Followers/Followers.dart b/lib/Feed Module/Main_Screens/ProfileTab/Followers/Followers.dart index f6aa298..d2910c5 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Followers/Followers.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Followers/Followers.dart @@ -31,16 +31,28 @@ class _FollowersState extends State { StreamController(); var guestUserid = Get.arguments['UpdataGuestIdfollowers'] ?? ''; + var fromBusFollower = Get.arguments['From'] ?? ''; + var guestUserBusid = Get.arguments['UpdataGuestBusIdfollowers'] ?? ''; + var fromMainBusProfile = Get.arguments['From'] ?? ''; + @override void initState() { // TODO: implement initState var updata = ""; - Profilegetmethod().getFollowers(updata, streamController: searchcontroller); + if (fromMainBusProfile == 'MainBusProfile') { + Profilegetmethod() + .getFollowers(updata, streamController: searchcontroller); + } var guestupdata = ""; - GuestProfileApi().getGuestfollowers(guestUserid, guestupdata, - streamController: guestsearchcontroller); + if (fromBusFollower == 'GuestBusFollowers') { + GuestProfileApi().getGuestfollowers(guestUserBusid, guestupdata, + streamController: guestsearchcontroller); + } else { + GuestProfileApi().getGuestfollowers(guestUserid, guestupdata, + streamController: guestsearchcontroller); + } super.initState(); } @@ -92,580 +104,666 @@ class _FollowersState extends State { Widget build(BuildContext context) { return Scaffold( // key: _scaffoldKey1, - backgroundColor: Color(0xFF222935), + backgroundColor: const Color(0xFF222935), extendBody: true, - appBar: CommonAppbar( + appBar: const CommonAppbar( titleTxt: "Followers", ), resizeToAvoidBottomInset: false, - body: Stack(children: [ - Container( - decoration: const BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/images/png/Ellipse 1496.png"), - fit: BoxFit.fill)), - ), - SingleChildScrollView( - child: Column(children: [ - Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: CustomTextFormField( - leadingIcon: SizedBox( - height: 23, - width: 23, - child: Center( - child: Image.asset( - "assets/images/png/ion_search-outline.png", - height: 23, - width: 23, - ), - ), - ), - texttype: TextInputType.text, - inputFormatters: [ - RemoveEmojiInputFormatter(), - ], - onInput: (value) { - GuestProfileApi().getGuestfollowers(guestUserid, value, - streamController: guestsearchcontroller); - }, - hintText: "Search people", + body: fromMainBusProfile == 'MainBusProfile' + ? Stack(children: [ + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: + AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), ), - ), - sizedBoxHeight(25.h), - StreamBuilder( - stream: guestsearchcontroller.stream, - builder: (ctx, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - // Display shimmer effect while waiting for data - return Center(child: CircularProgressIndicator()); - } else if (snapshot.hasError) { - // Handle error state - return Center( - child: Text( - '${snapshot.error} occurred', - style: TextStyle(fontSize: 18), - ), - ); - } else { - // Data has been loaded, show actual UI - return getguestfollowersobj!.data!.isEmpty - ? _buildNoDataBody(context) - : ListView.separated( - physics: ScrollPhysics(), - shrinkWrap: true, - itemCount: getguestfollowersobj!.data!.length, - separatorBuilder: - (BuildContext context, int index) { - return commonDivider(); + SingleChildScrollView( + child: Column(children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: CustomTextFormField( + leadingIcon: SizedBox( + height: 23, + width: 23, + child: Center( + child: Image.asset( + "assets/images/png/ion_search-outline.png", + height: 23, + width: 23, + ), + ), + ), + texttype: TextInputType.text, + inputFormatters: [ + RemoveEmojiInputFormatter(), + ], + onInput: (value) { + Profilegetmethod().getFollowers(value, + streamController: searchcontroller); }, - itemBuilder: (context, index) { - return GestureDetector( - onTap: () { - Get.toNamed(RouteName.profiletabindguest, - arguments: { - "FolloweridIndex": getguestfollowersobj! - .data![index].iamPrincipalXid, - }); - }, - child: Column( - children: [ - Padding( - padding: EdgeInsets.symmetric( - vertical: 16.h, horizontal: 16.w), - child: Row( - children: [ - getguestfollowersobj! - .data![index] - .follower! - .profilePhoto == - null || - getguestfollowersobj! - .data![index] - .follower! - .profilePhoto! - .isEmpty - ? CircleAvatar( - backgroundImage: AssetImage( - 'assets/images/png/Ellipse 43.png'), - radius: 25.r, - ) - : CircleAvatar( - backgroundImage: NetworkImage( - getguestfollowersobj! - .data![index] - .follower! - .profilePhoto!), - radius: 25.r, - ), - sizedBoxWidth(10.w), - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - getguestfollowersobj! - .data![index] - .follower! - .fullName == - null || - getguestfollowersobj! - .data![index] - .follower! - .fullName! - .isEmpty == - true - ? text16w400_FCFCFC("Regroup") - : text16w400_FCFCFC( - getguestfollowersobj! - .data![index] - .follower! - .fullName!), - sizedBoxHeight(4.h), - getguestfollowersobj! - .data![index] - .follower! - .userName == - null || - getguestfollowersobj! - .data![index] - .follower! - .userName! - .isEmpty == - true - ? text12w400_FCFCFC_blur( - "regroup") - : text12w400_FCFCFC_blur( - getguestfollowersobj! - .data![index] - .follower! - .userName!) - ], - ), - Spacer(), - PopupMenuButton( - surfaceTintColor: - Color(0xFF222935), - constraints: - BoxConstraints.tightFor( - width: 176.w), - offset: Offset(0, 20), - color: Color(0xFF222935), - tooltip: "", - itemBuilder: - (BuildContext context) => - [ - PopupMenuItem( - // onTap: () {}, - onTap: () async { - setState(() { - removeid = getguestfollowersobj! - .data![ - index] - .follower! - .id ?? - 0; - getguestfollowersobj! - .data! - .removeWhere((item) => - item.follower! - .id == - removeid); - RemoveUploadata(); - }); - }, - child: Padding( - padding: EdgeInsets - .symmetric( - horizontal: - 12.w), - child: Row( - children: [ - text14400white( - "Remove user"), - Spacer(), - Image.asset( - "assets/images/png/fluent_delete-28-regular.png", - height: 15.h, - width: 15.w, - ) - ], - ), - ), - ), - PopupMenuDivider(), - PopupMenuItem( - onTap: () {}, - child: Padding( - padding: EdgeInsets - .symmetric( - horizontal: - 12.w), - child: Row( - children: [ - text14400white( - "Message user"), - Spacer(), - Image.asset( - "assets/images/png/fluent_chat-20-regular.png", - height: 20.h, - width: 20.w, - ) - ], - ), - ), - ), - PopupMenuDivider(), - PopupMenuItem( - onTap: () async { - setState(() { - blockid = getguestfollowersobj! - .data![ - index] - .follower! - .id ?? - 0; - getguestfollowersobj! - .data! - .removeWhere((item) => - item.follower! - .id == - blockid); - BlockUploadata(); - }); - }, - child: Padding( - padding: EdgeInsets - .symmetric( - horizontal: - 12.w), - child: Row( - children: [ - text14400white( - "Block user"), - Spacer(), - Image.asset( - "assets/images/png/blockchat.png", - height: 25.h, - width: 25.w, - ) - ], - ), - ), - ), - ], - child: Container( - height: 20, - width: 20, - child: Center( - child: Image.asset( - "assets/images/png/Group 1000004071.png", - height: 22.h, - width: 4.w, - ), - ), - )), - ], - ), - ) - ], + hintText: "Search people", + ), + ), + sizedBoxHeight(25.h), + StreamBuilder( + stream: searchcontroller.stream, + builder: (ctx, snapshot) { + if (snapshot.connectionState == + ConnectionState.waiting) { + // Display shimmer effect while waiting for data + return const Center( + child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + // Handle error state + return Center( + child: Text( + '${snapshot.error} occurred', + style: const TextStyle(fontSize: 18), ), ); + } else { + // Data has been loaded, show actual UI + return followersobj!.data!.isEmpty + ? _buildNoDataBody(context) + : + // ListView.builder( + // shrinkWrap: true, + // itemCount: followersobj!.data!.length, + // itemBuilder: (context, index) { + // return Column( + // children: [ + // followerWidget( + // imagePath: followersobj?.data?[index] + // .follower?.profilePhoto ?? + // "", + // // followersData[index]["imagePath"], + // title: followersobj?.data?[index].follower + // ?.fullName ?? + // "", + // // followersData[index]["title"], + // subtitle: followersobj?.data?[index] + // .follower?.userName ?? + // "", + // blockonTap: () { + // BlockUploadata(followersobj! + // .data![index].follower!.id); + // } + // // followersData[index]["subtitle"] + // ), + // if (index != followersobj!.data!.length - 1) + // commonDivider(), + // ], + // ); + // }, + // ); + + ListView.separated( + physics: const ScrollPhysics(), + shrinkWrap: true, + itemCount: followersobj!.data!.length, + separatorBuilder: + (BuildContext context, int index) { + return commonDivider(); + }, + itemBuilder: (context, index) { + var mainFollowersData = + followersobj!.data![index]; + return GestureDetector( + onTap: () { + mainFollowersData.follower! + .principleTypeXid == + 1 + ? Get.toNamed( + RouteName + .profiletabindguest, + arguments: { + "FolloweridIndex": + mainFollowersData + .iamPrincipalXid!, + }) + : Get.toNamed( + RouteName + .profiletabbusguest, + arguments: { + "FolloweridIndex": + mainFollowersData + .iamPrincipalXid!, + }); + }, + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric( + vertical: 16.h, + horizontal: 16.w), + child: Row( + children: [ + mainFollowersData.follower! + .profilePhoto == + null || + mainFollowersData + .follower! + .profilePhoto! + .isEmpty + ? CircleAvatar( + backgroundImage: + const AssetImage( + 'assets/images/png/Ellipse 43.png'), + radius: 25.r, + ) + : CircleAvatar( + backgroundImage: NetworkImage( + mainFollowersData + .follower! + .profilePhoto!), + radius: 25.r, + ), + sizedBoxWidth(10.w), + Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + mainFollowersData + .follower! + .fullName == + null || + mainFollowersData + .follower! + .fullName! + .isEmpty == + true + ? text16w400_FCFCFC( + "Regroup") + : text16w400_FCFCFC( + mainFollowersData + .follower! + .fullName!), + sizedBoxHeight(4.h), + mainFollowersData + .follower! + .userName == + null || + mainFollowersData + .follower! + .userName! + .isEmpty == + true + ? text12w400_FCFCFC_blur( + "regroup") + : text12w400_FCFCFC_blur( + mainFollowersData + .follower! + .userName!) + ], + ), + const Spacer(), + PopupMenuButton( + surfaceTintColor: + const Color( + 0xFF222935), + constraints: + BoxConstraints + .tightFor( + width: + 176.w), + offset: + const Offset(0, 20), + color: const Color( + 0xFF222935), + tooltip: "", + itemBuilder: + (BuildContext + context) => + [ + PopupMenuItem( + // onTap: () {}, + onTap: + () async { + setState( + () { + removeid = + followersobj!.data![index].follower!.id ?? + 0; + followersobj!.data!.removeWhere((item) => + item.follower!.id == + removeid); + RemoveUploadata(); + }); + }, + child: + Padding( + padding: EdgeInsets.symmetric( + horizontal: + 12.w), + child: + Row( + children: [ + text14400white( + "Remove user"), + const Spacer(), + Image + .asset( + "assets/images/png/fluent_delete-28-regular.png", + height: + 15.h, + width: + 15.w, + ) + ], + ), + ), + ), + const PopupMenuDivider(), + PopupMenuItem( + onTap: + () {}, + child: + Padding( + padding: EdgeInsets.symmetric( + horizontal: + 12.w), + child: + Row( + children: [ + text14400white( + "Message user"), + const Spacer(), + Image + .asset( + "assets/images/png/fluent_chat-20-regular.png", + height: + 20.h, + width: + 20.w, + ) + ], + ), + ), + ), + const PopupMenuDivider(), + PopupMenuItem( + onTap: + () async { + setState( + () { + blockid = + followersobj!.data![index].follower!.id ?? + 0; + followersobj!.data!.removeWhere((item) => + item.follower!.id == + blockid); + BlockUploadata(); + }); + }, + child: + Padding( + padding: EdgeInsets.symmetric( + horizontal: + 12.w), + child: + Row( + children: [ + text14400white( + "Block user"), + const Spacer(), + Image + .asset( + "assets/images/png/blockchat.png", + height: + 25.h, + width: + 25.w, + ) + ], + ), + ), + ), + ], + child: SizedBox( + height: 20, + width: 20, + child: Center( + child: Image.asset( + "assets/images/png/Group 1000004071.png", + height: 22.h, + width: 4.w, + ), + ), + )), + ], + ), + ) + ], + ), + ); + }, + ); + } + }, + ), + ]) + ])) + ]) + : Stack(children: [ + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: + AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), + ), + SingleChildScrollView( + child: Column(children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: CustomTextFormField( + leadingIcon: SizedBox( + height: 23, + width: 23, + child: Center( + child: Image.asset( + "assets/images/png/ion_search-outline.png", + height: 23, + width: 23, + ), + ), + ), + texttype: TextInputType.text, + inputFormatters: [ + RemoveEmojiInputFormatter(), + ], + onInput: (value) { + if (fromBusFollower == 'GuestBusFollowers') { + GuestProfileApi().getGuestfollowers( + guestUserBusid, value, + streamController: guestsearchcontroller); + } + GuestProfileApi().getGuestfollowers( + guestUserid, value, + streamController: guestsearchcontroller); }, - ); - } - }, - ), - ]) - ])) - ])); - - // Stack(children: [ - // Container( - // decoration: const BoxDecoration( - // image: DecorationImage( - // image: AssetImage("assets/images/png/Ellipse 1496.png"), - // fit: BoxFit.fill)), - // ), - // SingleChildScrollView( - // child: Column(children: [ - // Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - // Padding( - // padding: EdgeInsets.symmetric(horizontal: 16.w), - // child: CustomTextFormField( - // leadingIcon: SizedBox( - // height: 23, - // width: 23, - // child: Center( - // child: Image.asset( - // "assets/images/png/ion_search-outline.png", - // height: 23, - // width: 23, - // ), - // ), - // ), - // texttype: TextInputType.text, - // inputFormatters: [ - // RemoveEmojiInputFormatter(), - // ], - // onInput: (value) { - // Profilegetmethod().getFollowers(value, - // streamController: searchcontroller); - // }, - // hintText: "Search people", - // ), - // ), - // sizedBoxHeight(25.h), - // StreamBuilder( - // stream: searchcontroller.stream, - // builder: (ctx, snapshot) { - // if (snapshot.connectionState == ConnectionState.waiting) { - // // Display shimmer effect while waiting for data - // return Center(child: CircularProgressIndicator()); - // } else if (snapshot.hasError) { - // // Handle error state - // return Center( - // child: Text( - // '${snapshot.error} occurred', - // style: TextStyle(fontSize: 18), - // ), - // ); - // } else { - // // Data has been loaded, show actual UI - // return followersobj!.data!.isEmpty - // ? _buildNoDataBody(context) - // : - // // ListView.builder( - // // shrinkWrap: true, - // // itemCount: followersobj!.data!.length, - // // itemBuilder: (context, index) { - // // return Column( - // // children: [ - // // followerWidget( - // // imagePath: followersobj?.data?[index] - // // .follower?.profilePhoto ?? - // // "", - // // // followersData[index]["imagePath"], - // // title: followersobj?.data?[index].follower - // // ?.fullName ?? - // // "", - // // // followersData[index]["title"], - // // subtitle: followersobj?.data?[index] - // // .follower?.userName ?? - // // "", - // // blockonTap: () { - // // BlockUploadata(followersobj! - // // .data![index].follower!.id); - // // } - // // // followersData[index]["subtitle"] - // // ), - // // if (index != followersobj!.data!.length - 1) - // // commonDivider(), - // // ], - // // ); - // // }, - // // ); - - // ListView.separated( - // physics: ScrollPhysics(), - // shrinkWrap: true, - // itemCount: followersobj!.data!.length, - // separatorBuilder: - // (BuildContext context, int index) { - // return commonDivider(); - // }, - // itemBuilder: (context, index) { - // return Column( - // children: [ - // Padding( - // padding: EdgeInsets.symmetric( - // vertical: 16.h, horizontal: 16.w), - // child: Row( - // children: [ - // followersobj!.data![index].follower! - // .profilePhoto == - // null || - // followersobj! - // .data![index] - // .follower! - // .profilePhoto! - // .isEmpty - // ? CircleAvatar( - // backgroundImage: AssetImage( - // 'assets/images/png/Ellipse 43.png'), - // radius: 25.r, - // ) - // : CircleAvatar( - // backgroundImage: NetworkImage( - // followersobj! - // .data![index] - // .follower! - // .profilePhoto!), - // radius: 25.r, - // ), - // sizedBoxWidth(10.w), - // Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // followersobj!.data![index].follower! - // .fullName == - // null || - // followersobj! - // .data![index] - // .follower! - // .fullName! - // .isEmpty == - // true - // ? text16w400_FCFCFC("Regroup") - // : text16w400_FCFCFC( - // followersobj!.data![index] - // .follower!.fullName!), - // sizedBoxHeight(4.h), - // followersobj!.data![index].follower! - // .userName == - // null || - // followersobj! - // .data![index] - // .follower! - // .userName! - // .isEmpty == - // true - // ? text12w400_FCFCFC_blur( - // "regroup") - // : text12w400_FCFCFC_blur( - // followersobj!.data![index] - // .follower!.userName!) - // ], - // ), - // Spacer(), - // PopupMenuButton( - // surfaceTintColor: Color(0xFF222935), - // constraints: - // BoxConstraints.tightFor( - // width: 176.w), - // offset: Offset(0, 20), - // color: Color(0xFF222935), - // tooltip: "", - // itemBuilder: (BuildContext - // context) => - // [ - // PopupMenuItem( - // // onTap: () {}, - // onTap: () async { - // setState(() { - // removeid = followersobj! - // .data![index] - // .follower! - // .id ?? - // 0; - // followersobj!.data! - // .removeWhere((item) => - // item.follower! - // .id == - // removeid); - // RemoveUploadata(); - // }); - // }, - // child: Padding( - // padding: - // EdgeInsets.symmetric( - // horizontal: 12.w), - // child: Row( - // children: [ - // text14400white( - // "Remove user"), - // Spacer(), - // Image.asset( - // "assets/images/png/fluent_delete-28-regular.png", - // height: 15.h, - // width: 15.w, - // ) - // ], - // ), - // ), - // ), - // PopupMenuDivider(), - // PopupMenuItem( - // onTap: () {}, - // child: Padding( - // padding: - // EdgeInsets.symmetric( - // horizontal: 12.w), - // child: Row( - // children: [ - // text14400white( - // "Message user"), - // Spacer(), - // Image.asset( - // "assets/images/png/fluent_chat-20-regular.png", - // height: 20.h, - // width: 20.w, - // ) - // ], - // ), - // ), - // ), - // PopupMenuDivider(), - // PopupMenuItem( - // onTap: () async { - // setState(() { - // blockid = followersobj! - // .data![index] - // .follower! - // .id ?? - // 0; - // followersobj!.data! - // .removeWhere((item) => - // item.follower! - // .id == - // blockid); - // BlockUploadata(); - // }); - // }, - // child: Padding( - // padding: - // EdgeInsets.symmetric( - // horizontal: 12.w), - // child: Row( - // children: [ - // text14400white( - // "Block user"), - // Spacer(), - // Image.asset( - // "assets/images/png/blockchat.png", - // height: 25.h, - // width: 25.w, - // ) - // ], - // ), - // ), - // ), - // ], - // child: Container( - // height: 20, - // width: 20, - // child: Center( - // child: Image.asset( - // "assets/images/png/Group 1000004071.png", - // height: 22.h, - // width: 4.w, - // ), - // ), - // )), - // ], - // ), - // ) - // ], - // ); - // }, - // ); - // } - // }, - // ), - // ]) - // ])) - // ])); + hintText: "Search people", + ), + ), + sizedBoxHeight(25.h), + StreamBuilder( + stream: guestsearchcontroller.stream, + builder: (ctx, snapshot) { + if (snapshot.connectionState == + ConnectionState.waiting) { + // Display shimmer effect while waiting for data + return const Center( + child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + // Handle error state + return Center( + child: Text( + '${snapshot.error} occurred', + style: const TextStyle(fontSize: 18), + ), + ); + } else { + // Data has been loaded, show actual UI + return getguestfollowersobj!.data!.isEmpty + ? _buildNoDataBody(context) + : ListView.separated( + physics: const ScrollPhysics(), + shrinkWrap: true, + itemCount: + getguestfollowersobj!.data!.length, + separatorBuilder: + (BuildContext context, int index) { + return commonDivider(); + }, + itemBuilder: (context, index) { + var guestFollowerData = + getguestfollowersobj!.data![index]; + return GestureDetector( + onTap: () { + guestFollowerData.follower! + .principleTypeXid == + 1 + ? Get.toNamed( + RouteName + .profiletabindguest, + arguments: { + "FolloweridIndex": + guestFollowerData + .iamPrincipalXid, + }) + : Get.toNamed( + RouteName + .profiletabbusguest, + arguments: { + "FolloweridIndex": + guestFollowerData + .iamPrincipalXid, + }); + }, + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric( + vertical: 16.h, + horizontal: 16.w), + child: Row( + children: [ + guestFollowerData.follower! + .profilePhoto == + null || + guestFollowerData + .follower! + .profilePhoto! + .isEmpty + ? CircleAvatar( + backgroundImage: + const AssetImage( + 'assets/images/png/Ellipse 43.png'), + radius: 25.r, + ) + : CircleAvatar( + backgroundImage: NetworkImage( + guestFollowerData + .follower! + .profilePhoto!), + radius: 25.r, + ), + sizedBoxWidth(10.w), + Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + guestFollowerData + .follower! + .fullName == + null || + guestFollowerData + .follower! + .fullName! + .isEmpty == + true + ? text16w400_FCFCFC( + "Regroup") + : text16w400_FCFCFC( + guestFollowerData + .follower! + .fullName!), + sizedBoxHeight(4.h), + guestFollowerData + .follower! + .userName == + null || + guestFollowerData + .follower! + .userName! + .isEmpty == + true + ? text12w400_FCFCFC_blur( + "regroup") + : text12w400_FCFCFC_blur( + guestFollowerData + .follower! + .userName!) + ], + ), + const Spacer(), + PopupMenuButton( + surfaceTintColor: + const Color( + 0xFF222935), + constraints: + BoxConstraints + .tightFor( + width: + 176.w), + offset: + const Offset(0, 20), + color: const Color( + 0xFF222935), + tooltip: "", + itemBuilder: + (BuildContext + context) => + [ + PopupMenuItem( + // onTap: () {}, + onTap: + () async { + // setState( + // () { + // removeid = + // getguestfollowersobj!.data![index].follower!.id ?? + // 0; + // getguestfollowersobj!.data!.removeWhere((item) => + // item.follower!.id == + // removeid); + // RemoveUploadata(); + // }); + }, + child: + Padding( + padding: EdgeInsets.symmetric( + horizontal: + 12.w), + child: + Row( + children: [ + text14400white( + ""), + const Spacer(), + Image + .asset( + "assets/images/png/fluent_delete-28-regular.png", + height: + 15.h, + width: + 15.w, + ) + ], + ), + ), + ), + const PopupMenuDivider(), + PopupMenuItem( + onTap: + () {}, + child: + Padding( + padding: EdgeInsets.symmetric( + horizontal: + 12.w), + child: + Row( + children: [ + text14400white( + "Message user"), + const Spacer(), + Image + .asset( + "assets/images/png/fluent_chat-20-regular.png", + height: + 20.h, + width: + 20.w, + ) + ], + ), + ), + ), + const PopupMenuDivider(), + PopupMenuItem( + onTap: + () async { + // setState( + // () { + // blockid = + // getguestfollowersobj!.data![index].follower!.id ?? + // 0; + // getguestfollowersobj!.data!.removeWhere((item) => + // item.follower!.id == + // blockid); + // BlockUploadata(); + // }); + }, + child: + Padding( + padding: EdgeInsets.symmetric( + horizontal: + 12.w), + child: + Row( + children: [ + text14400white( + "Block user"), + const Spacer(), + Image + .asset( + "assets/images/png/blockchat.png", + height: + 25.h, + width: + 25.w, + ) + ], + ), + ), + ), + ], + child: Container( + height: 20, + width: 20, + child: Center( + child: Image.asset( + "assets/images/png/Group 1000004071.png", + height: 22.h, + width: 4.w, + ), + ), + )), + ], + ), + ) + ], + ), + ); + }, + ); + } + }, + ), + ]) + ])) + ])); } Widget _buildNoDataBody(context) { diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Following/Following.dart b/lib/Feed Module/Main_Screens/ProfileTab/Following/Following.dart index 549f50c..31bc182 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Following/Following.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Following/Following.dart @@ -32,16 +32,30 @@ class _FollowingState extends State { StreamController(); var guestUserid = Get.arguments['UpdataGuestIdfollowing'] ?? ''; + + var fromBusFollowing = Get.arguments['From'] ?? ''; + + var guestBusUserid = Get.arguments['UpdataGuestBusIdfollowing'] ?? ''; + + var fromMainBusProfile = Get.arguments['From'] ?? ''; + @override void initState() { // TODO: implement initState var updata = ""; - Profilegetmethod().getFollowing(updata, streamController: searchcontroller); + if (fromMainBusProfile == 'MainBusProfile') { + Profilegetmethod() + .getFollowing(updata, streamController: searchcontroller); + } var guestupdata = ""; - - GuestProfileApi().getGuestfollowing(guestUserid, guestupdata, - streamController: guestsearchcontroller); + if (fromBusFollowing == 'GuestBusFollowing') { + GuestProfileApi().getGuestfollowing(guestBusUserid, guestupdata, + streamController: guestsearchcontroller); + } else { + GuestProfileApi().getGuestfollowing(guestUserid, guestupdata, + streamController: guestsearchcontroller); + } super.initState(); } @@ -79,495 +93,562 @@ class _FollowingState extends State { Widget build(BuildContext context) { return Scaffold( // key: _scaffoldKey1, - backgroundColor: Color(0xFF222935), + backgroundColor: const Color(0xFF222935), extendBody: true, resizeToAvoidBottomInset: false, - appBar: CommonAppbar( + appBar: const CommonAppbar( titleTxt: "Following", ), - body: Stack( - children: [ - Container( - decoration: const BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/images/png/Ellipse 1496.png"), - fit: BoxFit.fill)), - ), - SingleChildScrollView( - child: Column(children: [ - Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: EdgeInsets.symmetric(horizontal: 16.w), - child: CustomTextFormField( - leadingIcon: SizedBox( - height: 23, - width: 23, - child: Center( - child: Image.asset( - "assets/images/png/ion_search-outline.png", + body: fromMainBusProfile == 'MainBusProfile' + ? Stack(children: [ + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), + ), + SingleChildScrollView( + child: Column(children: [ + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: CustomTextFormField( + leadingIcon: SizedBox( height: 23, width: 23, + child: Center( + child: Image.asset( + "assets/images/png/ion_search-outline.png", + height: 23, + width: 23, + ), + ), ), + hintText: "Search people", + texttype: TextInputType.text, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + ], + onInput: (value) { + // Onboard().postGroupsearch({"search": value}, + // streamController: searchcontroller); + // searchGroups(value!); + Profilegetmethod().getFollowing(value, + streamController: searchcontroller); + }, ), ), - hintText: "Search people", - texttype: TextInputType.text, - inputFormatters: [ - // LengthLimitingTextInputFormatter(20), - RemoveEmojiInputFormatter(), - ], - onInput: (value) { - GuestProfileApi().getGuestfollowing(guestUserid, value, - streamController: guestsearchcontroller); - }, - ), - ), - sizedBoxHeight(25.h), - StreamBuilder( - stream: guestsearchcontroller.stream, - builder: (ctx, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - // Display shimmer effect while waiting for data - return Center(child: CircularProgressIndicator()); - } else if (snapshot.hasError) { - // Handle error state - return Center( - child: Text( - '${snapshot.error} occurred', - style: TextStyle(fontSize: 18), - ), - ); - } else { - // Data has been loaded, show actual UI - return getguestfollowingobj!.data!.isEmpty - ? _buildNoDataBody(context) - : ListView.separated( - physics: ScrollPhysics(), - shrinkWrap: true, - itemCount: getguestfollowingobj!.data!.length, - separatorBuilder: - (BuildContext context, int index) { - return commonDivider(); - }, - itemBuilder: (context, index) { - - return - Column( - children: [ - Padding( - padding: EdgeInsets.symmetric( - vertical: 16.h, horizontal: 16.w), - child: Row( + sizedBoxHeight(25.h), + StreamBuilder( + stream: searchcontroller.stream, + builder: (ctx, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + // Display shimmer effect while waiting for data + return const Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + // Handle error state + return Center( + child: Text( + '${snapshot.error} occurred', + style: const TextStyle(fontSize: 18), + ), + ); + } else { + // Data has been loaded, show actual UI + return followingobj!.data!.isEmpty + ? _buildNoDataBody(context) + : ListView.separated( + physics: const ScrollPhysics(), + shrinkWrap: true, + itemCount: followingobj!.data!.length, + separatorBuilder: + (BuildContext context, int index) { + return commonDivider(); + }, + itemBuilder: (context, index) { + var mainFollowing = + followingobj!.data![index]; + return + // Column( + // children: [ + // Followinglist( + // imagePath: followingobj?.data?[index] + // .following?.profilePhoto ?? + // '', + // title: followingobj! + // .data?[index].following?.fullName ?? + // '', + // subtitle: followingobj! + // .data?[index].following?.userName ?? + // '', + // unfollowontap: (id) => Uploadata(id), + // unfollowindex: followingobj! + // .data![index].following!.id!, + // ), + // if (index != followingobj!.data!.length - 1) + // commonDivider(), + // ], + // ); + GestureDetector( + onTap: () { + mainFollowing.following! + .principleTypeXid == + 1 + ? Get.toNamed( + RouteName.profiletabindguest, + arguments: { + "FollowingidIndex": mainFollowing + .followingIamPrincipalXid!, + }) + : Get.toNamed( + RouteName.profiletabbusguest, + arguments: { + "FollowingidIndex": mainFollowing + .followingIamPrincipalXid!, + }); + }, + child: Column( children: [ - followingobj!.data![index].following! - .profilePhoto == - null || - followingobj! - .data![index] - .following! - .profilePhoto! - .isEmpty - ? CircleAvatar( - backgroundImage: AssetImage( - 'assets/images/png/Ellipse 43.png'), - radius: 25.r, - ) - : CircleAvatar( - backgroundImage: NetworkImage( - followingobj! - .data![index] - .following! - .profilePhoto!), - radius: 25.r, + Padding( + padding: EdgeInsets.symmetric( + vertical: 16.h, horizontal: 16.w), + child: Row( + children: [ + mainFollowing.following! + .profilePhoto == + null || + mainFollowing.following! + .profilePhoto!.isEmpty + ? CircleAvatar( + backgroundImage: + const AssetImage( + 'assets/images/png/Ellipse 43.png'), + radius: 25.r, + ) + : CircleAvatar( + backgroundImage: + NetworkImage( + mainFollowing + .following! + .profilePhoto!), + radius: 25.r, + ), + sizedBoxWidth(10.w), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + mainFollowing.following! + .fullName == + null || + mainFollowing + .following! + .fullName! + .isEmpty + ? text16w400_FCFCFC( + "Regroup") + : text16w400_FCFCFC( + mainFollowing + .following! + .fullName!), + sizedBoxHeight(4.h), + mainFollowing.following! + .userName == + null || + mainFollowing + .following! + .userName! + .isEmpty + ? text12w400_FCFCFC_blur( + "regroup") + : text12w400_FCFCFC_blur( + mainFollowing + .following! + .userName!) + ], ), - sizedBoxWidth(10.w), - Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - followingobj! - .data![index] - .following! - .fullName == - null || - followingobj! - .data![index] - .following! - .fullName! - .isEmpty - ? text16w400_FCFCFC("Regroup") - : text16w400_FCFCFC( - followingobj!.data![index] - .following!.fullName!), - sizedBoxHeight(4.h), - followingobj! - .data![index] - .following! - .userName == - null || - followingobj! - .data![index] - .following! - .userName! - .isEmpty - ? text12w400_FCFCFC_blur( - "regroup") - : text12w400_FCFCFC_blur( - followingobj!.data![index] - .following!.userName!) - ], + const Spacer(), + PopupMenuButton( + surfaceTintColor: + const Color(0xFF222935), + constraints: + BoxConstraints.tightFor( + width: 176.w), + offset: const Offset(0, 20), + color: + const Color(0xFF222935), + tooltip: "", + itemBuilder: (BuildContext + context) => + [ + PopupMenuItem( + onTap: () async { + setState(() { + unfollowid = + mainFollowing + .following! + .id ?? + 0; + // followingobj!.data!.removeAt(index); + followingobj! + .data! + .removeWhere((item) => + item.following! + .id == + unfollowid); + Uploadata(); + }); + }, + child: Padding( + padding: EdgeInsets + .symmetric( + horizontal: + 12.w), + child: Row( + children: [ + text14400white( + "Unfollow user"), + const Spacer(), + Image.asset( + "assets/images/png/Black1323e.png", + height: 20.h, + width: 20.w, + ) + ], + ), + ), + ), + const PopupMenuDivider(), + PopupMenuItem( + onTap: () {}, + child: Padding( + padding: EdgeInsets + .symmetric( + horizontal: + 12.w), + child: Row( + children: [ + text14400white( + "Message user"), + const Spacer(), + Image.asset( + "assets/images/png/fluent_chat-20-22.png", + height: 20.h, + width: 20.w, + ) + ], + ), + ), + ), + ], + child: Container( + height: 20, + width: 20, + child: Center( + child: Image.asset( + "assets/images/png/Group 1000004071.png", + height: 22.h, + width: 4.w, + ), + ), + )), + ], + ), ), - Spacer(), - PopupMenuButton( - surfaceTintColor: Color(0xFF222935), - constraints: - BoxConstraints.tightFor( - width: 176.w), - offset: Offset(0, 20), - color: Color(0xFF222935), - tooltip: "", - itemBuilder: (BuildContext - context) => - [ - PopupMenuItem( - onTap: () async { - setState(() { - unfollowid = - followingobj! - .data![ - index] - .following! - .id ?? - 0; - // followingobj!.data!.removeAt(index); - followingobj!.data! - .removeWhere((item) => - item.following! - .id == - unfollowid); - Uploadata(); - }); - }, - child: Padding( - padding: - EdgeInsets.symmetric( - horizontal: 12.w), - child: Row( - children: [ - text14400white( - "Unfollow user"), - Spacer(), - Image.asset( - "assets/images/png/Black1323e.png", - height: 20.h, - width: 20.w, - ) - ], - ), - ), - ), - PopupMenuDivider(), - PopupMenuItem( - onTap: () {}, - child: Padding( - padding: - EdgeInsets.symmetric( - horizontal: 12.w), - child: Row( - children: [ - text14400white( - "Message user"), - Spacer(), - Image.asset( - "assets/images/png/fluent_chat-20-22.png", - height: 20.h, - width: 20.w, - ) - ], - ), - ), - - ), - ] - ), - ] - ) - ), - ], - ); - } - ); - } - } - ) - - - ], - + ], + ), + ); + }, + ); + } + }, + ), + ]) + ])) + ]) + : Stack( + children: [ + Container( + decoration: const BoxDecoration( + image: DecorationImage( + image: + AssetImage("assets/images/png/Ellipse 1496.png"), + fit: BoxFit.fill)), + ), + SingleChildScrollView( + child: Column(children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.w), + child: CustomTextFormField( + leadingIcon: SizedBox( + height: 23, + width: 23, + child: Center( + child: Image.asset( + "assets/images/png/ion_search-outline.png", + height: 23, + width: 23, ), - ] - ) - )] - - - ) + ), + ), + hintText: "Search people", + texttype: TextInputType.text, + inputFormatters: [ + // LengthLimitingTextInputFormatter(20), + RemoveEmojiInputFormatter(), + ], + onInput: (value) { + // GuestProfileApi().getGuestfollowing(guestUserid, value, + // streamController: guestsearchcontroller); + if (fromBusFollowing == 'GuestBusFollowing') { + GuestProfileApi().getGuestfollowing( + guestBusUserid, value, + streamController: guestsearchcontroller); + } else { + GuestProfileApi().getGuestfollowing( + guestUserid, value, + streamController: guestsearchcontroller); + } + }, + ), + ), + sizedBoxHeight(25.h), + StreamBuilder( + stream: guestsearchcontroller.stream, + builder: (ctx, snapshot) { + if (snapshot.connectionState == + ConnectionState.waiting) { + // Display shimmer effect while waiting for data + return const Center( + child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + // Handle error state + return Center( + child: Text( + '${snapshot.error} occurred', + style: const TextStyle(fontSize: 18), + ), + ); + } else { + // Data has been loaded, show actual UI + return getguestfollowingobj!.data!.isEmpty + ? _buildNoDataBody(context) + : ListView.separated( + physics: const ScrollPhysics(), + shrinkWrap: true, + itemCount: + getguestfollowingobj!.data!.length, + separatorBuilder: + (BuildContext context, int index) { + return commonDivider(); + }, + itemBuilder: (context, index) { + var guestFollowing = + getguestfollowingobj!.data![index]; + return GestureDetector( + onTap: () { + guestFollowing.following! + .principleTypeXid == + 1 + ? Get.toNamed( + RouteName + .profiletabindguest, + arguments: { + "FollowingidIndex": + guestFollowing + .followingIamPrincipalXid!, + }) + : Get.toNamed( + RouteName + .profiletabbusguest, + arguments: { + "FollowingidIndex": + guestFollowing + .followingIamPrincipalXid!, + }, + ); + }, + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric( + vertical: 16.h, + horizontal: 16.w), + child: Row( + children: [ + guestFollowing.following! + .profilePhoto == + null || + guestFollowing + .following! + .profilePhoto! + .isEmpty + ? CircleAvatar( + backgroundImage: + const AssetImage( + 'assets/images/png/Ellipse 43.png'), + radius: 25.r, + ) + : CircleAvatar( + backgroundImage: + NetworkImage( + guestFollowing + .following! + .profilePhoto!), + radius: 25.r, + ), + sizedBoxWidth(10.w), + Column( + crossAxisAlignment: + CrossAxisAlignment + .start, + children: [ + guestFollowing.following! + .fullName == + null || + guestFollowing + .following! + .fullName! + .isEmpty + ? text16w400_FCFCFC( + "Regroup") + : text16w400_FCFCFC( + guestFollowing + .following! + .fullName!), + sizedBoxHeight(4.h), + guestFollowing.following! + .userName == + null || + guestFollowing + .following! + .userName! + .isEmpty + ? text12w400_FCFCFC_blur( + "regroup") + : text12w400_FCFCFC_blur( + guestFollowing + .following! + .userName!) + ], + ), + const Spacer(), + PopupMenuButton( + surfaceTintColor: + const Color( + 0xFF222935), + constraints: + BoxConstraints + .tightFor( + width: + 176.w), + offset: + const Offset(0, 20), + color: const Color( + 0xFF222935), + tooltip: "", + itemBuilder: + (BuildContext + context) => + [ + PopupMenuItem( + onTap: + () async { + // setState( + // () { + // unfollowid = + // getguestfollowingobj!.data![index].following!.id ?? + // 0; + // // followingobj!.data!.removeAt(index); + // getguestfollowingobj!.data!.removeWhere((item) => + // item.following!.id == + // unfollowid); + // Uploadata(); + // }); + }, + child: + Padding( + padding: EdgeInsets.symmetric( + horizontal: + 12.w), + child: + Row( + children: [ + text14400white( + ""), + const Spacer(), + Image + .asset( + "assets/images/png/Black1323e.png", + height: + 20.h, + width: + 20.w, + ) + ], + ), + ), + ), + const PopupMenuDivider(), + PopupMenuItem( + onTap: + () {}, + child: + Padding( + padding: EdgeInsets.symmetric( + horizontal: + 12.w), + child: + Row( + children: [ + text14400white( + "Message user"), + const Spacer(), + Image + .asset( + "assets/images/png/fluent_chat-20-22.png", + height: + 20.h, + width: + 20.w, + ) + ], + ), + ), + ), + ], + child: Container( + height: 20, + width: 20, + child: Center( + child: Image.asset( + "assets/images/png/Group 1000004071.png", + height: 22.h, + width: 4.w, + ), + ), + )), + ], + ), + ), + ], + ), + ); + }, + ); + } + }, + ), + ]) + ])) + ], + ), ); } - - - - - - // Stack( - // children: [ - // Container( - // decoration: const BoxDecoration( - // image: DecorationImage( - // image: AssetImage("assets/images/png/Ellipse 1496.png"), - // fit: BoxFit.fill)), - // ), - // SingleChildScrollView( - // child: Column(children: [ - // Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - // Padding( - // padding: EdgeInsets.symmetric(horizontal: 16.w), - // child: CustomTextFormField( - // leadingIcon: SizedBox( - // height: 23, - // width: 23, - // child: Center( - // child: Image.asset( - // "assets/images/png/ion_search-outline.png", - // height: 23, - // width: 23, - // ), - // ), - // ), - // hintText: "Search people", - // texttype: TextInputType.text, - // inputFormatters: [ - // // LengthLimitingTextInputFormatter(20), - // RemoveEmojiInputFormatter(), - // ], - // onInput: (value) { - // // Onboard().postGroupsearch({"search": value}, - // // streamController: searchcontroller); - // // searchGroups(value!); - // Profilegetmethod().getFollowing(value, - // streamController: searchcontroller); - // }, - // ), - // ), - // sizedBoxHeight(25.h), - // StreamBuilder( - // stream: searchcontroller.stream, - // builder: (ctx, snapshot) { - // if (snapshot.connectionState == ConnectionState.waiting) { - // // Display shimmer effect while waiting for data - // return Center(child: CircularProgressIndicator()); - // } else if (snapshot.hasError) { - // // Handle error state - // return Center( - // child: Text( - // '${snapshot.error} occurred', - // style: TextStyle(fontSize: 18), - // ), - // ); - // } else { - // // Data has been loaded, show actual UI - // return followingobj!.data!.isEmpty - // ? _buildNoDataBody(context) - // : ListView.separated( - // physics: ScrollPhysics(), - // shrinkWrap: true, - // itemCount: followingobj!.data!.length, - // separatorBuilder: - // (BuildContext context, int index) { - // return commonDivider(); - // }, - // itemBuilder: (context, index) { - // return - // // Column( - // // children: [ - // // Followinglist( - // // imagePath: followingobj?.data?[index] - // // .following?.profilePhoto ?? - // // '', - // // title: followingobj! - // // .data?[index].following?.fullName ?? - // // '', - // // subtitle: followingobj! - // // .data?[index].following?.userName ?? - // // '', - // // unfollowontap: (id) => Uploadata(id), - // // unfollowindex: followingobj! - // // .data![index].following!.id!, - // // ), - // // if (index != followingobj!.data!.length - 1) - // // commonDivider(), - // // ], - // // ); - // Column( - // children: [ - // Padding( - // padding: EdgeInsets.symmetric( - // vertical: 16.h, horizontal: 16.w), - // child: Row( - // children: [ - // followingobj!.data![index].following! - // .profilePhoto == - // null || - // followingobj! - // .data![index] - // .following! - // .profilePhoto! - // .isEmpty - // ? CircleAvatar( - // backgroundImage: AssetImage( - // 'assets/images/png/Ellipse 43.png'), - // radius: 25.r, - // ) - // : CircleAvatar( - // backgroundImage: NetworkImage( - // followingobj! - // .data![index] - // .following! - // .profilePhoto!), - // radius: 25.r, - // ), - // sizedBoxWidth(10.w), - // Column( - // crossAxisAlignment: - // CrossAxisAlignment.start, - // children: [ - // followingobj! - // .data![index] - // .following! - // .fullName == - // null || - // followingobj! - // .data![index] - // .following! - // .fullName! - // .isEmpty - // ? text16w400_FCFCFC("Regroup") - // : text16w400_FCFCFC( - // followingobj!.data![index] - // .following!.fullName!), - // sizedBoxHeight(4.h), - // followingobj! - // .data![index] - // .following! - // .userName == - // null || - // followingobj! - // .data![index] - // .following! - // .userName! - // .isEmpty - // ? text12w400_FCFCFC_blur( - // "regroup") - // : text12w400_FCFCFC_blur( - // followingobj!.data![index] - // .following!.userName!) - // ], - // ), - // Spacer(), - // PopupMenuButton( - // surfaceTintColor: Color(0xFF222935), - // constraints: - // BoxConstraints.tightFor( - // width: 176.w), - // offset: Offset(0, 20), - // color: Color(0xFF222935), - // tooltip: "", - // itemBuilder: (BuildContext - // context) => - // [ - // PopupMenuItem( - // onTap: () async { - // setState(() { - // unfollowid = - // followingobj! - // .data![ - // index] - // .following! - // .id ?? - // 0; - // // followingobj!.data!.removeAt(index); - // followingobj!.data! - // .removeWhere((item) => - // item.following! - // .id == - // unfollowid); - // Uploadata(); - // }); - // }, - // child: Padding( - // padding: - // EdgeInsets.symmetric( - // horizontal: 12.w), - // child: Row( - // children: [ - // text14400white( - // "Unfollow user"), - // Spacer(), - // Image.asset( - // "assets/images/png/Black1323e.png", - // height: 20.h, - // width: 20.w, - // ) - // ], - // ), - // ), - // ), - // PopupMenuDivider(), - // PopupMenuItem( - // onTap: () {}, - // child: Padding( - // padding: - // EdgeInsets.symmetric( - // horizontal: 12.w), - // child: Row( - // children: [ - // text14400white( - // "Message user"), - // Spacer(), - // Image.asset( - // "assets/images/png/fluent_chat-20-22.png", - // height: 20.h, - // width: 20.w, - // ) - // ], - // ), - // ), - // ), - // ], - // child: Container( - // height: 20, - // width: 20, - // child: Center( - // child: Image.asset( - // "assets/images/png/Group 1000004071.png", - // height: 22.h, - // width: 4.w, - // ), - // ), - // )), - // ], - // ), - // ), - // ], - // ); - // }, - // ); - // } - // }, - // ), - // ]) - // ])) - // ], - // ), Widget _buildNoDataBody(context) { return Center( diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GetGuestFollowers.dart b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GetGuestFollowers.dart index eaa866c..84e829d 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GetGuestFollowers.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GetGuestFollowers.dart @@ -61,14 +61,21 @@ class Follower { String? userName; String? fullName; String? profilePhoto; + int? principleTypeXid; - Follower({this.id, this.userName, this.fullName, this.profilePhoto}); + Follower( + {this.id, + this.userName, + this.fullName, + this.profilePhoto, + this.principleTypeXid}); Follower.fromJson(Map json) { id = json['id']; userName = json['user_name']; fullName = json['full_name']; profilePhoto = json['profile_photo']; + principleTypeXid = json['principal_type_xid']; } Map toJson() { @@ -77,6 +84,8 @@ class Follower { data['user_name'] = this.userName; data['full_name'] = this.fullName; data['profile_photo'] = this.profilePhoto; + data['principal_type_xid'] = this.principleTypeXid; + return data; } } diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GetGuestFollowing.dart b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GetGuestFollowing.dart index ad8a848..e6eb03c 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GetGuestFollowing.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GetGuestFollowing.dart @@ -61,14 +61,17 @@ class Following { String? userName; String? fullName; String? profilePhoto; + int? principleTypeXid; - Following({this.id, this.userName, this.fullName, this.profilePhoto}); + + Following({this.id, this.userName, this.fullName, this.profilePhoto, this.principleTypeXid}); Following.fromJson(Map json) { id = json['id']; userName = json['user_name']; fullName = json['full_name']; profilePhoto = json['profile_photo']; + principleTypeXid = json['principal_type_xid']; } Map toJson() { @@ -77,6 +80,7 @@ class Following { data['user_name'] = this.userName; data['full_name'] = this.fullName; data['profile_photo'] = this.profilePhoto; + data['principal_type_xid'] = this.principleTypeXid; return data; } } diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GuestGetProfileDataIndi.dart b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GuestGetProfileDataIndi.dart index fa2e75c..28227ab 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GuestGetProfileDataIndi.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/Model/GuestGetProfileDataIndi.dart @@ -31,6 +31,7 @@ class Data { String? userName; String? fullName; String? gender; + String? profilePhoto; String? dateOfBirth; List? interest; String? about; @@ -42,13 +43,17 @@ class Data { Follows? follows; List? timelines; int? accountVisibility; + List? myJoinedGroups; List? myJoinedSubgroups; + List? certifications; + int? daysBeforeJoined; Data( {this.id, this.userName, this.fullName, this.gender, + this.profilePhoto, this.dateOfBirth, this.interest, this.about, @@ -60,15 +65,19 @@ class Data { this.follows, this.timelines, this.accountVisibility, - this.myJoinedSubgroups}); + this.myJoinedGroups, + this.myJoinedSubgroups, + this.certifications, + this.daysBeforeJoined}); Data.fromJson(Map json) { id = json['id']; userName = json['user_name']; fullName = json['full_name']; gender = json['gender']; + profilePhoto = json['profile_photo']; dateOfBirth = json['date_of_birth']; - if (json['interest'] != null) { + if (json['interest'] != null) { interest = []; json['interest'].forEach((v) { interest!.add(new Interest.fromJson(v)); @@ -89,12 +98,25 @@ class Data { }); } accountVisibility = json['account_visibility']; + if (json['my_joined_groups'] != null) { + myJoinedGroups = []; + json['my_joined_groups'].forEach((v) { + myJoinedGroups!.add(new MyJoinedGroups.fromJson(v)); + }); + } if (json['my_joined_subgroups'] != null) { myJoinedSubgroups = []; json['my_joined_subgroups'].forEach((v) { myJoinedSubgroups!.add(new MyJoinedSubgroups.fromJson(v)); }); } + if (json['certifications'] != null) { + certifications = []; + json['certifications'].forEach((v) { + certifications!.add(new Certifications.fromJson(v)); + }); + } + daysBeforeJoined = json['days_before_joined']; } Map toJson() { @@ -103,6 +125,7 @@ class Data { data['user_name'] = this.userName; data['full_name'] = this.fullName; data['gender'] = this.gender; + data['profile_photo'] = this.profilePhoto; data['date_of_birth'] = this.dateOfBirth; if (this.interest != null) { data['interest'] = this.interest!.map((v) => v.toJson()).toList(); @@ -120,10 +143,19 @@ class Data { data['timelines'] = this.timelines!.map((v) => v.toJson()).toList(); } data['account_visibility'] = this.accountVisibility; + if (this.myJoinedGroups != null) { + data['my_joined_groups'] = + this.myJoinedGroups!.map((v) => v.toJson()).toList(); + } if (this.myJoinedSubgroups != null) { data['my_joined_subgroups'] = this.myJoinedSubgroups!.map((v) => v.toJson()).toList(); } + if (this.certifications != null) { + data['certifications'] = + this.certifications!.map((v) => v.toJson()).toList(); + } + data['days_before_joined'] = this.daysBeforeJoined; return data; } } @@ -236,6 +268,58 @@ class Abilities { } } +class MyJoinedGroups { + int? id; + int? iamPrincipalXid; + int? manageGroupXid; + GroupData? groupData; + + MyJoinedGroups( + {this.id, this.iamPrincipalXid, this.manageGroupXid, this.groupData}); + + MyJoinedGroups.fromJson(Map json) { + id = json['id']; + iamPrincipalXid = json['iam_principal_xid']; + manageGroupXid = json['manage_group_xid']; + groupData = json['group_data'] != null + ? new GroupData.fromJson(json['group_data']) + : null; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['iam_principal_xid'] = this.iamPrincipalXid; + data['manage_group_xid'] = this.manageGroupXid; + if (this.groupData != null) { + data['group_data'] = this.groupData!.toJson(); + } + return data; + } +} + +class GroupData { + int? id; + String? title; + String? groupImage; + + GroupData({this.id, this.title, this.groupImage}); + + GroupData.fromJson(Map json) { + id = json['id']; + title = json['title']; + groupImage = json['group_image']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['title'] = this.title; + data['group_image'] = this.groupImage; + return data; + } +} + class MyJoinedSubgroups { int? id; int? iamPrincipalXid; @@ -294,3 +378,40 @@ class SubGroupData { return data; } } + +class Certifications { + int? id; + String? certificationName; + String? certificationImage; + String? certificationReason; + String? certificationDate; + int? iamPrincipalXid; + + Certifications( + {this.id, + this.certificationName, + this.certificationImage, + this.certificationReason, + this.certificationDate, + this.iamPrincipalXid}); + + Certifications.fromJson(Map json) { + id = json['id']; + certificationName = json['certification_name']; + certificationImage = json['certification_image']; + certificationReason = json['certification_reason']; + certificationDate = json['certification_date']; + iamPrincipalXid = json['iam_principal_xid']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['certification_name'] = this.certificationName; + data['certification_image'] = this.certificationImage; + data['certification_reason'] = this.certificationReason; + data['certification_date'] = this.certificationDate; + data['iam_principal_xid'] = this.iamPrincipalXid; + return data; + } +} diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Business/ProfileTabBusGuest.dart b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Business/ProfileTabBusGuest.dart index ade1a7f..5559c40 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Business/ProfileTabBusGuest.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Business/ProfileTabBusGuest.dart @@ -6,6 +6,7 @@ import 'package:regroup/Common/CommonGlassmorphism.dart'; import 'package:regroup/Common/CommonWidget.dart'; import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart'; import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Guest%20User/ViewModel/GuestProfileApi.dart'; +import 'package:regroup/Utils/Common/ShimmerCommon.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/texts.dart'; import 'package:regroup/resources/routes/route_name.dart'; @@ -24,7 +25,9 @@ class _profiletabBusGestState extends State { @override void initState() { // TODO: implement initState - updata = "64"; + updata = Get.arguments?['FolloweridIndex'] ?? + Get.arguments?['FollowingidIndex'] ?? + "64"; guestBusfuture = GuestProfileApi().getGuestProfileBus(updata); @@ -42,11 +45,13 @@ class _profiletabBusGestState extends State { future: guestBusfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( - child: CircularProgressIndicator( - color: Colors.blue, - ), - ); + return ShimmerCommon(); + + // Center( + // child: CircularProgressIndicator( + // color: Colors.blue, + // ), + // ); } if (snapshot.hasError) { @@ -76,14 +81,31 @@ class _profiletabBusGestState extends State { children: [ Stack( children: [ - Container( - height: 484.h, - width: double.infinity, - child: Image.asset( - "assets/images/png/Rectangle 49 (1).png", - fit: BoxFit.cover, - ), - ), + guestGetProfileBus!.data!.bannerImage != null + ? Container( + width: double.infinity, + height: 484.h, + decoration: ShapeDecoration( + image: DecorationImage( + image: Image( + image: NetworkImage( + guestGetProfileBus! + .data!.bannerImage ?? + ''), + ).image, + fit: BoxFit.cover, + ), + shape: LinearBorder(), + ), + ) + : Container( + height: 484.h, + width: double.infinity, + child: Image.asset( + "assets/images/png/Rectangle 49 (1).png", + fit: BoxFit.cover, + ), + ), Positioned.fill( child: Container( decoration: BoxDecoration( @@ -129,7 +151,13 @@ class _profiletabBusGestState extends State { GestureDetector( onTap: () { Get.toNamed( - RouteName.followers); + RouteName.followers, + arguments: { + 'From': + "GuestBusFollowers", + 'UpdataGuestBusIdfollowers': + updata + }); }, child: Column( children: [ @@ -168,7 +196,13 @@ class _profiletabBusGestState extends State { GestureDetector( onTap: () { Get.toNamed( - RouteName.following); + RouteName.following, + arguments: { + 'From': + "GuestBusFollowing", + 'UpdataGuestBusIdfollowing': + updata, + }); }, child: Column( children: [ @@ -266,7 +300,9 @@ class _profiletabBusGestState extends State { )), ), sizedBoxWidth(12.w), - text14400whiteblur("James Bothman"), + text14400whiteblur(guestGetProfileBus! + .data!.businessOwnerName ?? + "James Bothman"), ], ), sizedBoxHeight(20.h), @@ -288,7 +324,8 @@ class _profiletabBusGestState extends State { ), sizedBoxWidth(12.w), text14400whiteblur( - "www.exampledummywebsite.com"), + guestGetProfileBus!.data!.websiteLink ?? + "www.exampledummywebsite.com"), ], ), sizedBoxHeight(20.h), @@ -309,7 +346,8 @@ class _profiletabBusGestState extends State { )), ), sizedBoxWidth(12.w), - text14400whiteblur( + text14400whiteblur(guestGetProfileBus! + .data!.businessLocation ?? "Elm street london, United Kingdom"), ], ), @@ -334,7 +372,13 @@ class _profiletabBusGestState extends State { // text14400whiteblur(getEditProfileIndi! // .data!.interest! // .join(', ')), - text14400whiteblur("Founded at : 2010"), + guestGetProfileBus!.data!.businessType! + .createdAt != + null + ? text14400whiteblur( + ' Founded at : ${guestGetProfileBus!.data!.businessType!.createdAt}') + : text14400whiteblur( + "Founded at : 2010") ], ), sizedBoxHeight(30.h), @@ -371,6 +415,25 @@ class _profiletabBusGestState extends State { sizedBoxHeight(20.h), Row( children: [ + GestureDetector( + onTap: () { + Get.back(); + }, + child: commonContainer( + width: 40.w, + height: 40.h, + borderwidth: 0.5, + boxShape: BoxShape.circle, + opacity1: 0.5, + opacity2: 0.6, + customWidget: Center( + child: Image.asset( + 'assets/images/png/ph_arrow-up-thin.png', + height: 25.h, + width: 25.w, + ), + )), + ), Spacer(), commonContainer( width: 40.w, diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Individual/ProfileTabIndGuest.dart b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Individual/ProfileTabIndGuest.dart index 9630ae5..a44a330 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Individual/ProfileTabIndGuest.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Guest User/View/Individual/ProfileTabIndGuest.dart @@ -81,8 +81,6 @@ class _ProfileTabIndGuestState extends State { late Future guestIndfuture; var updata; - // FollowingidIndex - @override void initState() { // updata = Get.arguments != null @@ -103,14 +101,14 @@ class _ProfileTabIndGuestState extends State { Widget build(BuildContext context) { return Scaffold( // key: _scaffoldKey1, - backgroundColor: Color(0xFF222935), + backgroundColor: const Color(0xFF222935), extendBody: true, // accountTypeValue == '1' || body: FutureBuilder( future: guestIndfuture, builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( + return const Center( child: CircularProgressIndicator( color: Colors.blue, ), @@ -144,17 +142,33 @@ class _ProfileTabIndGuestState extends State { children: [ Stack( children: [ - Container( - height: 484.h, - width: double.infinity, - child: Image.asset( - "assets/images/png/profileimg.png", - fit: BoxFit.cover, - ), - ), + guestGetProfileInd!.data!.profilePhoto!.isNotEmpty + ? Container( + width: double.infinity, + height: 484.h, + decoration: ShapeDecoration( + image: DecorationImage( + image: Image( + image: NetworkImage( + guestGetProfileInd! + .data!.profilePhoto!), + ).image, + fit: BoxFit.cover, + ), + shape: LinearBorder(), + ), + ) + : Container( + height: 484.h, + width: double.infinity, + child: Image.asset( + "assets/images/png/profileimg.png", + fit: BoxFit.cover, + ), + ), Positioned.fill( child: Container( - decoration: BoxDecoration( + decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, @@ -227,7 +241,7 @@ class _ProfileTabIndGuestState extends State { color: Colors.white, width: 1.0, ), - boxShadow: [ + boxShadow: const [ BoxShadow( color: Color(0x66000000), offset: Offset(0, 4), @@ -270,7 +284,7 @@ class _ProfileTabIndGuestState extends State { color: Colors.white, width: 1.0, ), - boxShadow: [ + boxShadow: const [ BoxShadow( color: Color(0x66000000), offset: Offset(0, 4), @@ -321,7 +335,7 @@ class _ProfileTabIndGuestState extends State { height: 40.h, width: 170.w, decoration: BoxDecoration( - color: Color(0xFFD90B2E), + color: const Color(0xFFD90B2E), borderRadius: BorderRadius.circular(30.r), ), @@ -470,7 +484,7 @@ class _ProfileTabIndGuestState extends State { Row( children: [ text18w700white("Timeline"), - Spacer(), + const Spacer(), InkWell( onTap: () { Get.toNamed(RouteName.addtimeline); @@ -484,24 +498,54 @@ class _ProfileTabIndGuestState extends State { ], ), sizedBoxHeight(20.h), - SizedBox( - height: 300.h, - child: ListView.builder( - shrinkWrap: true, - itemCount: timeline.length, - itemBuilder: (context, index) { - return commonTimelineCard( - imagePath: timeline[index] - ["imagePath"], - title: timeline[index]["title"]); - }, - )), + guestGetProfileInd!.data!.timelines!.isEmpty + ? Padding( + padding: EdgeInsets.symmetric( + vertical: 30.h), + child: Center( + child: text18w700white( + "No Timeline Found")), + ) + : SizedBox( + height: 300.h, + child: ListView.builder( + shrinkWrap: true, + itemCount: guestGetProfileInd! + .data!.timelines!.length, + itemBuilder: (context, index) { + var abilities; + abilities = guestGetProfileInd! + .data! + .timelines![index] + .abilities! + .map((e) => e.name) + .join(', '); + return commonTimelineCard( + imagePath: timeline[index] + ["imagePath"], + title: guestGetProfileInd! + .data! + .timelines![index] + .teamName ?? + '', + teamName: guestGetProfileInd! + .data! + .timelines![index] + .teamName ?? + '', + abilities: abilities, + startendDate: + "${guestGetProfileInd!.data!.timelines![index].startDate} - ${guestGetProfileInd!.data!.timelines![index].endDate} " ?? + '', + ); + }, + )), sizedBoxHeight(30.h), Row( children: [ text16w700white( "Certifications/Qualifications"), - Spacer(), + const Spacer(), InkWell( onTap: () { Get.toNamed(RouteName.certificate); @@ -510,51 +554,89 @@ class _ProfileTabIndGuestState extends State { ], ), sizedBoxHeight(20.h), - SizedBox( - height: 85.h, - child: ListView.builder( - shrinkWrap: true, - scrollDirection: Axis.horizontal, - itemCount: certificationData.length, - itemBuilder: (context, index) { - return Padding( - padding: EdgeInsets.only(right: 20.w), - child: certificationCardTile( - imagePath: - certificationData[index] - ["imagePath"], - title: certificationData[index] - ["title"], - subtitle: certificationData[index] - ["subtitle"], - date: certificationData[index] - ["date"]), - ); - }, - ), - ), + guestGetProfileInd! + .data!.certifications!.isEmpty + ? Padding( + padding: EdgeInsets.symmetric( + vertical: 30.h), + child: Center( + child: text18w700white( + "No Certifications Found")), + ) + : SizedBox( + height: 85.h, + child: ListView.builder( + shrinkWrap: true, + scrollDirection: Axis.horizontal, + itemCount: guestGetProfileInd!.data! + .certifications!.length ?? + certificationData.length, + itemBuilder: (context, index) { + var certifiData = + guestGetProfileInd!.data! + .certifications![index]; + return Padding( + padding: EdgeInsets.only( + right: 20.w), + child: certificationCardTile( + imagePath: certifiData + .certificationImage ?? + certificationData[index] + ["imagePath"], + title: certifiData + .certificationName ?? + certificationData[index] + ["title"], + subtitle: certifiData + .certificationReason ?? + certificationData[index] + ["subtitle"], + date: + ("Issued ${certifiData.certificationDate}") ?? + (certificationData[ + index] + ["date"])), + ); + }, + ), + ), sizedBoxHeight(30.h), text18w400white("Subgroups"), ]), ), sizedBoxHeight(20.h), - SizedBox( - height: 190.h, - child: ListView.builder( - shrinkWrap: true, - scrollDirection: Axis.horizontal, - padding: EdgeInsets.only(left: 16.w), - itemCount: cardtile.length, - itemBuilder: (context, index) { - return Padding( - padding: EdgeInsets.only(right: 20.w), - child: profilecardtile( - imagePath: cardtile[index]["imagePath"], - title: cardtile[index]["title"]), - ); - }, - ), - ), + guestGetProfileInd!.data!.myJoinedSubgroups!.isEmpty + ? Padding( + padding: EdgeInsets.symmetric(vertical: 30.h), + child: Center( + child: text18w700white( + "No Subgroups Found")), + ) + : SizedBox( + height: 190.h, + child: ListView.builder( + shrinkWrap: true, + scrollDirection: Axis.horizontal, + padding: EdgeInsets.only(left: 16.w), + itemCount: guestGetProfileInd! + .data!.myJoinedSubgroups!.length, + itemBuilder: (context, index) { + var subGroupData = guestGetProfileInd! + .data! + .myJoinedSubgroups![index] + .subGroupData!; + return Padding( + padding: EdgeInsets.only(right: 20.w), + child: profilecardtile( + imagePath: subGroupData + .subGroupImage ?? + cardtile[index]["imagePath"], + title: subGroupData.title ?? + cardtile[index]["title"]), + ); + }, + ), + ), sizedBoxHeight(20.h), Padding( padding: EdgeInsets.only(left: 16.w), @@ -585,7 +667,26 @@ class _ProfileTabIndGuestState extends State { sizedBoxHeight(20.h), Row( children: [ - Spacer(), + GestureDetector( + onTap: () { + Get.back(); + }, + child: commonContainer( + width: 40.w, + height: 40.h, + borderwidth: 0.5, + boxShape: BoxShape.circle, + opacity1: 0.5, + opacity2: 0.6, + customWidget: Center( + child: Image.asset( + 'assets/images/png/ph_arrow-up-thin.png', + height: 25.h, + width: 25.w, + ), + )), + ), + const Spacer(), commonContainer( width: 40.w, height: 40.h, @@ -706,7 +807,11 @@ class _ProfileTabIndGuestState extends State { } Widget commonTimelineCard( - {required String imagePath, required String title}) { + {required String imagePath, + required String title, + required String teamName, + required String startendDate, + required String abilities}) { return Row( children: [ Container( @@ -720,7 +825,7 @@ class _ProfileTabIndGuestState extends State { child: Container( height: 11.h, width: 11.w, - decoration: BoxDecoration( + decoration: const BoxDecoration( color: Colors.white, shape: BoxShape.circle)), ), Positioned( @@ -728,7 +833,7 @@ class _ProfileTabIndGuestState extends State { child: Container( width: 1.w, height: 170.h, - decoration: BoxDecoration(color: Colors.white), + decoration: const BoxDecoration(color: Colors.white), ), ), ], @@ -759,12 +864,11 @@ class _ProfileTabIndGuestState extends State { ], ), sizedBoxHeight(10.h), - text12700white("Team captain"), + text12700white(teamName), sizedBoxHeight(8.h), - text12400white("April 2023 - May 2024"), + text12400white(startendDate), sizedBoxHeight(10.h), - text10400whiteblur( - "Lorem IpsumĀ is simply dummy text of the printing and typesetting industry.") + text10400whiteblur(abilities) ], ), ), @@ -824,7 +928,7 @@ class _ProfileTabIndGuestState extends State { sizedBoxWidth(7.w), Icon( Icons.circle, - color: Color(0xFFFCFCFC), + color: const Color(0xFFFCFCFC), size: 4.sp, ), sizedBoxWidth(6.w), @@ -833,12 +937,12 @@ class _ProfileTabIndGuestState extends State { ) ], ), - Spacer(), + const Spacer(), PopupMenuButton( - surfaceTintColor: Color(0xFF222935), + surfaceTintColor: const Color(0xFF222935), constraints: BoxConstraints.tightFor(width: 176.w), - offset: Offset(0, 50), - color: Color(0xFF222935), + offset: const Offset(0, 50), + color: const Color(0xFF222935), tooltip: "", itemBuilder: (BuildContext context) => [ PopupMenuItem( @@ -856,7 +960,7 @@ class _ProfileTabIndGuestState extends State { fontFamily: "Nunito Sans", ), ), - Spacer(), + const Spacer(), Image.asset( "assets/images/png/Vector (5).png", height: 15.h, @@ -866,7 +970,7 @@ class _ProfileTabIndGuestState extends State { ), ), ), - PopupMenuDivider(), + const PopupMenuDivider(), PopupMenuItem( onTap: () {}, child: Padding( @@ -882,7 +986,7 @@ class _ProfileTabIndGuestState extends State { fontFamily: "Nunito Sans", ), ), - Spacer(), + const Spacer(), Image.asset( "assets/images/png/share.png", height: 20.h, @@ -892,7 +996,7 @@ class _ProfileTabIndGuestState extends State { ), ), ), - PopupMenuDivider(), + const PopupMenuDivider(), PopupMenuItem( onTap: () {}, child: Padding( @@ -908,7 +1012,7 @@ class _ProfileTabIndGuestState extends State { fontFamily: "Nunito Sans", ), ), - Spacer(), + const Spacer(), Image.asset( "assets/images/png/f7_pin-fill (2).png", height: 25.h, @@ -973,7 +1077,7 @@ class _ProfileTabIndGuestState extends State { 'assets/images/png/heart 2.png', 'assets/images/png/party-popper 2.png' ]), - Spacer(), + const Spacer(), commonContainer( width: 30.w, height: 30.h, @@ -1056,11 +1160,12 @@ class _ProfileTabIndGuestState extends State { boxRadius: 30, itemsSpacing: 8, itemScale: 0.4, - itemSize: Size(45, 45), - boxPadding: EdgeInsets.all(8), - boxAnimationDuration: Duration(milliseconds: 200), - itemAnimationDuration: Duration(milliseconds: 500), - hoverDuration: Duration(milliseconds: 700), + itemSize: const Size(45, 45), + boxPadding: const EdgeInsets.all(8), + boxAnimationDuration: const Duration(milliseconds: 200), + itemAnimationDuration: + const Duration(milliseconds: 500), + hoverDuration: const Duration(milliseconds: 700), // toggle: false, child: _buildReactionsIcon(mainImage.value), @@ -1118,14 +1223,28 @@ class _ProfileTabIndGuestState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Container( - height: 40.h, - width: 57.w, - child: Image.asset( - imagePath, - fit: BoxFit.cover, - ), - ), + guestGetProfileInd!.data!.certifications != null + ? Container( + width: 57.w, + height: 40.h, + decoration: ShapeDecoration( + image: DecorationImage( + image: Image( + image: NetworkImage(imagePath), + ).image, + fit: BoxFit.cover, + ), + shape: LinearBorder(), + ), + ) + : Container( + height: 40.h, + width: 57.w, + child: Image.asset( + imagePath, + fit: BoxFit.cover, + ), + ), sizedBoxWidth(10.w), Expanded( child: Column( @@ -1177,7 +1296,7 @@ class _ProfileTabIndGuestState extends State { width: 100.w, height: 30.h, borderRadius: BorderRadius.circular(30.r), - borderColor: Color(0xFFD90B2E), + borderColor: const Color(0xFFD90B2E), borderwidth: 0.9, customWidget: Padding( padding: EdgeInsets.symmetric(horizontal: 10.w), @@ -1188,14 +1307,29 @@ class _ProfileTabIndGuestState extends State { Widget profilecardtile({required String imagePath, required String title}) { return Column( children: [ - Container( - height: 109.h, - width: 100.w, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.r), - ), - child: Image.asset(imagePath), - ), + guestGetProfileInd!.data!.myJoinedSubgroups!.isNotEmpty + ? Container( + width: 100.w, + height: 109.h, + decoration: ShapeDecoration( + image: DecorationImage( + image: Image( + image: NetworkImage(imagePath), + ).image, + fit: BoxFit.cover, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.r)), + ), + ) + : Container( + height: 109.h, + width: 100.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.r), + ), + child: Image.asset(imagePath), + ), sizedBoxHeight(10.h), SizedBox(width: 100.w, child: text12w700_FCFCFC(title)), ], diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Model/followersModel.dart b/lib/Feed Module/Main_Screens/ProfileTab/Model/followersModel.dart index 1c0e3d7..c8fcb02 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Model/followersModel.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Model/followersModel.dart @@ -61,14 +61,18 @@ class Follower { String? userName; String? fullName; String? profilePhoto; + int? principleTypeXid; - Follower({this.id, this.userName, this.fullName, this.profilePhoto}); + + Follower({this.id, this.userName, this.fullName, this.profilePhoto, this.principleTypeXid}); Follower.fromJson(Map json) { id = json['id']; userName = json['user_name']; fullName = json['full_name']; profilePhoto = json['profile_photo']; + principleTypeXid = json['principal_type_xid']; + } Map toJson() { @@ -77,6 +81,8 @@ class Follower { data['user_name'] = this.userName; data['full_name'] = this.fullName; data['profile_photo'] = this.profilePhoto; + data['principal_type_xid'] = this.principleTypeXid; + return data; } } diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Model/followingModel.dart b/lib/Feed Module/Main_Screens/ProfileTab/Model/followingModel.dart index 323b892..869a84e 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Model/followingModel.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Model/followingModel.dart @@ -61,14 +61,21 @@ class Following { String? userName; String? fullName; String? profilePhoto; + int? principleTypeXid; - Following({this.id, this.userName, this.fullName, this.profilePhoto}); + Following( + {this.id, + this.userName, + this.fullName, + this.profilePhoto, + this.principleTypeXid}); Following.fromJson(Map json) { id = json['id']; userName = json['user_name']; fullName = json['full_name']; profilePhoto = json['profile_photo']; + principleTypeXid = json['principal_type_xid']; } Map toJson() { @@ -77,6 +84,8 @@ class Following { data['user_name'] = this.userName; data['full_name'] = this.fullName; data['profile_photo'] = this.profilePhoto; + data['principal_type_xid'] = this.principleTypeXid; + return data; } } diff --git a/lib/Feed Module/Main_Screens/ProfileTab/My Network/MyNetwork.dart b/lib/Feed Module/Main_Screens/ProfileTab/My Network/MyNetwork.dart index b0d3736..71f7829 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/My Network/MyNetwork.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/My Network/MyNetwork.dart @@ -16,6 +16,7 @@ import 'package:regroup/Utils/Common/CustomTextformfield.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:regroup/Utils/dialogs.dart'; import 'package:regroup/Utils/texts.dart'; +import 'package:regroup/resources/routes/route_name.dart'; import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; class MyNetwork extends StatefulWidget { @@ -26,6 +27,8 @@ class MyNetwork extends StatefulWidget { } class _MyNetworkState extends State { + // var fromMainIndProfile = Get.arguments['From'] ?? ''; +// MainIndProfile @override Widget build(BuildContext context) { return GestureDetector( @@ -33,9 +36,9 @@ class _MyNetworkState extends State { child: Scaffold( // key: _scaffoldKey1, resizeToAvoidBottomInset: false, - backgroundColor: Color(0xFF222935), + backgroundColor: const Color(0xFF222935), extendBody: true, - appBar: CommonAppbar( + appBar: const CommonAppbar( titleTxt: "My networks", ), body: Stack(children: [ @@ -60,11 +63,11 @@ class _MyNetworkState extends State { text: 'Following', ), ]), - Expanded( + const Expanded( child: TabBarView( children: [ - followersTab(), - followingTab(), + FollowersTab(), + FollowingTab(), ], ), ), @@ -76,19 +79,20 @@ class _MyNetworkState extends State { } } -class followersTab extends StatefulWidget { - const followersTab({super.key}); +class FollowersTab extends StatefulWidget { + const FollowersTab({super.key}); @override - State createState() => _followersTabState(); + State createState() => _FollowersTabState(); } -class _followersTabState extends State { +class _FollowersTabState extends State { StreamController searchcontroller = StreamController(); @override void initState() { var updata = ""; + Profilegetmethod().getFollowers(updata, streamController: searchcontroller); // TODO: implement initState @@ -175,7 +179,7 @@ class _followersTabState extends State { Widget build(BuildContext context) { return ListView( scrollDirection: Axis.vertical, - physics: ScrollPhysics(), + physics: const ScrollPhysics(), children: [ Column( children: [ @@ -211,14 +215,14 @@ class _followersTabState extends State { builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { // Display shimmer effect while waiting for data - return Expanded( + return const Expanded( child: Center(child: CircularProgressIndicator())); } else if (snapshot.hasError) { // Handle error state return Center( child: Text( '${snapshot.error} occurred', - style: TextStyle(fontSize: 18), + style: const TextStyle(fontSize: 18), ), ); } else { @@ -226,7 +230,7 @@ class _followersTabState extends State { return followersobj!.data!.isEmpty ? _buildNoDataBody(context) : ListView.separated( - physics: ScrollPhysics(), + physics: const ScrollPhysics(), shrinkWrap: true, itemCount: followersobj!.data!.length, separatorBuilder: @@ -250,7 +254,7 @@ class _followersTabState extends State { .profilePhoto! .isEmpty ? CircleAvatar( - backgroundImage: AssetImage( + backgroundImage: const AssetImage( 'assets/images/png/Ellipse 43.png'), radius: 25.r, ) @@ -297,14 +301,14 @@ class _followersTabState extends State { .follower!.userName!) ], ), - Spacer(), + const Spacer(), PopupMenuButton( - surfaceTintColor: Color(0xFF222935), + surfaceTintColor: const Color(0xFF222935), constraints: BoxConstraints.tightFor( width: 176.w), - offset: Offset(0, 20), - color: Color(0xFF222935), + offset: const Offset(0, 20), + color: const Color(0xFF222935), tooltip: "", itemBuilder: (BuildContext context) => @@ -334,7 +338,7 @@ class _followersTabState extends State { children: [ text14400white( "Remove user"), - Spacer(), + const Spacer(), Image.asset( "assets/images/png/fluent_delete-28-regular.png", height: 15.h, @@ -344,7 +348,7 @@ class _followersTabState extends State { ), ), ), - PopupMenuDivider(), + const PopupMenuDivider(), PopupMenuItem( onTap: () {}, child: Padding( @@ -355,7 +359,7 @@ class _followersTabState extends State { children: [ text14400white( "Message user"), - Spacer(), + const Spacer(), Image.asset( "assets/images/png/fluent_chat-20-regular.png", height: 20.h, @@ -365,7 +369,7 @@ class _followersTabState extends State { ), ), ), - PopupMenuDivider(), + const PopupMenuDivider(), PopupMenuItem( onTap: () async { setState(() { @@ -390,7 +394,7 @@ class _followersTabState extends State { children: [ text14400white( "Block user"), - Spacer(), + const Spacer(), Image.asset( "assets/images/png/blockchat.png", height: 25.h, @@ -448,14 +452,14 @@ class _followersTabState extends State { } } -class followingTab extends StatefulWidget { - const followingTab({super.key}); +class FollowingTab extends StatefulWidget { + const FollowingTab({super.key}); @override - State createState() => _followingTabState(); + State createState() => _FollowingTabState(); } -class _followingTabState extends State { +class _FollowingTabState extends State { StreamController searchcontroller = StreamController(); List followingData = [ @@ -533,7 +537,7 @@ class _followingTabState extends State { @override Widget build(BuildContext context) { return ListView( - physics: ScrollPhysics(), + physics: const ScrollPhysics(), scrollDirection: Axis.vertical, children: [ Column( @@ -565,6 +569,7 @@ class _followingTabState extends State { // searchGroups(value!); Profilegetmethod() .getFollowing(value, streamController: searchcontroller); + return null; }, ), ), @@ -574,14 +579,14 @@ class _followingTabState extends State { builder: (ctx, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { // Display shimmer effect while waiting for data - return Expanded( + return const Expanded( child: Center(child: CircularProgressIndicator())); } else if (snapshot.hasError) { // Handle error state return Center( child: Text( '${snapshot.error} occurred', - style: TextStyle(fontSize: 18), + style: const TextStyle(fontSize: 18), ), ); } else { @@ -589,7 +594,7 @@ class _followingTabState extends State { return followingobj!.data!.isEmpty ? _buildNoDataBody(context) : ListView.separated( - physics: ScrollPhysics(), + physics: const ScrollPhysics(), shrinkWrap: true, itemCount: followingobj!.data!.length, separatorBuilder: (BuildContext context, int index) { @@ -630,7 +635,7 @@ class _followingTabState extends State { followingobj!.data![index].following! .profilePhoto!.isEmpty ? CircleAvatar( - backgroundImage: AssetImage( + backgroundImage: const AssetImage( 'assets/images/png/Ellipse 43.png'), radius: 25.r, ) @@ -668,13 +673,13 @@ class _followingTabState extends State { .userName!) ], ), - Spacer(), + const Spacer(), PopupMenuButton( - surfaceTintColor: Color(0xFF222935), + surfaceTintColor: const Color(0xFF222935), constraints: BoxConstraints.tightFor(width: 176.w), - offset: Offset(0, 20), - color: Color(0xFF222935), + offset: const Offset(0, 20), + color: const Color(0xFF222935), tooltip: "", itemBuilder: (BuildContext context) => [ @@ -701,7 +706,7 @@ class _followingTabState extends State { children: [ text14400white( "Unfollow user"), - Spacer(), + const Spacer(), Image.asset( "assets/images/png/Black1323e.png", height: 20.h, @@ -711,7 +716,7 @@ class _followingTabState extends State { ), ), ), - PopupMenuDivider(), + const PopupMenuDivider(), PopupMenuItem( onTap: () {}, child: Padding( @@ -721,7 +726,7 @@ class _followingTabState extends State { children: [ text14400white( "Message user"), - Spacer(), + const Spacer(), Image.asset( "assets/images/png/fluent_chat-20-22.png", height: 20.h, diff --git a/lib/Utils/Common/CustomTextformfield.dart b/lib/Utils/Common/CustomTextformfield.dart index f932031..013f769 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -6,6 +6,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:glassmorphism/glassmorphism.dart'; +import 'package:glassmorphism_ui/glassmorphism_ui.dart'; import 'package:regroup/Utils/Common/sized_box.dart'; import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart'; @@ -79,32 +80,24 @@ class _CustomTextFormFieldState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - GlassmorphicContainer( + GlassContainer( + height: 50.h, width: double.infinity, - height: 50, - borderRadius: 30, - blur: 6, - alignment: Alignment.bottomCenter, - border: 0.8, - linearGradient: LinearGradient( + gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [ const Color(0xFFffffff).withOpacity(widget.opacity1), - const Color(0xFFFFFFFF).withOpacity(widget.opacity2), + const Color(0xFFFFFFFF).withOpacity(widget.opacity1), ], stops: const [ 0.1, 1, ]), - borderGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xff434A53), - Color(0xFF434A53), - ], - ), + blur: 6, + opacity: 1, + borderRadius: BorderRadius.circular(30.r), + border: Border.all(color: Color(0xff434A53), width: 0.8), child: TextFormField( style: TextStyle( fontSize: 16.sp, color: Colors.white, fontFamily: 'Helvetica'), @@ -254,14 +247,10 @@ class _CustomTextFormField2State extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - GlassmorphicContainer( - width: double.infinity, + GlassContainer( height: 100.h, - borderRadius: 10, - blur: 6, - alignment: Alignment.bottomCenter, - border: 0.8, - linearGradient: LinearGradient( + width: double.infinity, + gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [ @@ -272,14 +261,10 @@ class _CustomTextFormField2State extends State { 0.1, 1, ]), - borderGradient: const LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xff434A53), - Color(0xFF434A53), - ], - ), + blur: 6, + opacity: 1, + borderRadius: BorderRadius.circular(10.r), + border: Border.all(color: Color(0xff434A53), width: 0.8), child: TextFormField( cursorColor: Colors.red, initialValue: widget.value,