import 'package:deus_app/model/drop_menu_item.dart';

dropMenuItemFromJson(DropMenuItem data, Map<String, dynamic> json) {
	if (json['label'] != null) {
		data.label = json['label'];
	}
	if (json['value'] != null) {
		data.value = json['value'] is String
				? int.tryParse(json['value'])
				: json['value'].toInt();
	}
	return data;
}

Map<String, dynamic> dropMenuItemToJson(DropMenuItem entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['label'] = entity.label;
	data['value'] = entity.value;
	return data;
}