DVNotificationTemplating extension

Rendering a DVNotificationTemplate through DV.I18n.

on

Methods

sendTemplate(String recipient, DVNotificationTemplate template, {LocaleTag? locale, Map<String, String> args = const <String, String>{}, Map<String, String> data = const <String, String>{}, List<DVNotificationChannel> channels = const <DVNotificationChannel>[DVNotificationChannel.inApp]}) → Future<DVNotificationDelivery>

Available on DVNotificationsService, provided by the DVNotificationTemplating extension

Sends template to recipient, rendered in locale (the current one when null) with args interpolated. Strict: a missing translation is an error rather than a notification whose title is a key name. Returns what each channel did, the same as DVNotificationsService.send. A void return could not tell a caller whether the translated message reached anybody, which for a notification is the only question.