Skip to content

Flutter package for blinking or fade-like color transitions on any widget. Supports fade effect between two colors or cycling through multiple colors. All platforms support.

License

Notifications You must be signed in to change notification settings

AbdullahProjects/blinker

Repository files navigation

Blinker

pub package License: BSD-3-Clause GitHub stars

Customizable Flutter package for fade transitions and color cycling animations, perfect for highlighting UI elements, creating dynamic loading placeholders, or adding subtle animated effects to your app.

Features

  • Fade Mode (Blinker.fade) — Smoothly animates between two colors.
  • Cycle Mode (Blinker.cycle) — Loops through a sequence of colors.
  • Customizable animation speed and easing curve.
  • Loop control: Run infinitely or a set number of times.
  • Lightweight & Pure Dart: No native dependencies.

Demo

Loading List Rating TImer
Loading List Rating Timer

Installation

Add blinker to your pubspec.yaml file:

dependencies:
  blinker: ^1.0.3

Run the following command to install:

flutter pub get

Import the package

import 'package:blinker/blinker.dart';

💡 Usage (Example)

Fade Mode

Blinker.fade(
  startColor: Colors.white,
  endColor: Colors.blue,
  duration: const Duration(milliseconds: 800),
  curve: Curves.easeInOut,
  times: null, // Infinite loop
  child: Container(
    width: 150,
    height: 40,
    color: Colors.white,
  ),
)

Cycle Mode

Blinker.cycle(
  colors: [
    Colors.red,
    Colors.green,
    Colors.blue,
    Colors.yellow,
  ],
  duration: const Duration(milliseconds: 800),
  curve: Curves.easeInOut,
  times: null, // Infinite loop
  child: Container(
    width: 150,
    height: 40,
    color: Colors.grey.shade300,
  ),
)

About

Flutter package for blinking or fade-like color transitions on any widget. Supports fade effect between two colors or cycling through multiple colors. All platforms support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages