Wallet funds

This commit is contained in:
2025-10-04 01:17:09 +08:00
parent 7db164fda6
commit 3f640b7898
10 changed files with 3219 additions and 45 deletions

View File

@@ -1132,5 +1132,43 @@
"giftRedeemedSuccessfully": "You have successfully redeemed the gift. Your new subscription is now active.",
"cancelGift": "Cancel Gift",
"cancelGiftConfirm": "Are you sure you want to cancel this gift? This action cannot be undone.",
"giftCancelledSuccessfully": "Gift cancelled successfully"
"giftCancelledSuccessfully": "Gift cancelled successfully",
"createFund": "Create Fund",
"fundAmount": "Fund Amount",
"enterAmount": "Enter Amount",
"selectCurrency": "Select Currency",
"splitType": "Split Type",
"evenSplit": "Even Split",
"equalAmountEach": "Equal amount for each recipient",
"randomSplit": "Random Split",
"randomAmountEach": "Random amount for each recipient",
"recipientCount": "Recipient Count",
"numberOfRecipients": "Number of Recipients",
"addPersonalMessageForRecipients": "Add a personal message for recipients",
"invalidAmount": "Invalid amount",
"invalidRecipientCount": "Invalid recipient count",
"fundOverview": "Fund Overview",
"totalFundsSent": "Total Funds Sent",
"totalFundsReceived": "Total Funds Received",
"transactions": "Transactions",
"myFunds": "My Funds",
"availableFunds": "Available Funds",
"fundStatusCreated": "Created",
"fundStatusPartial": "Partially Claimed",
"fundStatusCompleted": "Fully Claimed",
"fundStatusExpired": "Expired",
"fundStatusUnknown": "Unknown",
"recipients": "Recipients",
"fundClaimedSuccessfully": "Fund claimed successfully!",
"claim": "Claim",
"noFundsCreated": "No funds created yet",
"createYourFirstFund": "Create your first fund to get started",
"noAvailableFunds": "No available funds",
"fundsWillAppearHere": "Funds you can claim will appear here",
"fundCreatedSuccessfully": "Fund created successfully!",
"selectRecipients": "Select Recipients",
"noRecipientsSelected": "No recipients selected",
"selectRecipientsToSendFund": "Select recipients to send the fund to",
"addRecipient": "Add Recipient",
"addMoreRecipients": "Add More Recipients"
}

View File

@@ -88,8 +88,8 @@ class NotificationService: UNNotificationServiceExtension {
let intent = self.createMessageIntent(with: sender, meta: metaCopy, body: content.body)
self.donateInteraction(for: intent)
let updatedContent = try? request.content.updating(from: intent)
content.categoryIdentifier = "CHAT_MESSAGE"
if let updatedContent = updatedContent {
updatedContent.categoryIdentifier = "CHAT_MESSAGE"
self.contentHandler?(updatedContent)
} else {
self.contentHandler?(content)

View File

@@ -151,3 +151,45 @@ sealed class SnWalletGift with _$SnWalletGift {
factory SnWalletGift.fromJson(Map<String, dynamic> json) =>
_$SnWalletGiftFromJson(json);
}
@freezed
sealed class SnWalletFund with _$SnWalletFund {
const factory SnWalletFund({
required String id,
required String currency,
required double totalAmount,
required int splitType, // 0: even, 1: random
required int
status, // 0: created, 1: partially claimed, 2: fully claimed, 3: expired
required String? message,
required String creatorAccountId,
required SnAccount? creatorAccount,
required DateTime expiredAt,
required List<SnWalletFundRecipient> recipients,
required DateTime createdAt,
required DateTime updatedAt,
required DateTime? deletedAt,
}) = _SnWalletFund;
factory SnWalletFund.fromJson(Map<String, dynamic> json) =>
_$SnWalletFundFromJson(json);
}
@freezed
sealed class SnWalletFundRecipient with _$SnWalletFundRecipient {
const factory SnWalletFundRecipient({
required String id,
required String fundId,
required String recipientAccountId,
required SnAccount? recipientAccount,
required double amount,
required bool isReceived,
required DateTime? receivedAt,
required DateTime createdAt,
required DateTime updatedAt,
required DateTime? deletedAt,
}) = _SnWalletFundRecipient;
factory SnWalletFundRecipient.fromJson(Map<String, dynamic> json) =>
_$SnWalletFundRecipientFromJson(json);
}

View File

@@ -2256,4 +2256,639 @@ $SnWalletSubscriptionCopyWith<$Res>? get subscription {
}
}
/// @nodoc
mixin _$SnWalletFund {
String get id; String get currency; double get totalAmount; int get splitType;// 0: even, 1: random
int get status;// 0: created, 1: partially claimed, 2: fully claimed, 3: expired
String? get message; String get creatorAccountId; SnAccount? get creatorAccount; DateTime get expiredAt; List<SnWalletFundRecipient> get recipients; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
/// Create a copy of SnWalletFund
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnWalletFundCopyWith<SnWalletFund> get copyWith => _$SnWalletFundCopyWithImpl<SnWalletFund>(this as SnWalletFund, _$identity);
/// Serializes this SnWalletFund to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnWalletFund&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.splitType, splitType) || other.splitType == splitType)&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.creatorAccountId, creatorAccountId) || other.creatorAccountId == creatorAccountId)&&(identical(other.creatorAccount, creatorAccount) || other.creatorAccount == creatorAccount)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other.recipients, recipients)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,currency,totalAmount,splitType,status,message,creatorAccountId,creatorAccount,expiredAt,const DeepCollectionEquality().hash(recipients),createdAt,updatedAt,deletedAt);
@override
String toString() {
return 'SnWalletFund(id: $id, currency: $currency, totalAmount: $totalAmount, splitType: $splitType, status: $status, message: $message, creatorAccountId: $creatorAccountId, creatorAccount: $creatorAccount, expiredAt: $expiredAt, recipients: $recipients, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
}
}
/// @nodoc
abstract mixin class $SnWalletFundCopyWith<$Res> {
factory $SnWalletFundCopyWith(SnWalletFund value, $Res Function(SnWalletFund) _then) = _$SnWalletFundCopyWithImpl;
@useResult
$Res call({
String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
});
$SnAccountCopyWith<$Res>? get creatorAccount;
}
/// @nodoc
class _$SnWalletFundCopyWithImpl<$Res>
implements $SnWalletFundCopyWith<$Res> {
_$SnWalletFundCopyWithImpl(this._self, this._then);
final SnWalletFund _self;
final $Res Function(SnWalletFund) _then;
/// Create a copy of SnWalletFund
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? currency = null,Object? totalAmount = null,Object? splitType = null,Object? status = null,Object? message = freezed,Object? creatorAccountId = null,Object? creatorAccount = freezed,Object? expiredAt = null,Object? recipients = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
as String,totalAmount: null == totalAmount ? _self.totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
as double,splitType: null == splitType ? _self.splitType : splitType // ignore: cast_nullable_to_non_nullable
as int,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as int,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String?,creatorAccountId: null == creatorAccountId ? _self.creatorAccountId : creatorAccountId // ignore: cast_nullable_to_non_nullable
as String,creatorAccount: freezed == creatorAccount ? _self.creatorAccount : creatorAccount // ignore: cast_nullable_to_non_nullable
as SnAccount?,expiredAt: null == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
as DateTime,recipients: null == recipients ? _self.recipients : recipients // ignore: cast_nullable_to_non_nullable
as List<SnWalletFundRecipient>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
/// Create a copy of SnWalletFund
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SnAccountCopyWith<$Res>? get creatorAccount {
if (_self.creatorAccount == null) {
return null;
}
return $SnAccountCopyWith<$Res>(_self.creatorAccount!, (value) {
return _then(_self.copyWith(creatorAccount: value));
});
}
}
/// Adds pattern-matching-related methods to [SnWalletFund].
extension SnWalletFundPatterns on SnWalletFund {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnWalletFund value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SnWalletFund() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnWalletFund value) $default,){
final _that = this;
switch (_that) {
case _SnWalletFund():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnWalletFund value)? $default,){
final _that = this;
switch (_that) {
case _SnWalletFund() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SnWalletFund() when $default != null:
return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
switch (_that) {
case _SnWalletFund():
return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.createdAt,_that.updatedAt,_that.deletedAt);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
switch (_that) {
case _SnWalletFund() when $default != null:
return $default(_that.id,_that.currency,_that.totalAmount,_that.splitType,_that.status,_that.message,_that.creatorAccountId,_that.creatorAccount,_that.expiredAt,_that.recipients,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _SnWalletFund implements SnWalletFund {
const _SnWalletFund({required this.id, required this.currency, required this.totalAmount, required this.splitType, required this.status, required this.message, required this.creatorAccountId, required this.creatorAccount, required this.expiredAt, required final List<SnWalletFundRecipient> recipients, required this.createdAt, required this.updatedAt, required this.deletedAt}): _recipients = recipients;
factory _SnWalletFund.fromJson(Map<String, dynamic> json) => _$SnWalletFundFromJson(json);
@override final String id;
@override final String currency;
@override final double totalAmount;
@override final int splitType;
// 0: even, 1: random
@override final int status;
// 0: created, 1: partially claimed, 2: fully claimed, 3: expired
@override final String? message;
@override final String creatorAccountId;
@override final SnAccount? creatorAccount;
@override final DateTime expiredAt;
final List<SnWalletFundRecipient> _recipients;
@override List<SnWalletFundRecipient> get recipients {
if (_recipients is EqualUnmodifiableListView) return _recipients;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_recipients);
}
@override final DateTime createdAt;
@override final DateTime updatedAt;
@override final DateTime? deletedAt;
/// Create a copy of SnWalletFund
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SnWalletFundCopyWith<_SnWalletFund> get copyWith => __$SnWalletFundCopyWithImpl<_SnWalletFund>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnWalletFundToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnWalletFund&&(identical(other.id, id) || other.id == id)&&(identical(other.currency, currency) || other.currency == currency)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.splitType, splitType) || other.splitType == splitType)&&(identical(other.status, status) || other.status == status)&&(identical(other.message, message) || other.message == message)&&(identical(other.creatorAccountId, creatorAccountId) || other.creatorAccountId == creatorAccountId)&&(identical(other.creatorAccount, creatorAccount) || other.creatorAccount == creatorAccount)&&(identical(other.expiredAt, expiredAt) || other.expiredAt == expiredAt)&&const DeepCollectionEquality().equals(other._recipients, _recipients)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,currency,totalAmount,splitType,status,message,creatorAccountId,creatorAccount,expiredAt,const DeepCollectionEquality().hash(_recipients),createdAt,updatedAt,deletedAt);
@override
String toString() {
return 'SnWalletFund(id: $id, currency: $currency, totalAmount: $totalAmount, splitType: $splitType, status: $status, message: $message, creatorAccountId: $creatorAccountId, creatorAccount: $creatorAccount, expiredAt: $expiredAt, recipients: $recipients, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
}
}
/// @nodoc
abstract mixin class _$SnWalletFundCopyWith<$Res> implements $SnWalletFundCopyWith<$Res> {
factory _$SnWalletFundCopyWith(_SnWalletFund value, $Res Function(_SnWalletFund) _then) = __$SnWalletFundCopyWithImpl;
@override @useResult
$Res call({
String id, String currency, double totalAmount, int splitType, int status, String? message, String creatorAccountId, SnAccount? creatorAccount, DateTime expiredAt, List<SnWalletFundRecipient> recipients, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
});
@override $SnAccountCopyWith<$Res>? get creatorAccount;
}
/// @nodoc
class __$SnWalletFundCopyWithImpl<$Res>
implements _$SnWalletFundCopyWith<$Res> {
__$SnWalletFundCopyWithImpl(this._self, this._then);
final _SnWalletFund _self;
final $Res Function(_SnWalletFund) _then;
/// Create a copy of SnWalletFund
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? currency = null,Object? totalAmount = null,Object? splitType = null,Object? status = null,Object? message = freezed,Object? creatorAccountId = null,Object? creatorAccount = freezed,Object? expiredAt = null,Object? recipients = null,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_SnWalletFund(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,currency: null == currency ? _self.currency : currency // ignore: cast_nullable_to_non_nullable
as String,totalAmount: null == totalAmount ? _self.totalAmount : totalAmount // ignore: cast_nullable_to_non_nullable
as double,splitType: null == splitType ? _self.splitType : splitType // ignore: cast_nullable_to_non_nullable
as int,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as int,message: freezed == message ? _self.message : message // ignore: cast_nullable_to_non_nullable
as String?,creatorAccountId: null == creatorAccountId ? _self.creatorAccountId : creatorAccountId // ignore: cast_nullable_to_non_nullable
as String,creatorAccount: freezed == creatorAccount ? _self.creatorAccount : creatorAccount // ignore: cast_nullable_to_non_nullable
as SnAccount?,expiredAt: null == expiredAt ? _self.expiredAt : expiredAt // ignore: cast_nullable_to_non_nullable
as DateTime,recipients: null == recipients ? _self._recipients : recipients // ignore: cast_nullable_to_non_nullable
as List<SnWalletFundRecipient>,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
/// Create a copy of SnWalletFund
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SnAccountCopyWith<$Res>? get creatorAccount {
if (_self.creatorAccount == null) {
return null;
}
return $SnAccountCopyWith<$Res>(_self.creatorAccount!, (value) {
return _then(_self.copyWith(creatorAccount: value));
});
}
}
/// @nodoc
mixin _$SnWalletFundRecipient {
String get id; String get fundId; String get recipientAccountId; SnAccount? get recipientAccount; double get amount; bool get isReceived; DateTime? get receivedAt; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
/// Create a copy of SnWalletFundRecipient
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SnWalletFundRecipientCopyWith<SnWalletFundRecipient> get copyWith => _$SnWalletFundRecipientCopyWithImpl<SnWalletFundRecipient>(this as SnWalletFundRecipient, _$identity);
/// Serializes this SnWalletFundRecipient to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnWalletFundRecipient&&(identical(other.id, id) || other.id == id)&&(identical(other.fundId, fundId) || other.fundId == fundId)&&(identical(other.recipientAccountId, recipientAccountId) || other.recipientAccountId == recipientAccountId)&&(identical(other.recipientAccount, recipientAccount) || other.recipientAccount == recipientAccount)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.isReceived, isReceived) || other.isReceived == isReceived)&&(identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,fundId,recipientAccountId,recipientAccount,amount,isReceived,receivedAt,createdAt,updatedAt,deletedAt);
@override
String toString() {
return 'SnWalletFundRecipient(id: $id, fundId: $fundId, recipientAccountId: $recipientAccountId, recipientAccount: $recipientAccount, amount: $amount, isReceived: $isReceived, receivedAt: $receivedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
}
}
/// @nodoc
abstract mixin class $SnWalletFundRecipientCopyWith<$Res> {
factory $SnWalletFundRecipientCopyWith(SnWalletFundRecipient value, $Res Function(SnWalletFundRecipient) _then) = _$SnWalletFundRecipientCopyWithImpl;
@useResult
$Res call({
String id, String fundId, String recipientAccountId, SnAccount? recipientAccount, double amount, bool isReceived, DateTime? receivedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
});
$SnAccountCopyWith<$Res>? get recipientAccount;
}
/// @nodoc
class _$SnWalletFundRecipientCopyWithImpl<$Res>
implements $SnWalletFundRecipientCopyWith<$Res> {
_$SnWalletFundRecipientCopyWithImpl(this._self, this._then);
final SnWalletFundRecipient _self;
final $Res Function(SnWalletFundRecipient) _then;
/// Create a copy of SnWalletFundRecipient
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? fundId = null,Object? recipientAccountId = null,Object? recipientAccount = freezed,Object? amount = null,Object? isReceived = null,Object? receivedAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,fundId: null == fundId ? _self.fundId : fundId // ignore: cast_nullable_to_non_nullable
as String,recipientAccountId: null == recipientAccountId ? _self.recipientAccountId : recipientAccountId // ignore: cast_nullable_to_non_nullable
as String,recipientAccount: freezed == recipientAccount ? _self.recipientAccount : recipientAccount // ignore: cast_nullable_to_non_nullable
as SnAccount?,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as double,isReceived: null == isReceived ? _self.isReceived : isReceived // ignore: cast_nullable_to_non_nullable
as bool,receivedAt: freezed == receivedAt ? _self.receivedAt : receivedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
/// Create a copy of SnWalletFundRecipient
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SnAccountCopyWith<$Res>? get recipientAccount {
if (_self.recipientAccount == null) {
return null;
}
return $SnAccountCopyWith<$Res>(_self.recipientAccount!, (value) {
return _then(_self.copyWith(recipientAccount: value));
});
}
}
/// Adds pattern-matching-related methods to [SnWalletFundRecipient].
extension SnWalletFundRecipientPatterns on SnWalletFundRecipient {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SnWalletFundRecipient value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SnWalletFundRecipient() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SnWalletFundRecipient value) $default,){
final _that = this;
switch (_that) {
case _SnWalletFundRecipient():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SnWalletFundRecipient value)? $default,){
final _that = this;
switch (_that) {
case _SnWalletFundRecipient() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String fundId, String recipientAccountId, SnAccount? recipientAccount, double amount, bool isReceived, DateTime? receivedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SnWalletFundRecipient() when $default != null:
return $default(_that.id,_that.fundId,_that.recipientAccountId,_that.recipientAccount,_that.amount,_that.isReceived,_that.receivedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String fundId, String recipientAccountId, SnAccount? recipientAccount, double amount, bool isReceived, DateTime? receivedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt) $default,) {final _that = this;
switch (_that) {
case _SnWalletFundRecipient():
return $default(_that.id,_that.fundId,_that.recipientAccountId,_that.recipientAccount,_that.amount,_that.isReceived,_that.receivedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String fundId, String recipientAccountId, SnAccount? recipientAccount, double amount, bool isReceived, DateTime? receivedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt)? $default,) {final _that = this;
switch (_that) {
case _SnWalletFundRecipient() when $default != null:
return $default(_that.id,_that.fundId,_that.recipientAccountId,_that.recipientAccount,_that.amount,_that.isReceived,_that.receivedAt,_that.createdAt,_that.updatedAt,_that.deletedAt);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _SnWalletFundRecipient implements SnWalletFundRecipient {
const _SnWalletFundRecipient({required this.id, required this.fundId, required this.recipientAccountId, required this.recipientAccount, required this.amount, required this.isReceived, required this.receivedAt, required this.createdAt, required this.updatedAt, required this.deletedAt});
factory _SnWalletFundRecipient.fromJson(Map<String, dynamic> json) => _$SnWalletFundRecipientFromJson(json);
@override final String id;
@override final String fundId;
@override final String recipientAccountId;
@override final SnAccount? recipientAccount;
@override final double amount;
@override final bool isReceived;
@override final DateTime? receivedAt;
@override final DateTime createdAt;
@override final DateTime updatedAt;
@override final DateTime? deletedAt;
/// Create a copy of SnWalletFundRecipient
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SnWalletFundRecipientCopyWith<_SnWalletFundRecipient> get copyWith => __$SnWalletFundRecipientCopyWithImpl<_SnWalletFundRecipient>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SnWalletFundRecipientToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnWalletFundRecipient&&(identical(other.id, id) || other.id == id)&&(identical(other.fundId, fundId) || other.fundId == fundId)&&(identical(other.recipientAccountId, recipientAccountId) || other.recipientAccountId == recipientAccountId)&&(identical(other.recipientAccount, recipientAccount) || other.recipientAccount == recipientAccount)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.isReceived, isReceived) || other.isReceived == isReceived)&&(identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,fundId,recipientAccountId,recipientAccount,amount,isReceived,receivedAt,createdAt,updatedAt,deletedAt);
@override
String toString() {
return 'SnWalletFundRecipient(id: $id, fundId: $fundId, recipientAccountId: $recipientAccountId, recipientAccount: $recipientAccount, amount: $amount, isReceived: $isReceived, receivedAt: $receivedAt, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
}
}
/// @nodoc
abstract mixin class _$SnWalletFundRecipientCopyWith<$Res> implements $SnWalletFundRecipientCopyWith<$Res> {
factory _$SnWalletFundRecipientCopyWith(_SnWalletFundRecipient value, $Res Function(_SnWalletFundRecipient) _then) = __$SnWalletFundRecipientCopyWithImpl;
@override @useResult
$Res call({
String id, String fundId, String recipientAccountId, SnAccount? recipientAccount, double amount, bool isReceived, DateTime? receivedAt, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
});
@override $SnAccountCopyWith<$Res>? get recipientAccount;
}
/// @nodoc
class __$SnWalletFundRecipientCopyWithImpl<$Res>
implements _$SnWalletFundRecipientCopyWith<$Res> {
__$SnWalletFundRecipientCopyWithImpl(this._self, this._then);
final _SnWalletFundRecipient _self;
final $Res Function(_SnWalletFundRecipient) _then;
/// Create a copy of SnWalletFundRecipient
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? fundId = null,Object? recipientAccountId = null,Object? recipientAccount = freezed,Object? amount = null,Object? isReceived = null,Object? receivedAt = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
return _then(_SnWalletFundRecipient(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,fundId: null == fundId ? _self.fundId : fundId // ignore: cast_nullable_to_non_nullable
as String,recipientAccountId: null == recipientAccountId ? _self.recipientAccountId : recipientAccountId // ignore: cast_nullable_to_non_nullable
as String,recipientAccount: freezed == recipientAccount ? _self.recipientAccount : recipientAccount // ignore: cast_nullable_to_non_nullable
as SnAccount?,amount: null == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as double,isReceived: null == isReceived ? _self.isReceived : isReceived // ignore: cast_nullable_to_non_nullable
as bool,receivedAt: freezed == receivedAt ? _self.receivedAt : receivedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
/// Create a copy of SnWalletFundRecipient
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SnAccountCopyWith<$Res>? get recipientAccount {
if (_self.recipientAccount == null) {
return null;
}
return $SnAccountCopyWith<$Res>(_self.recipientAccount!, (value) {
return _then(_self.copyWith(recipientAccount: value));
});
}
}
// dart format on

View File

@@ -295,3 +295,88 @@ Map<String, dynamic> _$SnWalletGiftToJson(_SnWalletGift instance) =>
'updated_at': instance.updatedAt.toIso8601String(),
'deleted_at': instance.deletedAt?.toIso8601String(),
};
_SnWalletFund _$SnWalletFundFromJson(
Map<String, dynamic> json,
) => _SnWalletFund(
id: json['id'] as String,
currency: json['currency'] as String,
totalAmount: (json['total_amount'] as num).toDouble(),
splitType: (json['split_type'] as num).toInt(),
status: (json['status'] as num).toInt(),
message: json['message'] as String?,
creatorAccountId: json['creator_account_id'] as String,
creatorAccount:
json['creator_account'] == null
? null
: SnAccount.fromJson(json['creator_account'] as Map<String, dynamic>),
expiredAt: DateTime.parse(json['expired_at'] as String),
recipients:
(json['recipients'] as List<dynamic>)
.map((e) => SnWalletFundRecipient.fromJson(e as Map<String, dynamic>))
.toList(),
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
deletedAt:
json['deleted_at'] == null
? null
: DateTime.parse(json['deleted_at'] as String),
);
Map<String, dynamic> _$SnWalletFundToJson(_SnWalletFund instance) =>
<String, dynamic>{
'id': instance.id,
'currency': instance.currency,
'total_amount': instance.totalAmount,
'split_type': instance.splitType,
'status': instance.status,
'message': instance.message,
'creator_account_id': instance.creatorAccountId,
'creator_account': instance.creatorAccount?.toJson(),
'expired_at': instance.expiredAt.toIso8601String(),
'recipients': instance.recipients.map((e) => e.toJson()).toList(),
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
'deleted_at': instance.deletedAt?.toIso8601String(),
};
_SnWalletFundRecipient _$SnWalletFundRecipientFromJson(
Map<String, dynamic> json,
) => _SnWalletFundRecipient(
id: json['id'] as String,
fundId: json['fund_id'] as String,
recipientAccountId: json['recipient_account_id'] as String,
recipientAccount:
json['recipient_account'] == null
? null
: SnAccount.fromJson(
json['recipient_account'] as Map<String, dynamic>,
),
amount: (json['amount'] as num).toDouble(),
isReceived: json['is_received'] as bool,
receivedAt:
json['received_at'] == null
? null
: DateTime.parse(json['received_at'] as String),
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
deletedAt:
json['deleted_at'] == null
? null
: DateTime.parse(json['deleted_at'] as String),
);
Map<String, dynamic> _$SnWalletFundRecipientToJson(
_SnWalletFundRecipient instance,
) => <String, dynamic>{
'id': instance.id,
'fund_id': instance.fundId,
'recipient_account_id': instance.recipientAccountId,
'recipient_account': instance.recipientAccount?.toJson(),
'amount': instance.amount,
'is_received': instance.isReceived,
'received_at': instance.receivedAt?.toIso8601String(),
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
'deleted_at': instance.deletedAt?.toIso8601String(),
};

View File

@@ -6,7 +6,7 @@ part of 'captcha.config.dart';
// RiverpodGenerator
// **************************************************************************
String _$captchaUrlHash() => r'd46bc43032cef504547cd528a40c23cf76f27cc8';
String _$captchaUrlHash() => r'5d59de4f26a0544bf4fbd5209943f0b111959ce6';
/// See also [captchaUrl].
@ProviderFor(captchaUrl)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -24,6 +24,444 @@ final walletCurrentProvider = AutoDisposeFutureProvider<SnWallet?>.internal(
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
typedef WalletCurrentRef = AutoDisposeFutureProviderRef<SnWallet?>;
String _$walletFundsHash() => r'7ceb415f64fcadab2b10461e27b95bf92352c707';
/// Copied from Dart SDK
class _SystemHash {
_SystemHash._();
static int combine(int hash, int value) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + value);
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
}
static int finish(int hash) {
// ignore: parameter_assignments
hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
// ignore: parameter_assignments
hash = hash ^ (hash >> 11);
return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
}
}
/// See also [walletFunds].
@ProviderFor(walletFunds)
const walletFundsProvider = WalletFundsFamily();
/// See also [walletFunds].
class WalletFundsFamily extends Family<AsyncValue<List<SnWalletFund>>> {
/// See also [walletFunds].
const WalletFundsFamily();
/// See also [walletFunds].
WalletFundsProvider call({int offset = 0, int take = 20}) {
return WalletFundsProvider(offset: offset, take: take);
}
@override
WalletFundsProvider getProviderOverride(
covariant WalletFundsProvider provider,
) {
return call(offset: provider.offset, take: provider.take);
}
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'walletFundsProvider';
}
/// See also [walletFunds].
class WalletFundsProvider
extends AutoDisposeFutureProvider<List<SnWalletFund>> {
/// See also [walletFunds].
WalletFundsProvider({int offset = 0, int take = 20})
: this._internal(
(ref) => walletFunds(ref as WalletFundsRef, offset: offset, take: take),
from: walletFundsProvider,
name: r'walletFundsProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product')
? null
: _$walletFundsHash,
dependencies: WalletFundsFamily._dependencies,
allTransitiveDependencies: WalletFundsFamily._allTransitiveDependencies,
offset: offset,
take: take,
);
WalletFundsProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.offset,
required this.take,
}) : super.internal();
final int offset;
final int take;
@override
Override overrideWith(
FutureOr<List<SnWalletFund>> Function(WalletFundsRef provider) create,
) {
return ProviderOverride(
origin: this,
override: WalletFundsProvider._internal(
(ref) => create(ref as WalletFundsRef),
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
offset: offset,
take: take,
),
);
}
@override
AutoDisposeFutureProviderElement<List<SnWalletFund>> createElement() {
return _WalletFundsProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is WalletFundsProvider &&
other.offset == offset &&
other.take == take;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, offset.hashCode);
hash = _SystemHash.combine(hash, take.hashCode);
return _SystemHash.finish(hash);
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin WalletFundsRef on AutoDisposeFutureProviderRef<List<SnWalletFund>> {
/// The parameter `offset` of this provider.
int get offset;
/// The parameter `take` of this provider.
int get take;
}
class _WalletFundsProviderElement
extends AutoDisposeFutureProviderElement<List<SnWalletFund>>
with WalletFundsRef {
_WalletFundsProviderElement(super.provider);
@override
int get offset => (origin as WalletFundsProvider).offset;
@override
int get take => (origin as WalletFundsProvider).take;
}
String _$walletFundRecipientsHash() =>
r'18eb815eb709449dd5c545d81fc0ee43ca667578';
/// See also [walletFundRecipients].
@ProviderFor(walletFundRecipients)
const walletFundRecipientsProvider = WalletFundRecipientsFamily();
/// See also [walletFundRecipients].
class WalletFundRecipientsFamily
extends Family<AsyncValue<List<SnWalletFundRecipient>>> {
/// See also [walletFundRecipients].
const WalletFundRecipientsFamily();
/// See also [walletFundRecipients].
WalletFundRecipientsProvider call({int offset = 0, int take = 20}) {
return WalletFundRecipientsProvider(offset: offset, take: take);
}
@override
WalletFundRecipientsProvider getProviderOverride(
covariant WalletFundRecipientsProvider provider,
) {
return call(offset: provider.offset, take: provider.take);
}
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'walletFundRecipientsProvider';
}
/// See also [walletFundRecipients].
class WalletFundRecipientsProvider
extends AutoDisposeFutureProvider<List<SnWalletFundRecipient>> {
/// See also [walletFundRecipients].
WalletFundRecipientsProvider({int offset = 0, int take = 20})
: this._internal(
(ref) => walletFundRecipients(
ref as WalletFundRecipientsRef,
offset: offset,
take: take,
),
from: walletFundRecipientsProvider,
name: r'walletFundRecipientsProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product')
? null
: _$walletFundRecipientsHash,
dependencies: WalletFundRecipientsFamily._dependencies,
allTransitiveDependencies:
WalletFundRecipientsFamily._allTransitiveDependencies,
offset: offset,
take: take,
);
WalletFundRecipientsProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.offset,
required this.take,
}) : super.internal();
final int offset;
final int take;
@override
Override overrideWith(
FutureOr<List<SnWalletFundRecipient>> Function(
WalletFundRecipientsRef provider,
)
create,
) {
return ProviderOverride(
origin: this,
override: WalletFundRecipientsProvider._internal(
(ref) => create(ref as WalletFundRecipientsRef),
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
offset: offset,
take: take,
),
);
}
@override
AutoDisposeFutureProviderElement<List<SnWalletFundRecipient>>
createElement() {
return _WalletFundRecipientsProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is WalletFundRecipientsProvider &&
other.offset == offset &&
other.take == take;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, offset.hashCode);
hash = _SystemHash.combine(hash, take.hashCode);
return _SystemHash.finish(hash);
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin WalletFundRecipientsRef
on AutoDisposeFutureProviderRef<List<SnWalletFundRecipient>> {
/// The parameter `offset` of this provider.
int get offset;
/// The parameter `take` of this provider.
int get take;
}
class _WalletFundRecipientsProviderElement
extends AutoDisposeFutureProviderElement<List<SnWalletFundRecipient>>
with WalletFundRecipientsRef {
_WalletFundRecipientsProviderElement(super.provider);
@override
int get offset => (origin as WalletFundRecipientsProvider).offset;
@override
int get take => (origin as WalletFundRecipientsProvider).take;
}
String _$walletFundHash() => r'a690b0def8f4293b4a8f244e44f8bb735687e5dd';
/// See also [walletFund].
@ProviderFor(walletFund)
const walletFundProvider = WalletFundFamily();
/// See also [walletFund].
class WalletFundFamily extends Family<AsyncValue<SnWalletFund>> {
/// See also [walletFund].
const WalletFundFamily();
/// See also [walletFund].
WalletFundProvider call(String fundId) {
return WalletFundProvider(fundId);
}
@override
WalletFundProvider getProviderOverride(
covariant WalletFundProvider provider,
) {
return call(provider.fundId);
}
static const Iterable<ProviderOrFamily>? _dependencies = null;
@override
Iterable<ProviderOrFamily>? get dependencies => _dependencies;
static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;
@override
Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
_allTransitiveDependencies;
@override
String? get name => r'walletFundProvider';
}
/// See also [walletFund].
class WalletFundProvider extends AutoDisposeFutureProvider<SnWalletFund> {
/// See also [walletFund].
WalletFundProvider(String fundId)
: this._internal(
(ref) => walletFund(ref as WalletFundRef, fundId),
from: walletFundProvider,
name: r'walletFundProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product')
? null
: _$walletFundHash,
dependencies: WalletFundFamily._dependencies,
allTransitiveDependencies: WalletFundFamily._allTransitiveDependencies,
fundId: fundId,
);
WalletFundProvider._internal(
super._createNotifier, {
required super.name,
required super.dependencies,
required super.allTransitiveDependencies,
required super.debugGetCreateSourceHash,
required super.from,
required this.fundId,
}) : super.internal();
final String fundId;
@override
Override overrideWith(
FutureOr<SnWalletFund> Function(WalletFundRef provider) create,
) {
return ProviderOverride(
origin: this,
override: WalletFundProvider._internal(
(ref) => create(ref as WalletFundRef),
from: from,
name: null,
dependencies: null,
allTransitiveDependencies: null,
debugGetCreateSourceHash: null,
fundId: fundId,
),
);
}
@override
AutoDisposeFutureProviderElement<SnWalletFund> createElement() {
return _WalletFundProviderElement(this);
}
@override
bool operator ==(Object other) {
return other is WalletFundProvider && other.fundId == fundId;
}
@override
int get hashCode {
var hash = _SystemHash.combine(0, runtimeType.hashCode);
hash = _SystemHash.combine(hash, fundId.hashCode);
return _SystemHash.finish(hash);
}
}
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin WalletFundRef on AutoDisposeFutureProviderRef<SnWalletFund> {
/// The parameter `fundId` of this provider.
String get fundId;
}
class _WalletFundProviderElement
extends AutoDisposeFutureProviderElement<SnWalletFund>
with WalletFundRef {
_WalletFundProviderElement(super.provider);
@override
String get fundId => (origin as WalletFundProvider).fundId;
}
String _$walletFundStatsHash() => r'fac8761cf7828fa151e8cc9115416265148bd00e';
/// See also [walletFundStats].
@ProviderFor(walletFundStats)
final walletFundStatsProvider =
AutoDisposeFutureProvider<Map<String, dynamic>>.internal(
walletFundStats,
name: r'walletFundStatsProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product')
? null
: _$walletFundStatsHash,
dependencies: null,
allTransitiveDependencies: null,
);
@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
typedef WalletFundStatsRef = AutoDisposeFutureProviderRef<Map<String, dynamic>>;
String _$transactionListNotifierHash() =>
r'7b777cd44f3351f68f7bd1dd76bfe8b388381bdb';

View File

@@ -27,7 +27,7 @@ final accountStellarSubscriptionProvider =
// ignore: unused_element
typedef AccountStellarSubscriptionRef =
AutoDisposeFutureProviderRef<SnWalletSubscription?>;
String _$accountSentGiftsHash() => r'32a282ec863023c749d81423704787943110a188';
String _$accountSentGiftsHash() => r'36fdf4e2be3805e8501cca1657d8be27aa891ef4';
/// Copied from Dart SDK
class _SystemHash {
@@ -187,7 +187,7 @@ class _AccountSentGiftsProviderElement
}
String _$accountReceivedGiftsHash() =>
r'7c0dfcc109f6f50ec326dd64c2d944aaccd9f775';
r'15f6f7e27aa0277b67b02dd72875ba3efd147dfd';
/// See also [accountReceivedGifts].
@ProviderFor(accountReceivedGifts)
@@ -328,7 +328,7 @@ class _AccountReceivedGiftsProviderElement
int get take => (origin as AccountReceivedGiftsProvider).take;
}
String _$accountGiftHash() => r'7169d355f78e4fe3bf6b3ff444350faa46a0d216';
String _$accountGiftHash() => r'598c5071fff3cc1dd7eb867df48d69fef04543db';
/// See also [accountGift].
@ProviderFor(accountGift)