siri_wave library
A Flutter library that lets you create visually stunning Siri-style waveforms.
Currently, there are two waveform styles available:
- iOS 7 Siri-style waveform
- iOS 9 Siri-style waveform
Here's a basic example demonstrating how to create an iOS 7 Siri-style waveform:
import 'package:siri_wave/siri_wave.dart';
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SiriWaveform.ios7();
}
}
You can customize the waveform by passing a controller
and/or options
:
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final controller = IOS7SiriWaveController(
amplitude: 0.5,
color: Colors.red,
frequency: 4,
speed: 0.15,
);
return SiriWaveform.ios7(
controller: controller,
options: IOS7SiriWaveformOptions(
height: 180,
width: 360,
),
);
}
}
You can also change the properties of the waveform later:
controller.amplitude = 0.3;
controller.color = Colors.white;
Here's a basic example demonstrating how to create an iOS 9 Siri-style waveform:
import 'package:siri_wave/siri_wave.dart';
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SiriWaveform.ios9();
}
}
As with the iOS 7 Siri-style waveform, you can customize the waveform by
passing a controller
and/or options
:
import 'package:siri_wave/siri_wave.dart';
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final controller = IOS9SiriWaveController(
amplitude: 0.5,
speed: 0.15,
);
return SiriWaveform.ios9(
controller: controller,
options: IOS9SiriWaveformOptions(
height: 180,
width: 360,
showSupportBar: false,
),
);
}
}
Classes
- IOS7SiriWaveform
- An iOS 7 Siri-style waveform.
- IOS7SiriWaveformController
- A controller for managing iOS 7 Siri-style waveforms.
- IOS7SiriWaveformOptions
- Represents the configuration options for an iOS 7 Siri-style waveform.
- IOS7SiriWaveformPainter
- A custom painter responsible for rendering an iOS 7 Siri-style waveform.
- IOS7SiriWaveformState
- IOS9SiriWaveform
- An iOS 9 Siri-style waveform.
- IOS9SiriWaveformController
- A controller for managing iOS 9 Siri-style waveforms.
- IOS9SiriWaveformOptions
- Represents the configuration options for an iOS 9 Siri-style waveform.
- IOS9SiriWaveformPainter
- A custom painter responsible for rendering an iOS 9 Siri-style waveform.
- IOS9SiriWaveformState
- IOS9SiriWaveformSupportBarPainter
- A custom painter responsible for rendering a support bar on iOS 9 Siri-style waveform.
- SiriWaveform
- A Siri-style waveform.
- SiriWaveformController
- A base class for controllers used to manage Siri-style waveforms.
- SiriWaveformOptions
-
Represents the configuration options that can be used with the
SiriWaveform
widget.
Enums
- SiriWaveformStyle
-
Represents the waveform style that will be used by the
SiriWaveform
widget.