import 'package:flutter/material.dart';
import 'package:doctor/common/settings.dart';

class PrescriptionsModel {
  String prescription_name = '';
  String patient_name='';
  String prescription_url='';
  String age='';
  String gender='';
  String patient_type='';
  List prescriptionUrls=[];


  PrescriptionsModel();

  factory PrescriptionsModel.fromJson(Map<String, dynamic> json){
    PrescriptionsModel rtvm = new PrescriptionsModel();

    rtvm.prescriptionUrls=json['precription']??[];

    /*rtvm.prescription_name = json['name'] ?? '';
    rtvm.patient_type = json['patientType'] ?? '';
    rtvm.prescription_url = json['pictureUrl'][0] ?? '';

    if(rtvm.patient_type.toString().toLowerCase()=='self'){
      rtvm.age=AppSettings.age;
      rtvm.gender=AppSettings.gender;
      rtvm.patient_name=AppSettings.userName;
    }

    else{
      rtvm.age=json['others']['age'].toString();
      rtvm.gender=json['others']['gender'];
      rtvm.patient_name=json['others']['name'];
    }*/

    return rtvm;
  }

}