class BmiModel { final double value; final String time; BmiModel({required this.value, required this.time}); factory BmiModel.fromMap(Map map) { return BmiModel( value: (map['value'] as num).toDouble(), time: map['time'] as String, ); } }