fromMap static method

NEForegroundServiceConfig? fromMap(
  1. Map? map
)

Implementation

static NEForegroundServiceConfig? fromMap(Map? map) {
  if (map == null) {
    return null;
  }
  final config = new NEForegroundServiceConfig();
  config.contentTitle =
      map['contentTitle']?.toString() ?? defaultContentTitle;
  config.contentText = map['contentText']?.toString() ?? defaultContentText;
  config.smallIcon = map['smallIcon'] as int? ?? 0;
  config.launchClassName = map['launchClassName']?.toString();
  config.ticker = map['ticker']?.toString() ?? defaultContentTicker;
  config.channelId = map['channelId']?.toString() ?? defaultChannelId;
  config.channelName = map['channelName']?.toString() ?? defaultChannelName;
  config.channelDesc = map['channelDesc']?.toString() ?? defaultChannelDesc;
  return config;
}