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

GitHub 저장소glorylab/wave

파도

파도를 표시하기 위한 Flutter 패키지입니다.

파도 프로젝트 이미지
스타
1.1천
포크
95
최근 푸시(UTC)
2026. 8. 17.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

WAVE

Flutter package: tm - WAVE

Awesome: Flutter Pub GitHub

A Flutter package for displaying animated wave backgrounds.

Demo

Platform URL
Web wave.glorylab.xyz

The web demo is an interactive generator. Adjust the config mode, palette, layer count, height, amplitude, speed, and loop behavior, then copy the generated WaveWidget code into your app.

Wave Generator web demo with live preview, controls, performance metrics, and generated code dialog entry

Deployment

The web demo is built from example/ and deployed with Cloudflare Workers Static Assets. See docs/cloudflare-workers.md for the GitHub Actions and migration setup.

Install

dependencies:
  wave: ^0.2.4

Minimal Example

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

class WaveBackground extends StatelessWidget {
  const WaveBackground({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return WaveWidget(
      config: SingleConfig(
        color: Color(0xFF00BBF9),
        layers: 3,
      ),
      size: Size(double.infinity, double.infinity),
    );
  }
}

Use WaveWidget anywhere a normal widget can be painted. Give it a bounded parent, such as SizedBox.expand, Positioned.fill, or a fixed-height container.

Config Modes

Single color

SingleConfig creates layered waves from one base color.

WaveWidget(
  config: SingleConfig(
    color: const Color(0xFF00BBF9),
    layers: 3,
  ),
  size: const Size(double.infinity, double.infinity),
)
Seeded random colors

RandomConfig creates generated colors for each layer. Provide seed when deterministic output is useful for tests, demos, or copyable examples. Omit seed only when you really want a new generated palette for each config construction.

WaveWidget(
  config: RandomConfig(
    seed: 7,
    layers: 4,
  ),
  size: const Size(double.infinity, double.infinity),
)
Custom colors or gradients

CustomConfig is the most explicit mode. Use it when you want full control over each layer's color or gradient, duration, and height.

WaveWidget(
  config: CustomConfig(
    gradients: const [
      [Color(0xFF00BBF9), Color(0xFF9B5DE5)],
      [Color(0xFFFEE440), Color(0xFFF15BB5)],
    ],
    durations: const [5000, 4000],
    heightPercentages: const [0.65, 0.66],
  ),
  size: const Size(double.infinity, double.infinity),
)

Parameters

WaveWidget
Parameter Type Default Description
config Config required Layer colors, durations, heights, and blur.
size Size required Paint size for the wave stack.
waveAmplitude double 20.0 Base vertical movement of the wave path.
wavePhase double 10.0 Initial phase offset for the animation.
waveFrequency double 1.6 Horizontal frequency of the wave path.
duration int? 6000 Total runtime in milliseconds when isLoop is false.
backgroundColor Color? null Background color behind the waves.
backgroundImage DecorationImage? null Background image behind the waves.
isLoop bool true Whether animations repeat indefinitely.
Config classes
Class Best for Key parameters
SingleConfig One-color layered waves color, layers, opacityPercentages, durations, heightPercentages
RandomConfig Fast generated palettes layers, seed, colors, durations, heightPercentages
CustomConfig Exact colors or gradients colors or gradients, durations, heightPercentages, gradientBegin, gradientEnd

Common Errors

CustomConfig requires exactly one of colors or gradients.

CustomConfig(
  colors: const [Color(0xFF00BBF9)],
  gradients: const [
    [Color(0xFF00BBF9), Color(0xFF9B5DE5)],
  ],
  durations: const [5000],
  heightPercentages: const [0.65],
)

All per-layer lists must have the same length.

CustomConfig(
  colors: const [Color(0xFF00BBF9), Color(0xFF9B5DE5)],
  durations: const [5000],
  heightPercentages: const [0.65, 0.66],
)

heightPercentages and opacityPercentages values must be between 0 and 1, and every duration must be positive.

Glory Lab GitHub avatar
GitHub 작성자

Glory Lab ↗

Glory Lab helps you enter the crypto world more comfortably.

언어DartHTML

분류

사용 중인 의존성

의존성 목록 3 개

  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • test개발 의존성^1.16.5

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗