feat: Implement account management functionality with loading, creation, and error handling
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import '../../data/models/account.dart';
|
||||
|
||||
abstract class AccountState extends Equatable {
|
||||
const AccountState();
|
||||
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
|
||||
class AccountInitial extends AccountState {}
|
||||
|
||||
class AccountLoading extends AccountState {}
|
||||
|
||||
class AccountsLoaded extends AccountState {
|
||||
final List<Account> accounts;
|
||||
|
||||
const AccountsLoaded(this.accounts);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [accounts];
|
||||
}
|
||||
|
||||
class AccountOperationSuccess extends AccountState {
|
||||
final String message;
|
||||
|
||||
const AccountOperationSuccess(this.message);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
|
||||
class AccountError extends AccountState {
|
||||
final String message;
|
||||
|
||||
const AccountError(this.message);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
Reference in New Issue
Block a user