You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
healthcare-frontend/lib/models/pharmacies_model.dart

40 lines
1.2 KiB

import 'package:flutter/material.dart';
import 'package:healthcare_user/common/settings.dart';
class PharmaciesModel {
String pharmacy_name = '';
String status='';
String picture='';
String contact_number='';
String pharmacy_address='';
String pharmacy_id='';
String registration_number='';
String description='';
String starting_price='';
Color text_color=Colors.black;
double lat=0;
double lng=0;
bool isChecked=false;
bool isPharmacyInDialogChecked=false;
PharmaciesModel();
factory PharmaciesModel.fromJson(Map<String, dynamic> json){
PharmaciesModel rtvm = new PharmaciesModel();
rtvm.pharmacy_name = json['pharmacyname'] ?? '';
rtvm.pharmacy_id = json['pharmacyId'] ?? '';
rtvm.contact_number = json['phone'] ?? '';
rtvm.pharmacy_address =json['profile']['pharmacy_address'] ?? '';
rtvm.registration_number = json['registration_number'] ?? '';
rtvm.description = json['description'] ?? '';
rtvm.starting_price = json['startingPrice'] ?? '';
rtvm.picture = json['picture'] ?? '';
rtvm.status = json['status'] ?? '';
rtvm.lat = json['latitude'] ?? 0.0;
rtvm.lng = json['longitude'] ??0.0;
return rtvm;
}
}