// GENERATED CODE - DO NOT MODIFY BY HAND part of 'event_page.dart'; // ************************************************************************** // CopyWithGenerator // ************************************************************************** abstract class _$EventPageCWProxy { EventPage items(List items); EventPage page(int page); EventPage pageSize(int pageSize); EventPage 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 `EventPage(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// EventPage(...).copyWith(id: 12, name: "My name") /// ```` EventPage 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: `instanceOfEventPage.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfEventPage.copyWith.fieldName(...)` class _$EventPageCWProxyImpl implements _$EventPageCWProxy { const _$EventPageCWProxyImpl(this._value); final EventPage _value; @override EventPage items(List items) => this(items: items); @override EventPage page(int page) => this(page: page); @override EventPage pageSize(int pageSize) => this(pageSize: pageSize); @override EventPage 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 `EventPage(...).copyWith.fieldName(...)` to override fields one at a time with nullification support. /// /// Usage /// ```dart /// EventPage(...).copyWith(id: 12, name: "My name") /// ```` EventPage call({ Object? items = const $CopyWithPlaceholder(), Object? page = const $CopyWithPlaceholder(), Object? pageSize = const $CopyWithPlaceholder(), Object? total = const $CopyWithPlaceholder(), }) { return EventPage( 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 $EventPageCopyWith on EventPage { /// Returns a callable class that can be used as follows: `instanceOfEventPage.copyWith(...)` or like so:`instanceOfEventPage.copyWith.fieldName(...)`. // ignore: library_private_types_in_public_api _$EventPageCWProxy get copyWith => _$EventPageCWProxyImpl(this); } // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** EventPage _$EventPageFromJson(Map json) => $checkedCreate('EventPage', json, ($checkedConvert) { $checkKeys( json, requiredKeys: const ['items', 'page', 'page_size', 'total'], ); final val = EventPage( items: $checkedConvert( 'items', (v) => (v as List) .map((e) => EventOut.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 _$EventPageToJson(EventPage instance) => { 'items': instance.items.map((e) => e.toJson()).toList(), 'page': instance.page, 'page_size': instance.pageSize, 'total': instance.total, };