showNotification method

  1. @override
Future<Map<String, dynamic>> showNotification(
  1. String title,
  2. String message,
  3. String channelId,
  4. Uint8List imageBytes,
)
override

Implementation

@override
Future<Map<String, dynamic>> showNotification(
    String title, String message, String channelId, Uint8List imageBytes) async {
  try {
    final result = await methodChannel.invokeMethod(
        'showNotification', {'title': title, 'message': message, 'channel_id': channelId, 'image': imageBytes});
    return Map<String, dynamic>.from(result);
  } on PlatformException catch (e) {
    throw 'Failed to get location: ${e.message}';
  }
}