buildMenuItemList function
Implementation
List<NEMeetingMenuItem>? buildMenuItemList(List? json) {
return json
?.whereType<Map<String, dynamic>>()
.map((element) {
NEMeetingMenuItem? item;
final type = element['type'];
if (type == _MenuItemTypes.singleStateMenuItem) {
item = _buildSingleStateMenuItem(element);
} else if (type == _MenuItemTypes.checkableMenuItem) {
item = _buildCheckableMenuItem(element);
}
if (item?.isValid ?? false) {
return item;
}
return null;
})
.whereType<NEMeetingMenuItem>()
.toList(growable: false);
}