fromMap static method

MemberActionEntity? fromMap(
  1. Object? o, {
  2. Map<String, String>? newDocumentIds,
})

Implementation

static MemberActionEntity? fromMap(Object? o,
    {Map<String, String>? newDocumentIds}) {
  if (o == null) return null;
  var map = o as Map<String, dynamic>;

  var actionFromMap = map['action'];
  if (actionFromMap != null) {
    actionFromMap =
        ActionEntity.fromMap(actionFromMap, newDocumentIds: newDocumentIds);
  }

  return MemberActionEntity(
    text: map['text'],
    description: map['description'],
    action: actionFromMap,
  );
}