22 lines
524 B
Dart
22 lines
524 B
Dart
import 'package:aman_kassa_flutter/core/models/check_item.dart';
|
|
|
|
class CheckData {
|
|
final String ?type;
|
|
num? card;
|
|
final List<CheckItem>? items;
|
|
CheckData({this.type, this.card, this.items});
|
|
|
|
static CheckData fromJson(Map<String, dynamic> json) {
|
|
return CheckData(
|
|
type: json['type'],
|
|
card: json['card'],
|
|
items: json['items'],
|
|
);
|
|
}
|
|
Map<String, dynamic> toJson() =>
|
|
{
|
|
'type': type,
|
|
'card': card,
|
|
'items': items?.map((e) => e.toJson()).toList()
|
|
};
|
|
} |