mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2025-12-22 09:30:45 +00:00
feat(profile): добавить обработку события выхода из профиля и rethrow (#17)
Co-authored-by: PetrovY <y.petrov@friflex.com>
This commit is contained in:
@@ -1,16 +1,37 @@
|
||||
part of 'profile_bloc.dart';
|
||||
|
||||
/// {@template profile_event}
|
||||
/// События для управления состоянием профиля пользователя.
|
||||
/// {@endtemplate}
|
||||
sealed class ProfileEvent extends Equatable {
|
||||
/// {@macro profile_event}
|
||||
const ProfileEvent();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
/// {@template profile_event}
|
||||
/// Событие для загрузки профиля пользователя.
|
||||
/// {@endtemplate}
|
||||
final class ProfileFetchProfileEvent extends ProfileEvent {
|
||||
/// {@macro profile_event}
|
||||
const ProfileFetchProfileEvent({required this.id});
|
||||
|
||||
/// ID пользователя для загрузки профиля
|
||||
final String id;
|
||||
|
||||
@override
|
||||
List<Object> get props => [id];
|
||||
}
|
||||
|
||||
/// {@template profile_logout_event}
|
||||
/// Событие для выхода из профиля пользователя.
|
||||
/// {@endtemplate}
|
||||
final class ProfileLogoutProfileEvent extends ProfileEvent {
|
||||
/// {@macro profile_logout_event}
|
||||
const ProfileLogoutProfileEvent();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user