/// list : []
/// message : ""
/// operation : true

class Response {
  List? list;
  String? message;
  bool? operation;

  Response();

  factory Response.fromMapList(Map<String, dynamic> map, Function? parser) {

    List list = [];
    if (map['list'] != null) {
      (map['list'] as List).forEach((element) {
        if(parser == null)
          list.add(element);
        else
        list.add(parser(element));
      });
    }
    Response responseBean = Response();
    responseBean.list = list;
    responseBean.message = map['message'];
    responseBean.operation = map['operation'];
    return responseBean;
  }


}
