You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@OverRide
Map<String, dynamic> toJson(VehicleQueryOptions options) =>
options.toJson() as Map<String, dynamic>;
}
`
How do i use the VehicleQueryOptionsConverter the use case is not the doc.
The text was updated successfully, but these errors were encountered:
`part of 'vehicle_cubit.dart';
@freezed
class VehicleState with _$VehicleState {
const factory VehicleState.initial(
@VehicleQueryOptionsConverter() VehicleQueryOptions myResponse) =
_Initial;
const factory VehicleState.loading({
required List vehicles,
required @VehicleQueryOptionsConverter() VehicleQueryOptions queryOptions,
}) = _Loading;
const factory VehicleState.loaded({
required List vehicles,
required List filteredVehicles,
required VehicleQueryOptions queryOptions,
}) = _Loaded;
const factory VehicleState.error({
String? message,
List? vehicles,
required VehicleQueryOptions queryOptions,
}) = _Error;
factory VehicleState.fromJson(Map<String, dynamic> json) =>
_$VehicleStateFromJson(json);
}
class VehicleQueryOptionsConverter
implements JsonConverter<VehicleQueryOptions, Map<String, dynamic>> {
const VehicleQueryOptionsConverter();
@OverRide
VehicleQueryOptions fromJson(Map<String, dynamic> json) =>
VehicleQueryOptions.fromMap(json);
@OverRide
Map<String, dynamic> toJson(VehicleQueryOptions options) =>
options.toJson() as Map<String, dynamic>;
}
`
How do i use the VehicleQueryOptionsConverter the use case is not the doc.
The text was updated successfully, but these errors were encountered: