configure method
Future<void>
configure({
- MessageHandler? onMessage,
- MessageHandler? onLaunch,
- MessageHandler? onResume,
- List<
RedlinkPushOption> ? pushOptions,
Implementation
Future<void> configure({
MessageHandler? onMessage,
MessageHandler? onLaunch,
MessageHandler? onResume,
List<RedlinkPushOption>? pushOptions,
}) {
_onMessage = onMessage ?? (_) {};
_onLaunch = onLaunch ?? (_) {};
_onResume = onResume ?? (_) {};
ChannelUtil.setMethodCallHandler(_handleChannelMethodCallback);
return ChannelUtil.invokeMethod<void>(
method: ChannelMethod.configureSDK,
arguments: {
"pushOptions": pushOptions,
},
).catchError(
(error) {
// There is no need to log a TimeoutException.
if (error is! TimeoutException) throw error;
},
);
}