Event.fromMap constructor Null safety

Event.fromMap(
  1. Map<String, dynamic>? json
)

Implementation

factory Event.fromMap(Map<String, dynamic>? json) {
  return Event(
      eventId: json?['eventId'] as String?,
      eventType: json?['eventType'] as int?,
      eventValue: json?['eventValue'] as int?,
      config: json?['config'] as String?,
      expiry: json?['expiry'] as int?,
      broadcastOnlineOnly: json?['broadcastOnlineOnly'] as bool?,
      syncSelfEnable: json?['syncSelfEnable'] as bool?,
      publisherAccount: json?['publisherAccount'] as String?,
      publishTime: json?['publishTime'] as int?,
      publisherClientType: json?['publisherClientType'] as int?,
      multiClientConfig: json?['multiClientConfig'] as String?,
      multiClientConfigMap:
          (json?['multiClientConfigMap'] as Map?)?.cast<int, String>(),
      nimConfig: json?['nimConfig'] as String?);
}