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.
34 lines
855 B
34 lines
855 B
8 months ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:intl/intl.dart';
|
||
|
|
||
|
|
||
|
class BPHistoryModel {
|
||
|
String bpText = '';
|
||
|
String systolic= '';
|
||
|
String diastolic= '';
|
||
|
String date= '';
|
||
|
String bpId= '';
|
||
|
String displayDate='';
|
||
|
String actualDate='';
|
||
|
DateTime dateForFilter=new DateTime.now();
|
||
|
|
||
|
|
||
|
BPHistoryModel();
|
||
|
|
||
|
factory BPHistoryModel.fromJson(Map<String, dynamic> json){
|
||
|
BPHistoryModel rtvm = new BPHistoryModel();
|
||
|
|
||
|
rtvm.bpText = json['bpCategory'].toString() ?? '';
|
||
|
rtvm.systolic = json['Systolic'].toString() ?? '';
|
||
|
rtvm.diastolic = json['Diastolic'].toString() ?? '';
|
||
|
rtvm.date = json['createdAt'].toString() ?? '';
|
||
|
rtvm.actualDate = json['date'].toString() ?? '';
|
||
|
rtvm.bpId= json['bpinfoid'].toString() ?? '';
|
||
|
|
||
|
rtvm.dateForFilter = DateFormat('dd-MM-yyyy').parse(rtvm.actualDate);
|
||
|
|
||
|
|
||
|
return rtvm;
|
||
|
}
|
||
|
|
||
|
}
|