패키지, 저장소 및 앱 카테고리 검색

waveform_flutter 표지
패키지 상세v1.2.0

waveform_flutter

Flutter 앱에서 사용자 정의가 가능하고 아름다운 애니메이션 웨이브폼 만들기

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
4.7만
좋아요
87
Pub 점수
150

패키지 설치

flutter pub add waveform_flutter

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Waveform Flutter는 사용자 정의가 가능하고 시각적으로 매력적인 패키지로, Flutter 애플리케이션에서 애니메이션 웨이브폼을 생성하는 데 사용됩니다. 개발자들이 부드러운 애니메이션으로 실시간 오디오 시각화를 표시할 수 있도록 하며, 색상, 두께, 애니메이션 속도와 같은 다양한 웨이브폼 스타일과 커스터마이징 옵션을 지원합니다. 음악 플레이어, 오디오 편집기 및 사운드 시각화 앱에 적합하며, Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼에서 작동합니다. Flutter 위젯 시스템과 원활하게 통합되며, 동적 오디오 웨이브폼을 렌더링하기 위한 직관적인 API를 제공합니다.

사용 사례

  • 음악 플레이어 UI
  • 오디오 시각화 도구
  • 실시간 사운드 모니터링
  • 인터랙티브 오디오 앱
  • 라이브 공연 표시

주요 기능

  • 높은 사용자 정의 가능한 외관
  • 부드러운 애니메이션 파형
  • 크로스 플랫폼 지원
  • 실시간 오디오 렌더링
  • 사용자 지정 가능한 색상 및 선 두께

적합한 대상

  • 오디오 앱 개발자
  • 음악 앱에 집중하는 UI 디자이너
  • 크로스플랫폼 오디오 프로젝트
  • 실시간 파형 표시가 필요한 앱

고려 사항

  • 애니메이션을 위해 오디오 데이터 입력이 필요합니다
  • 고해상도 파형에 따라 성능이 달라질 수 있습니다
  • 제한된 내장 오디오 처리
  • 활성 오디오 스트림이 있는 앱에 가장 적합

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

WaveForm

WaveForm is a Flutter package that helps you build animated waveforms in your Flutter app. With the popularity of voice-based chat UIs rising, WaveForm provides an easy and efficient way to visualize audio waveforms. Inspired by WaveSurfer.js, WaveForm offers a range of features to integrate beautiful and functional waveforms into your Flutter applications.

Demo

Features

  • Stream-based Waveform Generation: Create real-time waveforms from a stream of amplitude data.
  • Customizable Bars: Adjust the appearance of waveform bars, including color and maximum height.
  • Animated Lists: Use animated lists to smoothly display new waveform data.
  • Flexible Integration: Easily integrate with other Flutter widgets and packages.

Important 🚨

Please note that this package does not provide a connection to an audio source (like microphone). I recommend using record to connect this package to a live stream of audio.

Installation

Add the following to your pubspec.yaml file:

dependencies:
  waveform: latest_version

Then run flutter pub get to install the package.

Usage

Basic Example

Below is an example of how to use WaveForm to display an animated waveform:

import 'package:flutter/material.dart';
import 'package:waveform_flutter/waveform_flutter.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('WaveForm Example')),
        body: WaveFormExample(),
      ),
    );
  }
}

class WaveFormExample extends StatefulWidget {
  const WaveFormExample({super.key});

  @override
  // ignore: library_private_types_in_public_api
  _WaveFormExampleState createState() => _WaveFormExampleState();
}

class _WaveFormExampleState extends State<WaveFormExample> {
  final Stream<Amplitude> _amplitudeStream = createRandomAmplitudeStream();

  @override
  Widget build(BuildContext context) {
    return AnimatedWaveList(stream: _amplitudeStream);
  }
}

Components

AnimatedWaveList

Displays an animated list of waveform bars based on a stream of amplitude values.

const AnimatedWaveList({
  required Stream<Amplitude> stream,
});

WaveformBar

Represents a single bar in the waveform visualisation.

const WaveFormBar({
  required Amplitude amplitude,
  Animation<double>? animation,
  int maxHeight = 2,
  Color color = Colors.cyan,
});

Helpers

createRandomAmplitudeStream

Creates a stream of random amplitude values.

Stream<Amplitude> createRandomAmplitudeStream() {
  return Stream.periodic(
    const Duration(milliseconds: 70),
    (count) => Amplitude(
      current: Random().nextDouble() * 100,
      max: 100,
    ),
  );
}

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

WaveForm is licensed under the MIT License. See the LICENSE file for more details.

Credits

WaveForm is inspired by WaveSurfer.js.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트