60 lines
1.8 KiB
Dart
60 lines
1.8 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'api_response.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_$ApiResponseImpl<T> _$$ApiResponseImplFromJson<T>(
|
|
Map<String, dynamic> json,
|
|
T Function(Object? json) fromJsonT,
|
|
) => _$ApiResponseImpl<T>(
|
|
success: json['success'] as bool,
|
|
message: json['message'] as String,
|
|
data: _$nullableGenericFromJson(json['data'], fromJsonT),
|
|
meta: json['meta'] as Map<String, dynamic>?,
|
|
);
|
|
|
|
Map<String, dynamic> _$$ApiResponseImplToJson<T>(
|
|
_$ApiResponseImpl<T> instance,
|
|
Object? Function(T value) toJsonT,
|
|
) => <String, dynamic>{
|
|
'success': instance.success,
|
|
'message': instance.message,
|
|
'data': _$nullableGenericToJson(instance.data, toJsonT),
|
|
'meta': instance.meta,
|
|
};
|
|
|
|
T? _$nullableGenericFromJson<T>(
|
|
Object? input,
|
|
T Function(Object? json) fromJson,
|
|
) => input == null ? null : fromJson(input);
|
|
|
|
Object? _$nullableGenericToJson<T>(
|
|
T? input,
|
|
Object? Function(T value) toJson,
|
|
) => input == null ? null : toJson(input);
|
|
|
|
_$PaginatedResponseImpl<T> _$$PaginatedResponseImplFromJson<T>(
|
|
Map<String, dynamic> json,
|
|
T Function(Object? json) fromJsonT,
|
|
) => _$PaginatedResponseImpl<T>(
|
|
items: (json['items'] as List<dynamic>).map(fromJsonT).toList(),
|
|
page: (json['page'] as num).toInt(),
|
|
limit: (json['limit'] as num).toInt(),
|
|
total: (json['total'] as num).toInt(),
|
|
totalPages: (json['totalPages'] as num).toInt(),
|
|
);
|
|
|
|
Map<String, dynamic> _$$PaginatedResponseImplToJson<T>(
|
|
_$PaginatedResponseImpl<T> instance,
|
|
Object? Function(T value) toJsonT,
|
|
) => <String, dynamic>{
|
|
'items': instance.items.map(toJsonT).toList(),
|
|
'page': instance.page,
|
|
'limit': instance.limit,
|
|
'total': instance.total,
|
|
'totalPages': instance.totalPages,
|
|
};
|