179 lines
7.8 KiB
Dart
179 lines
7.8 KiB
Dart
// dart format width=80
|
|
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'page_list.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
/// @nodoc
|
|
mixin _$PageList<T> implements DiagnosticableTreeMixin {
|
|
|
|
String get cursor; int get page; int get size; int get total; List<T> get list; bool get loadAll; bool get loading;
|
|
/// Create a copy of PageList
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$PageListCopyWith<T, PageList<T>> get copyWith => _$PageListCopyWithImpl<T, PageList<T>>(this as PageList<T>, _$identity);
|
|
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'PageList<$T>'))
|
|
..add(DiagnosticsProperty('cursor', cursor))..add(DiagnosticsProperty('page', page))..add(DiagnosticsProperty('size', size))..add(DiagnosticsProperty('total', total))..add(DiagnosticsProperty('list', list))..add(DiagnosticsProperty('loadAll', loadAll))..add(DiagnosticsProperty('loading', loading));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is PageList<T>&&(identical(other.cursor, cursor) || other.cursor == cursor)&&(identical(other.page, page) || other.page == page)&&(identical(other.size, size) || other.size == size)&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other.list, list)&&(identical(other.loadAll, loadAll) || other.loadAll == loadAll)&&(identical(other.loading, loading) || other.loading == loading));
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,cursor,page,size,total,const DeepCollectionEquality().hash(list),loadAll,loading);
|
|
|
|
@override
|
|
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
|
return 'PageList<$T>(cursor: $cursor, page: $page, size: $size, total: $total, list: $list, loadAll: $loadAll, loading: $loading)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $PageListCopyWith<T,$Res> {
|
|
factory $PageListCopyWith(PageList<T> value, $Res Function(PageList<T>) _then) = _$PageListCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
String cursor, int page, int size, int total, List<T> list, bool loadAll, bool loading
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$PageListCopyWithImpl<T,$Res>
|
|
implements $PageListCopyWith<T, $Res> {
|
|
_$PageListCopyWithImpl(this._self, this._then);
|
|
|
|
final PageList<T> _self;
|
|
final $Res Function(PageList<T>) _then;
|
|
|
|
/// Create a copy of PageList
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? cursor = null,Object? page = null,Object? size = null,Object? total = null,Object? list = null,Object? loadAll = null,Object? loading = null,}) {
|
|
return _then(_self.copyWith(
|
|
cursor: null == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable
|
|
as String,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
|
as int,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
|
as int,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
|
as int,list: null == list ? _self.list : list // ignore: cast_nullable_to_non_nullable
|
|
as List<T>,loadAll: null == loadAll ? _self.loadAll : loadAll // ignore: cast_nullable_to_non_nullable
|
|
as bool,loading: null == loading ? _self.loading : loading // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
|
class _PageList<T> with DiagnosticableTreeMixin implements PageList<T> {
|
|
const _PageList({this.cursor = '', this.page = 1, this.size = 10, this.total = 0, final List<T> list = const [], this.loadAll = false, this.loading = false}): _list = list;
|
|
|
|
|
|
@override@JsonKey() final String cursor;
|
|
@override@JsonKey() final int page;
|
|
@override@JsonKey() final int size;
|
|
@override@JsonKey() final int total;
|
|
final List<T> _list;
|
|
@override@JsonKey() List<T> get list {
|
|
if (_list is EqualUnmodifiableListView) return _list;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_list);
|
|
}
|
|
|
|
@override@JsonKey() final bool loadAll;
|
|
@override@JsonKey() final bool loading;
|
|
|
|
/// Create a copy of PageList
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$PageListCopyWith<T, _PageList<T>> get copyWith => __$PageListCopyWithImpl<T, _PageList<T>>(this, _$identity);
|
|
|
|
|
|
@override
|
|
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
|
properties
|
|
..add(DiagnosticsProperty('type', 'PageList<$T>'))
|
|
..add(DiagnosticsProperty('cursor', cursor))..add(DiagnosticsProperty('page', page))..add(DiagnosticsProperty('size', size))..add(DiagnosticsProperty('total', total))..add(DiagnosticsProperty('list', list))..add(DiagnosticsProperty('loadAll', loadAll))..add(DiagnosticsProperty('loading', loading));
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PageList<T>&&(identical(other.cursor, cursor) || other.cursor == cursor)&&(identical(other.page, page) || other.page == page)&&(identical(other.size, size) || other.size == size)&&(identical(other.total, total) || other.total == total)&&const DeepCollectionEquality().equals(other._list, _list)&&(identical(other.loadAll, loadAll) || other.loadAll == loadAll)&&(identical(other.loading, loading) || other.loading == loading));
|
|
}
|
|
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,cursor,page,size,total,const DeepCollectionEquality().hash(_list),loadAll,loading);
|
|
|
|
@override
|
|
String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
|
|
return 'PageList<$T>(cursor: $cursor, page: $page, size: $size, total: $total, list: $list, loadAll: $loadAll, loading: $loading)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$PageListCopyWith<T,$Res> implements $PageListCopyWith<T, $Res> {
|
|
factory _$PageListCopyWith(_PageList<T> value, $Res Function(_PageList<T>) _then) = __$PageListCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
String cursor, int page, int size, int total, List<T> list, bool loadAll, bool loading
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$PageListCopyWithImpl<T,$Res>
|
|
implements _$PageListCopyWith<T, $Res> {
|
|
__$PageListCopyWithImpl(this._self, this._then);
|
|
|
|
final _PageList<T> _self;
|
|
final $Res Function(_PageList<T>) _then;
|
|
|
|
/// Create a copy of PageList
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? cursor = null,Object? page = null,Object? size = null,Object? total = null,Object? list = null,Object? loadAll = null,Object? loading = null,}) {
|
|
return _then(_PageList<T>(
|
|
cursor: null == cursor ? _self.cursor : cursor // ignore: cast_nullable_to_non_nullable
|
|
as String,page: null == page ? _self.page : page // ignore: cast_nullable_to_non_nullable
|
|
as int,size: null == size ? _self.size : size // ignore: cast_nullable_to_non_nullable
|
|
as int,total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable
|
|
as int,list: null == list ? _self._list : list // ignore: cast_nullable_to_non_nullable
|
|
as List<T>,loadAll: null == loadAll ? _self.loadAll : loadAll // ignore: cast_nullable_to_non_nullable
|
|
as bool,loading: null == loading ? _self.loading : loading // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
// dart format on
|