// GENERATED CODE - DO NOT MODIFY BY HAND part of 'transaction_page.dart'; // ************************************************************************** // CopyWithGenerator // ************************************************************************** abstract class _$TransactionPageCWProxy { TransactionPage items(List items); TransactionPage page(int page); TransactionPage pageSize(int pageSize); TransactionPage total(int total); /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `TransactionPage(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// TransactionPage(...).copyWith(id: 12, name: "My name") /// ```` TransactionPage call({ List items, int page, int pageSize, int total, }); } /// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfTransactionPage.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfTransactionPage.copyWith.fieldName(...)` class _$TransactionPageCWProxyImpl implements _$TransactionPageCWProxy { const _$TransactionPageCWProxyImpl(this._value); final TransactionPage _value; @override TransactionPage items(List items) => this(items: items); @override TransactionPage page(int page) => this(page: page); @override TransactionPage pageSize(int pageSize) => this(pageSize: pageSize); @override TransactionPage total(int total) => this(total: total); @override /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `TransactionPage(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// TransactionPage(...).copyWith(id: 12, name: "My name") /// ```` TransactionPage call({ Object? items = const $CopyWithPlaceholder(), Object? page = const $CopyWithPlaceholder(), Object? pageSize = const $CopyWithPlaceholder(), Object? total = const $CopyWithPlaceholder(), }) { return TransactionPage( items: items == const $CopyWithPlaceholder() ? _value.items // ignore: cast_nullable_to_non_nullable : items as List, page: page == const $CopyWithPlaceholder() ? _value.page // ignore: cast_nullable_to_non_nullable : page as int, pageSize: pageSize == const $CopyWithPlaceholder() ? _value.pageSize // ignore: cast_nullable_to_non_nullable : pageSize as int, total: total == const $CopyWithPlaceholder() ? _value.total // ignore: cast_nullable_to_non_nullable : total as int, ); } } extension $TransactionPageCopyWith on TransactionPage { /// Returns a callable class that can be used as follows: `instanceOfTransactionPage.copyWith(...)` or like so:`instanceOfTransactionPage.copyWith.fieldName(...)`. // ignore: library_private_types_in_public_api _$TransactionPageCWProxy get copyWith => _$TransactionPageCWProxyImpl(this); } // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** TransactionPage _$TransactionPageFromJson(Map json) => $checkedCreate('TransactionPage', json, ($checkedConvert) { $checkKeys( json, requiredKeys: const ['items', 'page', 'page_size', 'total'], ); final val = TransactionPage( items: $checkedConvert( 'items', (v) => (v as List) .map((e) => TransactionOut.fromJson(e as Map)) .toList(), ), page: $checkedConvert('page', (v) => (v as num).toInt()), pageSize: $checkedConvert('page_size', (v) => (v as num).toInt()), total: $checkedConvert('total', (v) => (v as num).toInt()), ); return val; }, fieldKeyMap: const {'pageSize': 'page_size'}); Map _$TransactionPageToJson(TransactionPage instance) => { 'items': instance.items.map((e) => e.toJson()).toList(), 'page': instance.page, 'page_size': instance.pageSize, 'total': instance.total, };