You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
662 B
Dart
32 lines
662 B
Dart
|
6 years ago
|
|
||
|
|
/*
|
||
|
|
*@author: Amjad Amireh
|
||
|
|
*@Date:27/4/2020
|
||
|
|
*@param:
|
||
|
|
*@return:pass a List<dynamic> to a List<MyModel> from a JSON
|
||
|
|
|
||
|
|
*@desc:
|
||
|
|
*/
|
||
|
6 years ago
|
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||
|
|
//ModelResponse
|
||
|
|
class ModelResponse {
|
||
|
6 years ago
|
final List<PatiantInformtion> list;
|
||
|
|
String firstName;
|
||
|
6 years ago
|
ModelResponse({
|
||
|
6 years ago
|
this.list,
|
||
|
|
this.firstName,
|
||
|
|
});
|
||
|
|
|
||
|
6 years ago
|
factory ModelResponse.fromJson(List<dynamic> parsedJson) {
|
||
|
6 years ago
|
|
||
|
6 years ago
|
|
||
|
6 years ago
|
List<PatiantInformtion> list = new List<PatiantInformtion>();
|
||
|
6 years ago
|
|
||
|
6 years ago
|
list = parsedJson.map((i) => PatiantInformtion.fromJson(i)).toList();
|
||
|
|
|
||
|
6 years ago
|
return new ModelResponse(list: list);
|
||
|
6 years ago
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
class PatiantInformtionl {
|
||
|
|
}
|