Verified Icon
parent
a848041823
commit
c560f86db9
|
@ -45,6 +45,8 @@ class Constants {
|
|||
static const String dbFieldUsersName = 'name';
|
||||
static const String dbFieldUsersFirstName = 'firstname';
|
||||
static const String dbFieldUsersLastName = 'lastname';
|
||||
static const String dbFieldUsersActive = 'active';
|
||||
static const String dbFieldUsersVerified = 'verified';
|
||||
static const String dbFieldUsersBio = 'bio';
|
||||
static const String dbFieldUsersGender = 'gender';
|
||||
static const String dbFieldUsersYearBorn = 'born';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
|
||||
import '../enumerations.dart';
|
||||
import 'language.dart';
|
||||
import 'location.dart';
|
||||
|
@ -16,6 +18,8 @@ class UserProfile {
|
|||
String? bio;
|
||||
Gender? gender;
|
||||
int? born;
|
||||
bool? active;
|
||||
Timestamp? verified;
|
||||
RiskTolerance risk;
|
||||
AvailabilityOption availability;
|
||||
CultureOption culture;
|
||||
|
@ -42,6 +46,8 @@ class UserProfile {
|
|||
this.bio,
|
||||
this.gender,
|
||||
this.born,
|
||||
this.active,
|
||||
this.verified,
|
||||
required this.risk,
|
||||
required this.availability,
|
||||
required this.culture,
|
||||
|
|
|
@ -297,6 +297,15 @@ class _UserProfilePageState extends State<UserProfilePage> {
|
|||
genderIcon = const Icon(Icons.female, color: Colors.pink);
|
||||
}
|
||||
|
||||
Widget verifiedIcon = const Icon(null);
|
||||
if (myData.verified != null &&
|
||||
myData.verified!.toDate().isAfter(DateTime(2024, 8, 1))) {
|
||||
verifiedIcon = const Padding(
|
||||
padding: EdgeInsets.only(right: 4.0),
|
||||
child: Icon(Icons.verified, color: Colors.blueGrey),
|
||||
);
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
if (isOwner)
|
||||
|
@ -315,6 +324,7 @@ class _UserProfilePageState extends State<UserProfilePage> {
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
verifiedIcon,
|
||||
Flexible(
|
||||
child: Text(
|
||||
isOwner
|
||||
|
|
|
@ -212,6 +212,8 @@ class UserService {
|
|||
bio: data[Constants.dbFieldUsersBio],
|
||||
gender: Gender.values[data[Constants.dbFieldUsersGender] ?? 0],
|
||||
born: data[Constants.dbFieldUsersYearBorn],
|
||||
active: data[Constants.dbFieldUsersActive],
|
||||
verified: data[Constants.dbFieldUsersVerified],
|
||||
languages: languages,
|
||||
locations: locations,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue