games_app/prediqo_mobile/lib/features/wallet/bloc/wallet_event.dart
2026-10-12 19:18:13 +02:00

80 lines
2.1 KiB
Dart

part of 'wallet_bloc.dart';
/// Base class for wallet events handled by [WalletBloc].
abstract class WalletEvent extends Equatable {
const WalletEvent();
@override
List<Object?> get props => [];
}
/// Reloads wallet types, balances, and extras (not Activity lists).
class WalletLoadRequested extends WalletEvent {
const WalletLoadRequested({this.ifStale = false});
/// Skip the network round-trip when a sync finished a few seconds ago.
final bool ifStale;
@override
List<Object?> get props => [ifStale];
}
/// Loads one Activity tab on demand (deposits / withdrawals / transfers / predictions).
class WalletActivityRequested extends WalletEvent {
const WalletActivityRequested({required this.category, this.force = false});
final String category;
final bool force;
@override
List<Object?> get props => [category, force];
}
/// Appends the next Activity page for [category].
class WalletActivityMoreRequested extends WalletEvent {
const WalletActivityMoreRequested({required this.category});
final String category;
@override
List<Object?> get props => [category];
}
/// Requests a deposit address for the given asset code (e.g. TRX, USDT).
class WalletDepositAddressRequested extends WalletEvent {
const WalletDepositAddressRequested({required this.walletTypeCode});
final String walletTypeCode;
}
/// Submits an on-chain withdrawal requiring 2FA.
class WalletWithdrawRequested extends WalletEvent {
const WalletWithdrawRequested({
required this.walletType,
required this.toAddress,
required this.amount,
this.totpCode,
});
final String walletType;
final String toAddress;
final String amount;
final String? totpCode;
}
/// Transfers balance to another registered user by email.
class WalletTransferRequested extends WalletEvent {
const WalletTransferRequested({
required this.toEmail,
required this.walletType,
required this.amount,
this.totpCode,
});
final String toEmail;
final String walletType;
final String amount;
final String? totpCode;
}
/// Clears error / success feedback after the UI has shown it.
class WalletClearFeedback extends WalletEvent {
const WalletClearFeedback();
}