flutter_media_notification 1.2.6 copy "flutter_media_notification: ^1.2.6" to clipboard
flutter_media_notification: ^1.2.6 copied to clipboard

discontinued

Flutter Media Notification helps you to show your media notification and control streaming media beyond your flutter app.

Flutter Media Notification #

Pub Package GitHub Issues GitHub Forks GitHub Stars GitHub License

IOS not implemented #


I'm looking for mac to develop ios side, so it takes time.

Flutter Media Notification helps you to show your media notification and control streaming media beyond your flutter app.

This library is open source, stable and AndroidX supported. Development happens on GitHub/flutter_media_notification. Feel free to report issues or create a pull-request there. An example within a music player shares on GitHub/flutter_music. If you found this project helpful or you learned something from the source code and want to thank me, consider donating me Here.

The package is hosted on dart packages.

Tutorial #

Installation #

Follow the installation instructions on dart packages.

Import the package into your Dart code using:

import 'package:flutter_media_notification/flutter_media_notification.dart';

Showing and Hiding #

To show notification when your music is playing use the function:

MediaNotification.showNotification(title: 'Title', author: 'Song author');

To show notification when your music is pausing use the function:

MediaNotification.showNotification(title: 'Title', author: 'Song author', isPlaying : false);

To hide notification use the function:

MediaNotification.hideNotification();

Setting a Listener #

To setting a listener for an action use these setListener in initState() of main.dart to control your media beyond your app:

  • set listener for play action:
    MediaNotification.setListener('play', () {
      setState();
    });
    
  • set listener for pause action:
    MediaNotification.setListener('pause', () {
      setState();
    });
    
  • set listener for next action:
    MediaNotification.setListener('next', () {
      setState();
    });
    
    • set listener for previous action:
    MediaNotification.setListener('prev', () {
      setState();
    });
    
  • set listener for selecting on notification:
    MediaNotification.setListener('select', () {
      setState();
    });
    

License #

The MIT License, see LICENSE.

39
likes
40
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter Media Notification helps you to show your media notification and control streaming media beyond your flutter app.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_media_notification