Glitters

Pub Version

A glittering widget for Flutter.

Screencast

What it does

This package provides two types of widgets:

  • Glitters
    • The main widget of this package that fades in and out glitter-like shapes one by one inside itself. This is useful when you want some part of your app to look shiny.
  • SingleGlitter
    • Just an extra widget to draw a single static glitter-like shape.

Code examples

Simplest

const ColoredBox(
  color: Colors.black,
  child: Glitters(),
)

Multiple glitters

SizedBox(
  width: 200.0,
  height: 200.0,
  child: ColoredBox(
    color: Colors.black,
    child: Stack(
      children: const [
        Glitters(
          interval: Duration(milliseconds: 300),
          maxOpacity: 0.7,
          color: Colors.orange,
        ),
        Glitters(
          duration: Duration(milliseconds: 200),
          outDuration: Duration(milliseconds: 500),
          interval: Duration.zero,
          color: Colors.white,
          maxOpacity: 0.5,
        ),
      ],
    ),
  ),
)

A single static glitter

const ColoredBox(
  color: Colors.black,
  child: SingleGlitter(
    maxWidth: 100.0,
    maxHeight: 100.0,
    aspectRatio: 0.8,
  ),
)

Libraries

glitters
single_glitter