flutter_visualizers 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 81

flutter_visualizers Pub

A Flutter plugin to Visualize the audio being played (only android).

Usage #

  • Add this to your pubspec.yaml

    flutter_visualizers: ^0.0.1
  • Get package from Pub:

    flutter packages get
  • Import it in your file

    import 'package:flutter_visualizers/flutter_visualizers.dart';

Example #

  • Firstly, get a audioSessionID from your native android Mediaplayer.

  • Simply Include this code in body

    new Visualizer(
            builder: (BuildContext context, List<int> wave) {
              return new CustomPaint(
                painter: new LineVisualizer(
                  waveData: wave,
                  height: MediaQuery.of(context).size.height,
                  width : MediaQuery.of(context).size.width,
                  color: Colors.blueAccent,
                child: new Container(),
            id: playerID,

    Here playerId is the AudioSessionId which id needed to initialize the Visualizer. (Required Audio Recording Permission in Android)

    See the Complete Example

Sample #


Credits #

License #

Copyright [2018] [Sahdeep Singh]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Getting Started with Flutter #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

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

0.0.2 #

  • Just Initialized


flutter_visualizers_example #

Example to demonstrates how to use the flutter_visualizers plugin.

Steps here followed #

* Flutter
    - Created two method calls. One for getting sessionId and second to play song. [Look](https://github.com/iamSahdeep/FlutterVisualizers/blob/master/example/lib/methodcalls.dart)
    - [Ui.dart](https://github.com/iamSahdeep/FlutterVisualizers/blob/master/example/lib/Ui.dart) contains the main view where visualizers are shown which DropDownButton in app bar.
* Android
    - [Here](https://github.com/iamSahdeep/FlutterVisualizers/blob/master/example/android/app/src/main/java/com/sahdeepsingh/fluttervisualizersexample/MainActivity.java) is how it is Implemented.

For more Details and usage look at Wiki on Github.

Use this package as a library

1. Depend on it

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

  flutter_visualizers: ^0.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:flutter_visualizers/flutter_visualizers.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

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

Analysis of lib/callbacks.dart reported 1 hint:

line 12 col 34: This function has a return type of 'Future', but doesn't end with a return statement.

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

Analysis of lib/visualizer.dart reported 1 hint:

line 5 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: Visualizer.id

Format lib/Visualizers/BarVisualizer.dart.

Run flutter format to format lib/Visualizers/BarVisualizer.dart.

Fix additional 5 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/Visualizers/CircularBarVisualizer.dart (Run flutter format to format lib/Visualizers/CircularBarVisualizer.dart.)
  • lib/Visualizers/CircularLineVisualizer.dart (Run flutter format to format lib/Visualizers/CircularLineVisualizer.dart.)
  • lib/Visualizers/LineBarVisualizer.dart (Run flutter format to format lib/Visualizers/LineBarVisualizer.dart.)
  • lib/Visualizers/LineVisualizer.dart (Run flutter format to format lib/Visualizers/LineVisualizer.dart.)
  • lib/Visualizers/MultiWaveVisualizer.dart (Run flutter format to format lib/Visualizers/MultiWaveVisualizer.dart.)

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8