showNotificationManager static method Null safety

Future showNotificationManager(
  1. {dynamic title = '',
  2. dynamic author = '',
  3. dynamic imageUrl = '',
  4. dynamic isPlaying = true}
)

To show your media notification you have to pass title and author and Image of music. If music is pausing you have to set isPlaying false.

Implementation

static Future showNotificationManager(
    {title = '', author = '', imageUrl = '', isPlaying = true}) async {
  try {
    final Map<String, dynamic> params = <String, dynamic>{
      'title': title,
      'author': author,
      'imageUrl': imageUrl,
      'isPlaying': isPlaying
    };
    await _channel.invokeMethod('showNotificationManager', params);
    _channel.setMethodCallHandler(_utilsHandlerManager);
  } on PlatformException catch (e) {
    print("Failed to show notification: '${e.message}'.");
  }
}