This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/langx/langx-flutter into fe…
…ature-community-filters # Conflicts: # lib/pages/home/community.dart
- Loading branch information
Showing
46 changed files
with
638 additions
and
371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
// Components Import | ||
import 'package:langx_flutter/assets/svg/info_svg.dart'; | ||
import 'package:langx_flutter/assets/svg/country_svg.dart'; | ||
import 'package:langx_flutter/assets/svg/gender_svg.dart'; | ||
import 'package:langx_flutter/assets/svg/calendar_svg.dart'; | ||
import 'package:langx_flutter/assets/svg/clock_svg.dart'; | ||
import 'package:langx_flutter/assets/svg/at_sign_svg.dart'; | ||
import 'package:langx_flutter/assets/svg/shield_svg.dart'; | ||
|
||
class ProfileAboutMeCard extends StatelessWidget { | ||
final String country; | ||
final String gender; | ||
final String age; | ||
final String registeredNum; | ||
final String userID; | ||
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, | ||
}); | ||
|
||
@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; | ||
|
||
return LayoutBuilder( | ||
builder: (context, constraints) { | ||
double cardHeight = | ||
constraints.maxHeight > 550 ? 550 : constraints.maxHeight; | ||
return SizedBox( | ||
height: cardHeight, | ||
width: MediaQuery.of(context).size.width, | ||
child: Card( | ||
elevation: 5.0, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(16.0), | ||
), | ||
color: Colors.white, | ||
child: Padding( | ||
padding: const EdgeInsets.all(16.0), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.center, | ||
children: [ | ||
const Row( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
children: [ | ||
Expanded( | ||
child: Text( | ||
'About Me', | ||
style: TextStyle(fontSize: 25), | ||
), | ||
), | ||
], | ||
), | ||
const SizedBox(height: 3), | ||
const Align( | ||
alignment: Alignment.centerLeft, | ||
child: Text( | ||
'Personal Information', | ||
style: TextStyle( | ||
fontSize: 15, | ||
color: Color(0xFF737373), | ||
), | ||
), | ||
), | ||
Expanded( | ||
child: ListView( | ||
physics: | ||
const NeverScrollableScrollPhysics(), // disable scrolling | ||
children: [ | ||
ListTile( | ||
leading: const InfoSvg( | ||
color: Color(0xFFFBC02D), | ||
fill: 'none', | ||
widht: 20, | ||
height: 20, | ||
), | ||
title: Text( | ||
aboutMeText, | ||
style: const TextStyle( | ||
fontSize: 15, | ||
color: Color(0xFF737373), | ||
), | ||
), | ||
), | ||
ListTile( | ||
leading: const CountrySvg( | ||
color: Color(0xFFFBC02D), | ||
fill: 'none', | ||
widht: 20, | ||
height: 20, | ||
), | ||
title: Text( | ||
country, | ||
style: const TextStyle(fontSize: 15), | ||
), | ||
), | ||
ListTile( | ||
leading: const GenderSvg( | ||
color: Color(0xFFFBC02D), | ||
fill: 'none', | ||
widht: 20, | ||
height: 20, | ||
), | ||
title: Text( | ||
gender, | ||
style: const TextStyle(fontSize: 15), | ||
), | ||
), | ||
ListTile( | ||
leading: const CalendarSvg( | ||
color: Color(0xFFFBC02D), | ||
fill: 'none', | ||
widht: 20, | ||
height: 20, | ||
), | ||
title: Text( | ||
"$age years old", | ||
style: const TextStyle(fontSize: 15), | ||
), | ||
), | ||
ListTile( | ||
leading: const ClockSvg( | ||
color: Color(0xFFFBC02D), | ||
fill: 'none', | ||
widht: 20, | ||
height: 20, | ||
), | ||
title: Text( | ||
"Registered $registeredNum months ago", | ||
style: const TextStyle(fontSize: 15), | ||
), | ||
), | ||
ListTile( | ||
leading: const AtSignSvg( | ||
color: Color(0xFFFBC02D), | ||
fill: 'none', | ||
widht: 20, | ||
height: 20, | ||
), | ||
title: Text( | ||
userID, | ||
style: const TextStyle(fontSize: 15), | ||
), | ||
), | ||
ListTile( | ||
leading: ShieldSvg( | ||
color: verifiedColor, | ||
fill: 'none', | ||
widht: 20, | ||
height: 20, | ||
), | ||
title: Text( | ||
verifiedText, | ||
style: const TextStyle(fontSize: 15), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
}, | ||
); | ||
} | ||
} |
File renamed without changes.
4 changes: 3 additions & 1 deletion
4
lib/components/profile_day_streaks_card.dart → lib/components/profile/day_streaks_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...mponents/profile_mother_tongues_card.dart → ...mponents/profile/mother_tongues_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
lib/components/profile_others_card.dart → lib/components/profile/others_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...ponents/profile_study_languages_card.dart → ...ponents/profile/study_languages_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
lib/components/profile_token_card.dart → lib/components/profile/token_card.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.