voyagehandbook/lib/api/classes.dart
2023-03-18 16:55:08 +01:00

21 lines
628 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'classes.g.dart';
@JsonSerializable()
class SearchResponse {
final int id;
final String key;
final String title;
final String excerpt;
final String description;
const SearchResponse(
this.id, this.key, this.title, this.excerpt, this.description);
/// Connect the generated function to the `fromJson`
/// factory.
factory SearchResponse.fromJson(Map<String, dynamic> json) =>
_$SearchResponseFromJson(json);
/// Connect the generated function to the `toJson` method.
Map<String, dynamic> toJson() => _$SearchResponseToJson(this);
}