CascadeModel.fromMap constructor

CascadeModel.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory CascadeModel.fromMap(Map<String, dynamic> map) {
  return new CascadeModel(
    code: map['code'] as String,
    name: map['name'] as String,
    children: map['children']?.map<CascadeModel>((e) => CascadeModel.fromMap(e)).toList(),
    // children: map['children'] as List<CascadeModel>,
  );
}