sendLocalNotification method
Future<bool?>
sendLocalNotification({
- required LocalNotificationWithAndroid android,
- required LocalNotificationWithIOS ios,
发送本地通知到调度器,指定时间出发该通知。
Implementation
Future<bool?> sendLocalNotification({
required LocalNotificationWithAndroid android,
required LocalNotificationWithIOS ios,
}) async {
if (!_supportPlatform) return false;
final result = await _channel.invokeMethod<bool>(
'sendLocalNotification', _isAndroid ? android.toMap() : ios.toMap());
return result ?? false;
}