new project stable version
This commit is contained in:
29
lib/presentation/state/profile_state.dart
Normal file
29
lib/presentation/state/profile_state.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import '../../domain/entities/user_profile.dart';
|
||||
|
||||
class ProfileState {
|
||||
final bool isLoading;
|
||||
final UserProfile? profile;
|
||||
final String? error;
|
||||
|
||||
const ProfileState({
|
||||
required this.isLoading,
|
||||
this.profile,
|
||||
this.error,
|
||||
});
|
||||
|
||||
factory ProfileState.initial() {
|
||||
return const ProfileState(isLoading: true);
|
||||
}
|
||||
|
||||
ProfileState copyWith({
|
||||
bool? isLoading,
|
||||
UserProfile? profile,
|
||||
String? error,
|
||||
}) {
|
||||
return ProfileState(
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
profile: profile ?? this.profile,
|
||||
error: error,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user