ScreenView.fromMap constructor

ScreenView.fromMap(
  1. Map map
)

ScreenView.fromMap(Map map) is a named constructor that takes a Map as an argument and creates a new ScreenView object from the data in the map.

Implementation

ScreenView.fromMap(Map map)
    : this._(
        name: map['name'],
        identifier: map['identifier'],
        hashString: map['hashString'],
        path: map['path'],
        priority: map['priority'],
        audience: map['audience'] != null
            ? ScreenViewAudienceInfo.fromMap(map['audience'])
            : null,
        data: map['data'] != null
            ? Map<String, Object>.from(map['data'])
            : null,
        updatedAt: SyneriseUtils.formatIntToDateTime(map['updatedAt']),
        createdAt: SyneriseUtils.formatIntToDateTime(map['createdAt']),
      );