flappy_infocenter 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 65

Flappy InfoCenter #

A Flutter plugin to handle iOS Playing Info Center events such as play, pause, title, etc.

Installation #

flappy_infocenter: 1.0.1

Getting Started #

The plugin allows to display easily the playing info center on iOS. This is the built-in notification used to display audio or video information in the notification center.

It will work if and only if a player is currently launched. The tests have been made using the audioplayers plugin.

First, import the package in your code

import 'package:flappy_infocenter/flappy_infocenter.dart';

You can then access the FlappyInfoCenter singleton freely in your code.

API #

All the methods will overwrite what is currently displayed in the info center.

Info #

static setInfo(String author, String title) async

Displays in the info center an author and a title for the given audio or video played.

Progress #

static setProgress(int progress) async

Displays in the info center the progress in seconds for the given audio or video played. Will work if and only if a total duration has been set.

Duration #

static setDuration(int duration) async

Displays in the info center the total duration in seconds of the given audio or video played.

Image #

static setImage(String url) async

Displays in the info center an image for the given audio or video played. The image must be a valid URL.

Player listener #

static setPlayerListener(PlayerListener listener)

Allows to get info center control events. Currently, only PLAY and PAUSE works.

Example :

FlappyInfoCenter.setPlayerListener((PlayerState state) {
  switch (state) {
    case PlayerState.PLAY:
      play();
      break;
    case PlayerState.PAUSE:
      pause();
      break;
    case PlayerState.NEXT:
      break;
    case PlayerState.PREVIOUS:
      break;
  }
});

1.0.0 #

  • Initial release

1.0.1 #

  • Upgrade Kotlin version

1.0.2 #

  • Fix Android package name error

example/README.md

iosnotif_example #

Demonstrates how to use the iosnotif plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flappy_infocenter: ^1.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flappy_infocenter/flappy_infocenter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Health issues and suggestions

Document public APIs. (-1 points)

15 out of 15 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/flappy_infocenter.dart. (-0.50 points)

Analysis of lib/flappy_infocenter.dart reported 1 hint:

line 1 col 8: Unused import: 'dart:async'.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test