Escalation.fromMap constructor

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

Implementation

factory Escalation.fromMap(
  Map<String, dynamic> map,
) {
  map = {
    '\$id': "",
    '\$createdAt': "",
    '\$updatedAt': "",
    'name': "",
    'steps': [],
    'repeat': 0,
    ...map,
  };

  return Escalation(
    $id: map['\$id'].toString(),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
    name: map['name'].toString(),
    steps: List<EscalationStep>.from(
      map['steps'].map((p) => EscalationStep.fromMap(p)),
    ),
    repeat: map['repeat'],
  );
}