fromEntity static method
Implementation
static Future<MenuItemModel?> fromEntity(
String documentID, MenuItemEntity? entity) async {
if (entity == null) return null;
return MenuItemModel(
documentID: documentID,
text: entity.text,
description: entity.description,
icon: await IconModel.fromEntity(entity.icon),
action: await ActionModel.fromEntity(entity.action),
);
}