updateBackgroundNotification method

  1. @override
Future<bool?> updateBackgroundNotification({
  1. String? channelName,
  2. String? title,
  3. String? iconName,
  4. String? subtitle,
  5. String? description,
  6. Color? color,
  7. bool? onTapBringToFront,
})
override

Return true if the notification was properly updated

Implementation

@override
Future<bool?> updateBackgroundNotification({
  String? channelName,
  String? title,
  String? iconName,
  String? subtitle,
  String? description,
  Color? color,
  bool? onTapBringToFront,
}) async {
  if (!Platform.isAndroid) {
    return true;
  }
  return _api.changeNotificationSettings(
    PigeonNotificationSettings(
      channelName: channelName,
      title: title,
      iconName: iconName,
      subtitle: subtitle,
      description: description,
      color: color != null ? '#${color.value.toRadixString(16)}' : null,
      onTapBringToFront: onTapBringToFront,
    ),
  );
}