Files
be_happy_public/lib/presentation/state/edit_profile_state.dart
2026-05-12 12:02:40 +03:00

43 lines
894 B
Dart

import '../../domain/entities/user_profile.dart';
class EditProfileState {
final bool isSaving;
final bool isSuccess;
final bool isLoading;
final UserProfile? profile;
final String? error;
const EditProfileState({
required this.isSaving,
required this.isSuccess,
required this.isLoading,
this.profile,
this.error,
});
factory EditProfileState.initial() {
return const EditProfileState(
isSaving: false,
isSuccess: false,
isLoading: false,
);
}
EditProfileState copyWith({
bool? isSaving,
bool? isSuccess,
bool? isLoading,
UserProfile? profile,
String? error,
}) {
return EditProfileState(
isSaving: isSaving ?? this.isSaving,
isSuccess: isSuccess ?? this.isSuccess,
isLoading: isLoading ?? this.isLoading,
profile: profile ?? this.profile,
error: error,
);
}
}