40 lines
848 B
Dart
40 lines
848 B
Dart
// profile_state.dart
|
|
class ProfileState {
|
|
final String name;
|
|
final String phone;
|
|
final String role;
|
|
final String email;
|
|
final String lastLogin;
|
|
final bool isLoading;
|
|
|
|
const ProfileState({
|
|
this.name = '',
|
|
this.phone = '',
|
|
this.role = '',
|
|
this.email = '',
|
|
this.lastLogin = '',
|
|
this.isLoading = false,
|
|
});
|
|
|
|
ProfileState copyWith({
|
|
String? name,
|
|
String? phone,
|
|
String? role,
|
|
String? email,
|
|
String? lastLogin,
|
|
bool? isLoading,
|
|
}) {
|
|
return ProfileState(
|
|
name: name ?? this.name,
|
|
phone: phone ?? this.phone,
|
|
role: role ?? this.role,
|
|
email: email ?? this.email,
|
|
lastLogin: lastLogin ?? this.lastLogin,
|
|
isLoading: isLoading ?? this.isLoading,
|
|
);
|
|
}
|
|
|
|
@override
|
|
List<Object?> get props => [name, phone, role, email, lastLogin, isLoading];
|
|
}
|