From 73158ab997c7799d76045707b175a6fceb44052d Mon Sep 17 00:00:00 2001 From: Adddison Date: Wed, 26 Jun 2024 09:41:28 +0800 Subject: [PATCH 1/3] 1.Fix the problem of rolling inside the card. --- lib/components/profile_about_me_card.dart | 29 +++++++++++------------ 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/components/profile_about_me_card.dart b/lib/components/profile_about_me_card.dart index 7c57885..098d0c6 100644 --- a/lib/components/profile_about_me_card.dart +++ b/lib/components/profile_about_me_card.dart @@ -16,30 +16,28 @@ class ProfileAboutMeCard extends StatelessWidget { final bool verifiedemail; final String? aboutMe; - const ProfileAboutMeCard( - {super.key, - required this.country, - required this.gender, - required this.age, - required this.registeredNum, - required this.userID, - required this.verifiedemail, - this.aboutMe}); + const ProfileAboutMeCard({ + super.key, + required this.country, + required this.gender, + required this.age, + required this.registeredNum, + required this.userID, + required this.verifiedemail, + this.aboutMe, + }); @override Widget build(BuildContext context) { String aboutMeText = (aboutMe?.isEmpty ?? true) ? "No 'About Me' text provided yet. 💬" : aboutMe!; - String verifiedText = - (verifiedemail) ? "Verified Email" : "Unverified Email"; - Color verifiedColor = - (verifiedemail) ? const Color(0xFF2DD55B) : Colors.red; + String verifiedText = (verifiedemail) ? "Verified Email" : "Unverified Email"; + Color verifiedColor = (verifiedemail) ? const Color(0xFF2DD55B) : Colors.red; return LayoutBuilder( builder: (context, constraints) { - double cardHeight = - constraints.maxHeight > 550 ? 550 : constraints.maxHeight; + double cardHeight = constraints.maxHeight > 550 ? 550 : constraints.maxHeight; return SizedBox( height: cardHeight, width: MediaQuery.of(context).size.width, @@ -78,6 +76,7 @@ class ProfileAboutMeCard extends StatelessWidget { ), Expanded( child: ListView( + physics: const NeverScrollableScrollPhysics(), // 禁用滚动 children: [ ListTile( leading: const InfoSvg( From 0fe38357aba8c6ee82c3a700fd18464efaea0b81 Mon Sep 17 00:00:00 2001 From: Adddison Date: Wed, 26 Jun 2024 09:47:27 +0800 Subject: [PATCH 2/3] flutter analyze dart format . --- lib/components/profile_about_me_card.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/components/profile_about_me_card.dart b/lib/components/profile_about_me_card.dart index 098d0c6..84e64d3 100644 --- a/lib/components/profile_about_me_card.dart +++ b/lib/components/profile_about_me_card.dart @@ -32,12 +32,15 @@ class ProfileAboutMeCard extends StatelessWidget { String aboutMeText = (aboutMe?.isEmpty ?? true) ? "No 'About Me' text provided yet. 💬" : aboutMe!; - String verifiedText = (verifiedemail) ? "Verified Email" : "Unverified Email"; - Color verifiedColor = (verifiedemail) ? const Color(0xFF2DD55B) : Colors.red; + String verifiedText = + (verifiedemail) ? "Verified Email" : "Unverified Email"; + Color verifiedColor = + (verifiedemail) ? const Color(0xFF2DD55B) : Colors.red; return LayoutBuilder( builder: (context, constraints) { - double cardHeight = constraints.maxHeight > 550 ? 550 : constraints.maxHeight; + double cardHeight = + constraints.maxHeight > 550 ? 550 : constraints.maxHeight; return SizedBox( height: cardHeight, width: MediaQuery.of(context).size.width, From 2e94fe3582bcb9ec7891ac4e0295a6fe0e8f7743 Mon Sep 17 00:00:00 2001 From: xue Date: Wed, 26 Jun 2024 05:45:57 +0300 Subject: [PATCH 3/3] chore: update comment, disable scrolling in ProfileAboutMeCard --- lib/components/profile_about_me_card.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/components/profile_about_me_card.dart b/lib/components/profile_about_me_card.dart index 84e64d3..9ca6ec6 100644 --- a/lib/components/profile_about_me_card.dart +++ b/lib/components/profile_about_me_card.dart @@ -79,7 +79,8 @@ class ProfileAboutMeCard extends StatelessWidget { ), Expanded( child: ListView( - physics: const NeverScrollableScrollPhysics(), // 禁用滚动 + physics: + const NeverScrollableScrollPhysics(), // disable scrolling children: [ ListTile( leading: const InfoSvg(