搜索插件、代码仓与 APP 分类

插件详情v0.0.2

flutter_visualizers

一个用于可视化正在播放的音频(仅限 Android)的 Flutter 插件。

近 30 天下载
32
喜欢数
67
Pub 分数
40

安装插件

flutter pub add flutter_visualizers

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

flutter_visualizers 是一个专为 Android 设备设计的 Flutter 插件,用于可视化音频播放。它提供音频信号的实时视觉表示,非常适合音乐播放器或音频分析应用。该插件利用 Android 内置的可视化 API,在应用界面中直接渲染波形或频谱图。目前仅支持 Android,限制了其跨平台使用。开发者可通过 pub.dev 轻松集成,并自定义视觉风格以匹配其应用的设计。它通过在播放过程中提供动态音频反馈来增强用户参与度。

适合场景

  • 音乐播放器应用
  • 音频波形可视化
  • 实时音频分析
  • 交互式音频仪表板
  • 教育音频工具

主要特点

  • 实时音频可视化
  • 仅支持 Android
  • 与 pub.dev 的简单集成
  • 可自定义的视觉样式
  • 内置的 Android 可视化 API

适合对象

  • 专注于Android的音频应用
  • 音乐和声音可视化项目
  • 寻求实时音频反馈的开发者
  • 需要实时波形显示的应用程序
  • 教育或实验性音频工具

使用建议

  • 不适用于 iOS 或其他平台
  • 仅限 Android 特定功能
  • 需要 Android SDK 设置
  • 可能对低端设备产生性能影响
  • 除了 GitHub 仓库外,没有官方文档

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

flutter_visualizers (Depreciated & Not maintaining)Pub

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

Usage

  • Add this to your pubspec.yaml

    dependencies:
    flutter_visualizers: ^0.0.2
    
    
  • 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.

    player.getAudioSessionId()
    
  • 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

Video

Credits

License

Copyright [2019] [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

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
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.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。