CheckItem.fromJson constructor

CheckItem.fromJson(
  1. Map<String, dynamic> json
)

Creates a CheckItem from JSON

Implementation

factory CheckItem.fromJson(Map<String, dynamic> json) {
  return CheckItem(
    id:
        json['id']?.toString() ??
        DateTime.now().millisecondsSinceEpoch.toString(),
    name: json['item']?.toString() ?? '',
    value: json['value']?.toString() ?? '',
    isChecked: json['isChecked'] ?? false,
  );
}