progress on batches
This commit is contained in:
@@ -20,14 +20,14 @@ class RecipientModel {
|
||||
@freezed
|
||||
abstract class Recipient with _$Recipient {
|
||||
const factory Recipient({
|
||||
String? uid,
|
||||
String? name,
|
||||
String? email,
|
||||
String? phoneNumber,
|
||||
String? address,
|
||||
String? account,
|
||||
String? initials,
|
||||
String? latestProviderLabel,
|
||||
@JsonKey(includeIfNull: false) String? uid,
|
||||
@JsonKey(includeIfNull: false) String? name,
|
||||
@JsonKey(includeIfNull: false) String? email,
|
||||
@JsonKey(includeIfNull: false) String? phoneNumber,
|
||||
@JsonKey(includeIfNull: false) String? address,
|
||||
@JsonKey(includeIfNull: false) String? account,
|
||||
@JsonKey(includeIfNull: false) String? initials,
|
||||
@JsonKey(includeIfNull: false) String? latestProviderLabel,
|
||||
}) = _Recipient;
|
||||
|
||||
factory Recipient.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -40,14 +40,15 @@ class RecipientsController extends ChangeNotifier {
|
||||
BuildContext context;
|
||||
|
||||
RecipientsController(this.context) {
|
||||
model.selectedProvider =
|
||||
Provider.of<TransactionController>(
|
||||
context,
|
||||
listen: false,
|
||||
).model.selectedProvider;
|
||||
model.selectedProvider = Provider.of<TransactionController>(
|
||||
context,
|
||||
listen: false,
|
||||
).model.selectedProvider;
|
||||
}
|
||||
|
||||
Future<ApiResponse<List<Recipient>>> getRecipients([Map<String, String>? params]) async {
|
||||
Future<ApiResponse<List<Recipient>>> getRecipients([
|
||||
Map<String, String>? params,
|
||||
]) async {
|
||||
model.errorMessage = null;
|
||||
model.isLoading = true;
|
||||
model.recipients = getDummyRecipients();
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$Recipient {
|
||||
|
||||
String? get uid; String? get name; String? get email; String? get phoneNumber; String? get address; String? get account; String? get initials; String? get latestProviderLabel;
|
||||
@JsonKey(includeIfNull: false) String? get uid;@JsonKey(includeIfNull: false) String? get name;@JsonKey(includeIfNull: false) String? get email;@JsonKey(includeIfNull: false) String? get phoneNumber;@JsonKey(includeIfNull: false) String? get address;@JsonKey(includeIfNull: false) String? get account;@JsonKey(includeIfNull: false) String? get initials;@JsonKey(includeIfNull: false) String? get latestProviderLabel;
|
||||
/// Create a copy of Recipient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $RecipientCopyWith<$Res> {
|
||||
factory $RecipientCopyWith(Recipient value, $Res Function(Recipient) _then) = _$RecipientCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? uid, String? name, String? email, String? phoneNumber, String? address, String? account, String? initials, String? latestProviderLabel
|
||||
@JsonKey(includeIfNull: false) String? uid,@JsonKey(includeIfNull: false) String? name,@JsonKey(includeIfNull: false) String? email,@JsonKey(includeIfNull: false) String? phoneNumber,@JsonKey(includeIfNull: false) String? address,@JsonKey(includeIfNull: false) String? account,@JsonKey(includeIfNull: false) String? initials,@JsonKey(includeIfNull: false) String? latestProviderLabel
|
||||
});
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? uid, String? name, String? email, String? phoneNumber, String? address, String? account, String? initials, String? latestProviderLabel)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(includeIfNull: false) String? uid, @JsonKey(includeIfNull: false) String? name, @JsonKey(includeIfNull: false) String? email, @JsonKey(includeIfNull: false) String? phoneNumber, @JsonKey(includeIfNull: false) String? address, @JsonKey(includeIfNull: false) String? account, @JsonKey(includeIfNull: false) String? initials, @JsonKey(includeIfNull: false) String? latestProviderLabel)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Recipient() when $default != null:
|
||||
return $default(_that.uid,_that.name,_that.email,_that.phoneNumber,_that.address,_that.account,_that.initials,_that.latestProviderLabel);case _:
|
||||
@@ -181,7 +181,7 @@ return $default(_that.uid,_that.name,_that.email,_that.phoneNumber,_that.address
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? uid, String? name, String? email, String? phoneNumber, String? address, String? account, String? initials, String? latestProviderLabel) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(includeIfNull: false) String? uid, @JsonKey(includeIfNull: false) String? name, @JsonKey(includeIfNull: false) String? email, @JsonKey(includeIfNull: false) String? phoneNumber, @JsonKey(includeIfNull: false) String? address, @JsonKey(includeIfNull: false) String? account, @JsonKey(includeIfNull: false) String? initials, @JsonKey(includeIfNull: false) String? latestProviderLabel) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Recipient():
|
||||
return $default(_that.uid,_that.name,_that.email,_that.phoneNumber,_that.address,_that.account,_that.initials,_that.latestProviderLabel);case _:
|
||||
@@ -201,7 +201,7 @@ return $default(_that.uid,_that.name,_that.email,_that.phoneNumber,_that.address
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? uid, String? name, String? email, String? phoneNumber, String? address, String? account, String? initials, String? latestProviderLabel)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(includeIfNull: false) String? uid, @JsonKey(includeIfNull: false) String? name, @JsonKey(includeIfNull: false) String? email, @JsonKey(includeIfNull: false) String? phoneNumber, @JsonKey(includeIfNull: false) String? address, @JsonKey(includeIfNull: false) String? account, @JsonKey(includeIfNull: false) String? initials, @JsonKey(includeIfNull: false) String? latestProviderLabel)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _Recipient() when $default != null:
|
||||
return $default(_that.uid,_that.name,_that.email,_that.phoneNumber,_that.address,_that.account,_that.initials,_that.latestProviderLabel);case _:
|
||||
@@ -216,17 +216,17 @@ return $default(_that.uid,_that.name,_that.email,_that.phoneNumber,_that.address
|
||||
@JsonSerializable()
|
||||
|
||||
class _Recipient implements Recipient {
|
||||
const _Recipient({this.uid, this.name, this.email, this.phoneNumber, this.address, this.account, this.initials, this.latestProviderLabel});
|
||||
const _Recipient({@JsonKey(includeIfNull: false) this.uid, @JsonKey(includeIfNull: false) this.name, @JsonKey(includeIfNull: false) this.email, @JsonKey(includeIfNull: false) this.phoneNumber, @JsonKey(includeIfNull: false) this.address, @JsonKey(includeIfNull: false) this.account, @JsonKey(includeIfNull: false) this.initials, @JsonKey(includeIfNull: false) this.latestProviderLabel});
|
||||
factory _Recipient.fromJson(Map<String, dynamic> json) => _$RecipientFromJson(json);
|
||||
|
||||
@override final String? uid;
|
||||
@override final String? name;
|
||||
@override final String? email;
|
||||
@override final String? phoneNumber;
|
||||
@override final String? address;
|
||||
@override final String? account;
|
||||
@override final String? initials;
|
||||
@override final String? latestProviderLabel;
|
||||
@override@JsonKey(includeIfNull: false) final String? uid;
|
||||
@override@JsonKey(includeIfNull: false) final String? name;
|
||||
@override@JsonKey(includeIfNull: false) final String? email;
|
||||
@override@JsonKey(includeIfNull: false) final String? phoneNumber;
|
||||
@override@JsonKey(includeIfNull: false) final String? address;
|
||||
@override@JsonKey(includeIfNull: false) final String? account;
|
||||
@override@JsonKey(includeIfNull: false) final String? initials;
|
||||
@override@JsonKey(includeIfNull: false) final String? latestProviderLabel;
|
||||
|
||||
/// Create a copy of Recipient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -261,7 +261,7 @@ abstract mixin class _$RecipientCopyWith<$Res> implements $RecipientCopyWith<$Re
|
||||
factory _$RecipientCopyWith(_Recipient value, $Res Function(_Recipient) _then) = __$RecipientCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? uid, String? name, String? email, String? phoneNumber, String? address, String? account, String? initials, String? latestProviderLabel
|
||||
@JsonKey(includeIfNull: false) String? uid,@JsonKey(includeIfNull: false) String? name,@JsonKey(includeIfNull: false) String? email,@JsonKey(includeIfNull: false) String? phoneNumber,@JsonKey(includeIfNull: false) String? address,@JsonKey(includeIfNull: false) String? account,@JsonKey(includeIfNull: false) String? initials,@JsonKey(includeIfNull: false) String? latestProviderLabel
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@ _Recipient _$RecipientFromJson(Map<String, dynamic> json) => _Recipient(
|
||||
|
||||
Map<String, dynamic> _$RecipientToJson(_Recipient instance) =>
|
||||
<String, dynamic>{
|
||||
'uid': instance.uid,
|
||||
'name': instance.name,
|
||||
'email': instance.email,
|
||||
'phoneNumber': instance.phoneNumber,
|
||||
'address': instance.address,
|
||||
'account': instance.account,
|
||||
'initials': instance.initials,
|
||||
'latestProviderLabel': instance.latestProviderLabel,
|
||||
'uid': ?instance.uid,
|
||||
'name': ?instance.name,
|
||||
'email': ?instance.email,
|
||||
'phoneNumber': ?instance.phoneNumber,
|
||||
'address': ?instance.address,
|
||||
'account': ?instance.account,
|
||||
'initials': ?instance.initials,
|
||||
'latestProviderLabel': ?instance.latestProviderLabel,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user