wave_animation 1.0.4 copy "wave_animation: ^1.0.4" to clipboard
wave_animation: ^1.0.4 copied to clipboard

A customizable wave animation widget for Flutter with null-safe options. Create beautiful, animated waves with multiple layers, gradient colors, and motion patterns.

example/main.dart

// main.dart
import 'package:flutter/material.dart';
import 'package:wave_animation/wave_animation.dart';

void main() {
  runApp(const WaveExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Wave Animation Example',
      home: Scaffold(
        appBar: AppBar(title: const Text('Wave Animation Example')),
        body: Center(
          child: WaveWidget(
            // height of the wave widget
            height: 250,

            // gradient colors for first wave layer
            gradientColors1: [
              Colors.blue.withAlpha(40),
              Colors.lightBlueAccent.withAlpha(40),
            ],

            // gradient colors for second wave layer
            gradientColors2: [
              Colors.purple.withAlpha(50),
              Colors.pinkAccent.withAlpha(50),
            ],

            // number of wave lines to draw
            lineCount: 3,

            // amplitude of the waves
            amplitude: 20,

            // wavelength of the waves
            waveLength: 200,

            // speed multiplier for wave animation
            speed: 0.8,

            // choose motion pattern
            pattern: WaveMotionPattern.flowFieldLoop,

            // visibility toggle
            visible: true,
          ),
        ),
      ),
    );
  }
}
3
likes
160
points
145
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable wave animation widget for Flutter with null-safe options. Create beautiful, animated waves with multiple layers, gradient colors, and motion patterns.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on wave_animation