show method
Future<bool?>
show({
- required String time,
- required String title,
- required String description,
- required AlertType type,
- required void onClose(),
override
Implementation
@override
Future<bool?> show({
required String time,
required String title,
required String description,
required AlertType type,
required void Function() onClose,
}) async {
if (Platform.isAndroid) {
listenBroadcastStream();
final onCloseHandle = PluginUtilities.getCallbackHandle(onClose);
var args = {
'time': time,
'title': title,
'description': description,
'alert_type': type.name,
'on_close': onCloseHandle?.toRawHandle()
};
return await methodChannel.invokeMethod('showAlert', args);
}
return Future.value(false);
}