smart_shimmer_ui โšกโœจ

pub package License: MIT Flutter Platform PRs Welcome

A modern, high-performance shimmer skeleton loading UI library for Flutter. Includes ready-to-use skeleton components, realistic multi-line text, auto-adaptive dark mode, and full-screen templates.


๐ŸŒŸ Why smart_shimmer_ui?

Most shimmer packages require you to build complex skeleton layouts manually using raw containers and math. smart_shimmer_ui provides ready-made, pixel-perfect skeleton widgets for lists, cards, feeds, chats, and profiles in a single line of code!

  • ๐Ÿš€ Zero External Runtime Dependencies - Built natively with Flutter's ShaderMask and hardware-accelerated animations for buttery smooth 60/120 FPS.
  • ๐ŸŒ“ Auto Dark & Light Mode - Automatically detects Theme.of(context).brightness and adjusts shimmer contrast so your users never get blinded in dark mode.
  • ๐Ÿงฉ Drop-in Compatible - Easily replace old Shimmer.fromColors(...) code with zero refactoring.
  • ๐Ÿ“ฆ 10+ Pre-built UI Presets - SmartShimmerListTile, SmartShimmerCard, SmartShimmerListView, SmartShimmerGrid, SmartShimmerProfile, SmartShimmerChat, SmartShimmerFeed.
  • ๐Ÿ”„ Animated State Switcher - Crossfade effortlessly from skeleton loading to real content using SmartShimmerBuilder.
  • ๐Ÿ’Ž Pro UI Kit & Commercial Templates - Upgrade path for developers needing 50+ full-screen templates (Fintech, E-Commerce, Food Delivery, Social Media).

๐Ÿ“ฑ Screenshots & Pre-built Widgets

Classic Shimmer List Cards & Product Grid Social Media Feed
Classic Shimmer List Cards and Grid Social Feed
Profile Screen (Light) Profile Screen (Dark) Cards & Grid (Dark)
Profile Light Profile Dark Cards and Grid Dark

๐Ÿ“ฆ Installation

Add smart_shimmer_ui to your pubspec.yaml:

dependencies:
  smart_shimmer_ui: ^1.0.5

Then run:

flutter pub get

Import it in your Dart file:

import 'package:smart_shimmer_ui/smart_shimmer_ui.dart';

๐Ÿš€ Quick Start Examples

1. Classic Shimmer List (Drop-in Replacement)

Match your classic skeleton loading list with just a single widget:

SmartShimmerListView(
  itemCount: 8,
)

Or customize individual tiles:

SmartShimmerListTile(
  showAvatar: true,
  avatarSize: 48,
  lines: 2,
  lastLineWidthFactor: 0.6, // Realistic shorter subtitle line
  showTrailing: false,
)

2. Drop-in Replacement for Legacy Shimmer

If you already have existing shimmer code, use SmartShimmer.fromColors:

SmartShimmer.fromColors(
  baseColor: Colors.grey.shade300,
  highlightColor: Colors.white,
  period: const Duration(milliseconds: 1000),
  child: myCustomWidget(),
)

3. Smooth State Transition (Loading โ†’ Loaded)

Switch between skeleton and real data with smooth crossfade:

SmartShimmerBuilder(
  isLoading: userState.isLoading,
  skeleton: const SmartShimmerListTile(),
  child: UserListTile(user: userState.user),
)

4. Realistic Text Skeleton

Create realistic multi-line paragraph skeletons where the last line is naturally shorter:

SmartShimmerText(
  lines: 3,
  lineHeight: 14,
  spacing: 8,
  lastLineWidthFactor: 0.5, // 50% width on last line
)

5. Card & Grid Skeletons

E-Commerce Product Grid:

SmartShimmerGrid(
  crossAxisCount: 2,
  itemCount: 6,
  childAspectRatio: 0.75,
)

Social Post Feed:

SmartShimmerFeed(
  mediaHeight: 250,
)

User Profile Screen:

SmartShimmerProfile(
  coverHeight: 140,
  avatarSize: 80,
)

Chat Conversation Bubbles:

SmartShimmerChat(
  bubbleCount: 6,
)

๐ŸŒ“ Dark Mode & Global Theming

smart_shimmer_ui automatically detects Light and Dark mode. To customize global shimmer colors throughout your whole app, wrap your MaterialApp with SmartShimmerTheme:

SmartShimmerTheme(
  data: SmartShimmerThemeData(
    baseColor: Color(0xFFE5E7EB),
    highlightColor: Color(0xFFF9FAFB),
    duration: Duration(milliseconds: 1500),
    direction: ShimmerDirection.leftToRight,
  ),
  child: MaterialApp(
    home: HomeScreen(),
  ),
)

๐Ÿ’Ž Free vs PRO UI Kit

smart_shimmer_ui is completely free and open-source under the MIT license. For teams and developers building production applications, an extended Pro UI Kit is available with 50+ pre-built, full-screen templates.

Feature Free (Open Source) PRO UI Kit ๐Ÿ’Ž
High-performance Shimmer Engine โœ… โœ…
Primitives (Box, Circle, Text, Image) โœ… โœ…
Standard List, Card, Feed, Profile โœ… โœ…
Auto Light & Dark Mode โœ… โœ…
50+ Complete Full-App Screen Templates โŒ โœ…
Fintech & Banking Skeleton Suite โŒ โœ…
E-Commerce & Checkout Suite โŒ โœ…
Food Delivery & Live Tracking Suite โŒ โœ…
Figma UI Kit & Design Tokens โŒ โœ…
Priority Source-Code Access & Updates โŒ โœ…

๐Ÿ‘‰ Explore Smart Shimmer PRO Templates & Source Code ($19)

(See PRO_MONETIZATION_GUIDE.md for creator revenue instructions)


๐Ÿ› ๏ธ API Reference

Primitives

Widget Description Key Properties
SmartShimmer Core shimmer sweep wrapper baseColor, highlightColor, duration, direction, gradient
SmartShimmerBox Rounded rectangle skeleton width, height, borderRadius, shape
SmartShimmerCircle Circular avatar skeleton size, margin
SmartShimmerText Multi-line text skeleton lines, lineHeight, spacing, lastLineWidthFactor
SmartShimmerImage Media banner skeleton width, height, aspectRatio, borderRadius

Presets

Preset Widget Description
SmartShimmerListTile Avatar + title + subtitle list tile
SmartShimmerListView Synchronized scrollable or fixed list skeleton
SmartShimmerCard Vertical, horizontal, or compact card skeletons
SmartShimmerGrid Multi-column grid skeleton
SmartShimmerProfile Cover banner + avatar + bio + stats profile skeleton
SmartShimmerFeed Author header + media + actions + caption social feed
SmartShimmerChat Alternating incoming/outgoing chat bubbles
SmartShimmerBuilder Animated crossfade between skeleton and loaded data

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.


๐Ÿ“„ License

This package is licensed under the MIT License.

Libraries

smart_shimmer_ui