TF-2667 Use Username replace UserProfile
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
import 'package:model/model.dart';
|
||||
|
||||
extension UserProfileExtension on UserProfile {
|
||||
UserProfileResponse toUserProfileResponse() {
|
||||
return UserProfileResponse(email);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
import 'package:core/presentation/extensions/string_extension.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/user_name.dart';
|
||||
|
||||
extension UsernameExtension on UserName {
|
||||
String get firstCharacter => value.firstLetterToUpperCase.toUpperCase();
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export 'extensions/presentation_email_extension.dart';
|
||||
export 'extensions/presentation_mailbox_extension.dart';
|
||||
export 'extensions/properties_extension.dart';
|
||||
export 'extensions/session_extension.dart';
|
||||
export 'extensions/user_profile_extension.dart';
|
||||
export 'extensions/username_extension.dart';
|
||||
export 'extensions/utc_date_extension.dart';
|
||||
// Identity
|
||||
export 'identity/identity_request_dto.dart';
|
||||
@@ -79,7 +79,4 @@ export 'oidc/token_id.dart';
|
||||
export 'oidc/token_oidc.dart';
|
||||
// Upload
|
||||
export 'upload/file_info.dart';
|
||||
export 'upload/upload_response.dart';
|
||||
// User
|
||||
export 'user/user_profile.dart';
|
||||
export 'user/user_profile_response.dart';
|
||||
export 'upload/upload_response.dart';
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class AvatarId with EquatableMixin {
|
||||
final String id;
|
||||
|
||||
AvatarId(this.id);
|
||||
|
||||
factory AvatarId.initial() {
|
||||
return AvatarId('');
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id];
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class UserProfile with EquatableMixin {
|
||||
|
||||
final String email;
|
||||
|
||||
UserProfile(this.email);
|
||||
|
||||
String getAvatarText() {
|
||||
return email[0].toUpperCase();
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object> get props => [email];
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:model/model.dart';
|
||||
|
||||
part 'user_profile_response.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class UserProfileResponse with EquatableMixin {
|
||||
|
||||
final String email;
|
||||
|
||||
UserProfileResponse(this.email);
|
||||
|
||||
factory UserProfileResponse.fromJson(Map<String, dynamic> json) => _$UserProfileResponseFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$UserProfileResponseToJson(this);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [email];
|
||||
}
|
||||
|
||||
extension UserProfileResponseExtension on UserProfileResponse {
|
||||
UserProfile toUserProfile() {
|
||||
return UserProfile(email);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user