SubscriberList.fromMap constructor

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

Implementation

factory SubscriberList.fromMap(
  Map<String, dynamic> map,
) {
  map = {
    'total': 0,
    'subscribers': [],
    ...map,
  };

  return SubscriberList(
    total: map['total'],
    subscribers: List<Subscriber>.from(
      map['subscribers'].map((p) => Subscriber.fromMap(p)),
    ),
  );
}