animated_stat_widgets

animated_stat_widgets is a lightweight Flutter package for animated KPI and dashboard UI.

It is designed for teams that want polished stat visuals without bringing in a full charting framework. The v0.1.0 release intentionally focuses on a small API surface that is easy to adopt, test, and theme.

MVP widgets

  • AnimatedCounter
  • CircularProgressRing
  • AnimatedBarGroup
  • ShimmerSkeleton

Why this package

  • Lightweight: no runtime dependencies beyond Flutter itself
  • Dashboard-friendly: focused on KPIs, progress, loading states, and compact summaries
  • Accessible by default: widgets expose useful semantics labels and values
  • Cross-platform: suitable for Android, iOS, web, macOS, Windows, and Linux

Feature summary

Widget Best for Highlights
AnimatedCounter KPI totals, revenue, users, conversion Tweened number changes, custom formatter, semantics support
CircularProgressRing Goal completion, quotas, score summaries Clamped progress, custom child content, painter-based rendering
AnimatedBarGroup Small leaderboard or monthly comparisons Vertical or horizontal bars, tap callbacks, compact API
ShimmerSkeleton Loading placeholders Simple shimmer mask, preserved child layout, loading toggle

Installation

dependencies:
  animated_stat_widgets: ^0.2.0

Then import the library:

import 'package:animated_stat_widgets/animated_stat_widgets.dart';

Included widgets

  • AnimatedCounter for headline metrics and totals
  • CircularProgressRing for completion, quota, and goal summaries
  • AnimatedBarGroup for small comparisons and leaderboard-style UI
  • ShimmerSkeleton for loading placeholders that preserve layout

Quick start

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

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

  @override
  Widget build(BuildContext context) {
    return const AnimatedCounter(
      value: 12500,
      semanticsLabel: 'Revenue 12500',
    );
  }
}

API snapshot

AnimatedCounter

  • value
  • duration
  • curve
  • formatter
  • style
  • textAlign
  • semanticsLabel

CircularProgressRing

  • progress
  • size
  • strokeWidth
  • color
  • backgroundColor
  • child
  • duration
  • curve
  • semanticsLabel

AnimatedBarGroup

  • bars
  • maxValue
  • direction
  • height
  • barSpacing
  • showValueLabel
  • onBarTap

ShimmerSkeleton

  • isLoading
  • child
  • baseColor
  • highlightColor
  • duration
  • semanticsLabel

Widget examples

AnimatedCounter

AnimatedCounter(
  value: 12500,
  semanticsLabel: 'Revenue 12500',
  formatter: (value) => '\$${value.toStringAsFixed(0)}',
)

CircularProgressRing

CircularProgressRing(
  progress: 0.72,
  child: const Text('72%'),
)

AnimatedBarGroup

AnimatedBarGroup(
  bars: const [
    BarData(label: 'Jan', value: 72, color: Colors.teal),
    BarData(label: 'Feb', value: 54, color: Colors.orange),
    BarData(label: 'Mar', value: 91, color: Colors.blue),
  ],
  maxValue: 100,
)

ShimmerSkeleton

ShimmerSkeleton(
  isLoading: true,
  child: Container(
    height: 96,
    decoration: BoxDecoration(
      color: Colors.white,
      borderRadius: BorderRadius.circular(16),
    ),
  ),
)

Example app

The repository includes a minimal showcase app under example/ with one demo section per MVP widget. This is the fastest way to review the package visually while iterating on the API.

Testing

Current test coverage focuses on the practical release surface:

  • animated counter formatting behavior
  • circular progress clamping and semantics
  • bar labels and tap callbacks
  • shimmer loading and loaded-state transitions

Run the checks locally with:

flutter analyze
flutter test
flutter pub publish --dry-run

Project status

This repository currently contains the v0.1.0 implementation starter, focused on a small, shippable API surface.

Planned post-v0.1.0 work includes richer examples, visual assets for pub.dev, and a second wave of widgets once the initial API stabilizes.

Publishing note

Before publishing to pub.dev, add your real public package URLs to pubspec.yaml:

  • homepage
  • repository
  • issue_tracker

Libraries

animated_stat_widgets
Animated KPI, progress, bar, and skeleton widgets for Flutter dashboards and analytics UIs.