import 'package:flutter/material.dart'; class GetAllOffersModel { String description=''; String name=''; String code=''; String category=''; String startDate=''; String endDate=''; String picture=''; String pharmacy_id=''; bool isChecked=false; GetAllOffersModel(); factory GetAllOffersModel.fromJson(Map json){ GetAllOffersModel rtvm = new GetAllOffersModel(); rtvm.description = json['description'] ?? ''; rtvm.name = json['offer_name'] ?? ''; rtvm.code = json['offer_code'] ?? ''; rtvm.category = json['category'] ?? ''; rtvm.startDate = json['starting_date'] ?? ''; rtvm.endDate = json['ending_date'] ?? ''; rtvm.picture = json['picture'][0]['url'] ?? ''; return rtvm; } }