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.
  • ๐Ÿ’Ž 50+ Free Full-Screen Templates - Ready-to-use full app skeletons for Fintech, E-Commerce, Food Delivery, Social Media, Health, and Mobility included 100% free.

๐Ÿ“ฑ 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.6

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(),
  ),
)

๐Ÿ“ฑ 50+ Full-Screen Skeleton Templates (100% Free)

smart_shimmer_ui includes 50+ complete, production-grade full-screen skeleton layouts across all major app categories, completely free:

๐Ÿฆ 1. Fintech & Banking (10 Screens)

  • ProFintechWalletScreen - Wallet balance, cards carousel & quick actions
  • ProFintechReceiptScreen - Transaction details, status breakdown & receipt
  • ProFintechTransferScreen - Send money, recent payees & numpad
  • ProFintechAnalyticsScreen - Weekly spending bar charts & insights
  • ProFintechCryptoScreen - Token holdings, live price ticker & watchlist
  • ProFintechLoanScreen - EMI calculator & interest breakdown
  • ProFintechBillPayScreen - Utility bill categories & pending bills
  • ProFintechSavingsScreen - Piggy bank goals & progress bars
  • ProFintechStatementScreen - Monthly statement with date filters
  • ProFintechCardSettingsScreen - Virtual card toggle & security controls

๐Ÿ›๏ธ 2. E-Commerce & Retail (10 Screens)

  • ProEcommerceMarketplaceScreen - Flash sale banner, categories & product feed
  • ProEcommerceDetailScreen - Image gallery, color/size swatches & sticky buy bar
  • ProEcommerceCartScreen - Cart item list, promo code & price summary
  • ProEcommerceCheckoutScreen - Shipping address & payment selection
  • ProEcommerceOrderTrackingScreen - Step-by-step parcel tracking timeline
  • ProEcommerceWishlistScreen - 2-column wishlist grid & move to cart
  • ProEcommerceSearchResultsScreen - Filter chips & search results
  • ProEcommerceCustomerReviewsScreen - Review breakdown & rating bars
  • ProEcommerceCategoriesGridScreen - Visual taxonomy category tiles
  • ProEcommerceReturnsScreen - Return request & refund status

๐Ÿ” 3. Food Delivery (10 Screens)

  • ProFoodRestaurantDiscoveryScreen - Top banners, cuisines carousel & nearby
  • ProFoodRestaurantMenuScreen - Sticky category tabs & food dish items
  • ProFoodDishDetailBottomSheetScreen - Add-on customization sheet
  • ProFoodCartSummaryScreen - Restaurant bill breakdown & delivery fee
  • ProFoodLiveTrackingMapScreen - Driver map route & ETA countdown
  • ProFoodOrderHistoryScreen - Past orders & 1-tap reorder
  • ProFoodAddressManagementScreen - Saved home/work address list
  • ProFoodDriverTipScreen - Driver rating & tip percentage selector
  • ProFoodCuisineFilterScreen - Cuisine mood pills & search
  • ProFoodReviewFeedbackScreen - Star rating & compliments tags

๐ŸŽฌ 4. Social Media & Video (10 Screens)

  • ProSocialFeedScreen - Stories tray, photo/video card & comments
  • ProSocialStoryViewerScreen - Full-screen story with progress bars
  • ProSocialReelsPlayerScreen - 9:16 vertical short video player & floating actions
  • ProSocialUserProfileScreen - Avatar header, bio & 3-column media grid
  • ProSocialDirectMessagesScreen - Active chats & unread badges
  • ProSocialChatConversationScreen - Chat bubbles & voice message pill
  • ProSocialExploreGridScreen - Staggered trending media explore grid
  • ProSocialNotificationsScreen - Likes, follows, and mentions activity feed
  • ProSocialCommentsDrawerScreen - Bottom sheet comments with nested replies
  • ProSocialLiveStreamScreen - Floating live reaction hearts & live chat

๐Ÿš— 5. Mobility, Health & Productivity (10 Screens)

  • ProHealthDoctorSearchScreen - Doctor specialty cards & rating
  • ProHealthAppointmentSlotPickerScreen - Time slot picker & date calendar
  • ProHealthMedicalRecordsScreen - Lab reports & prescription history
  • ProTravelHotelSearchScreen - Hotel photo cards, price & amenities
  • ProTravelRoomDetailScreen - Room gallery & instant booking
  • ProMobilityCabSelectScreen - Ride options (Standard, Premium, XL) & fares
  • ProMobilityRideTrackingScreen - Live cab tracking route & driver details
  • ProDashboardKpiStatsScreen - Analytics KPI cards & chart placeholders
  • ProKanbanTaskBoardScreen - Drag-and-drop task column placeholders
  • ProAccountSettingsScreen - Profile overview, preferences & toggle items

๐Ÿ’ก Usage Example:

import 'package:smart_shimmer_ui/smart_shimmer_ui.dart';

// Render any of the 50 screen skeletons directly in your app:
const ProFintechWalletScreen()

// Or access all screens programmatically via the registry:
final screens = SmartShimmer50ScreensRegistry.allScreens;

๐Ÿ› ๏ธ 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