TSelectionEntity.fromJson constructor
TSelectionEntity.fromJson(
- Map? map
Implementation
TSelectionEntity.fromJson(Map<dynamic, dynamic>? map)
: title = '',
maxSelectedCount = TSelectionConstant.maxSelectCount,
isCustomTitleHighLight = false,
isSelected = false,
children = [],
extMap = {} {
if (map == null) return;
title = map['title'] ?? '';
subTitle = map['subTitle'] ?? '';
key = map['key'] ?? '';
type = map['type'] ?? '';
defaultValue = map['defaultValue'] ?? '';
value = map['value'] ?? '';
if (map['maxSelectedCount'] != null &&
int.tryParse(map['maxSelectedCount']) != null) {
maxSelectedCount = int.tryParse(map['maxSelectedCount']) ??
TSelectionConstant.maxSelectCount;
}
extMap = map['ext'] ?? {};
children = [...(map['children'] ?? []).map((o) => TSelectionEntity.fromJson(o))];
filterType = parserFilterTypeWithType(map['type'] ?? '');
isSelected = false;
}