FLUTTER ECOSYSTEM

halildurmus/siri_wave

创建如 Siri 般美丽的波形。

siri_wave 项目封面
Stars
88
Forks
19
最近推送(UTC)
2026年7月21日
项目状态
未归档
Halil Durmus GitHub avatar
GITHUB User

Halil Durmus ↗

Software Engineer • Dart Enthusiast💙🎯

语言DartHTMLSwiftKotlinObjective-C

技术话题

此仓库发布的插件

使用的依赖

依赖清单 4 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}
  • halildurmus_hooks开发依赖^0.1.1
  • halildurmus_lints开发依赖^2.0.0

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

ci Package: siri_wave Publisher: halildurmus.dev Language: Dart Platform: Flutter License: BSD-3-Clause

Create visually stunning waveforms similar to those found in Siri.

Inspired from the siriwave library.

Demo

Check out the live demo here.

iOS 7 Siri-style waveform GIF

iOS 7 Siri-style waveform

iOS 9 Siri-style waveform GIF

iOS 9 Siri-style waveform

Usage

iOS 7 Siri-style waveform

To create an iOS 7 Siri-style waveform, use the SiriWaveform.ios7() constructor:

import 'package:siri_wave/siri_wave.dart';

class MyWidget extends StatelessWidget {
  MyWidget({super.key});

  Widget build(BuildContext context) => SiriWaveform.ios7();
}

You can customize the waveform by passing a controller and/or options:

class MyWidget extends StatelessWidget {
  MyWidget({super.key});

  final controller = IOS7SiriWaveformController(
    amplitude: 0.5,
    color: Colors.red,
    frequency: 4,
    speed: 0.15,
  );

  @override
  Widget build(BuildContext context) => SiriWaveform.ios7(
        controller: controller,
        options: const IOS7SiriWaveformOptions(height: 200, width: 400),
      );
}

You can also change the properties of the waveform later:

  controller.amplitude = 0.3;
  controller.color = Colors.white;
iOS 9 Siri-style waveform

To create an iOS 9 Siri-style waveform, use the SiriWaveform.ios9() constructor:

import 'package:siri_wave/siri_wave.dart';

class MyWidget extends StatelessWidget {
  MyWidget({super.key});

  Widget build(BuildContext context) => SiriWaveform.ios9();
}

As with the iOS 7 Siri-style waveform, you can customize the waveform by passing a controller and/or options:

class MyWidget extends StatelessWidget {
  MyWidget({super.key});

  final controller = IOS9SiriWaveformController(
    amplitude: 0.5,
    color1: Colors.red,
    color2: Colors.green,
    color3: Colors.blue,
    speed: 0.15,
  );

  @override
  Widget build(BuildContext context) => SiriWaveform.ios9(
        controller: controller,
        options: const IOS9SiriWaveformOptions(height: 200, width: 400),
      );
}

For a complete sample application, please checkout the example.

To learn more, see the API Documentation.

🤝 Contributing

Contributions, issues and feature requests are welcome. Feel free to check the issue tracker if you want to contribute.