Initial commit
This commit is contained in:
32
lib/features/profile/presentation/bloc/profile_state.dart
Normal file
32
lib/features/profile/presentation/bloc/profile_state.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
part of 'profile_bloc.dart';
|
||||
|
||||
class ProfileState extends Equatable {
|
||||
const ProfileState({
|
||||
required this.isLoading,
|
||||
required this.readOnly,
|
||||
this.profileData,
|
||||
this.hasError,
|
||||
});
|
||||
|
||||
final bool isLoading;
|
||||
final bool readOnly;
|
||||
final ProfileResponse? profileData;
|
||||
final bool? hasError;
|
||||
|
||||
ProfileState copyWith({
|
||||
bool? isLoading,
|
||||
bool? readOnly,
|
||||
ProfileResponse? profileData,
|
||||
bool? hasError,
|
||||
}) {
|
||||
return ProfileState(
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
readOnly: readOnly ?? this.readOnly,
|
||||
profileData: profileData ?? this.profileData,
|
||||
hasError: hasError ?? this.hasError,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
List<Object?> get props => [isLoading, readOnly, profileData, hasError];
|
||||
}
|
||||
Reference in New Issue
Block a user