Index.fromMap constructor

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

Implementation

factory Index.fromMap(Map<String, dynamic> map) {
  return Index(
    key: map['key'].toString(),
    type: map['type'].toString(),
    status: map['status'].toString(),
    error: map['error'].toString(),
    attributes: List.from(map['attributes'] ?? []),
    orders: List.from(map['orders'] ?? []),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
  );
}