Files
friebetill 80f218097d Initial commit
Add Space version 2.0.1
2022-03-28 14:56:00 +02:00

28 lines
732 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'csv_card.g.dart';
@JsonSerializable()
class CSVCard {
CSVCard({required this.front, required this.back});
/// Constructs a new [CSVCard] from the given [json].
///
/// A conversion from JSON is especially useful in order to handle results
/// from an import.
factory CSVCard.fromJson(Map<String, dynamic> json) {
return _$CSVCardFromJson(json);
}
/// Front content of the card
final String front;
/// Back content of the card.
final String back;
/// Constructs a new json map from this [CSVCard].
///
/// A conversion to JSON is useful in order to send through an isolate.
Map<String, dynamic> toJson() => _$CSVCardToJson(this);
}