<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kartik Hadiya</title>
    <description>The latest articles on DEV Community by Kartik Hadiya (@kartik_hadiya_0292).</description>
    <link>https://dev.to/kartik_hadiya_0292</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3974742%2Fd9e2bc04-124d-48ba-ab13-96d4820e07b5.png</url>
      <title>DEV Community: Kartik Hadiya</title>
      <link>https://dev.to/kartik_hadiya_0292</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kartik_hadiya_0292"/>
    <language>en</language>
    <item>
      <title>Flutter Shimmer Skeleton Loaders: Without Duplicate Code</title>
      <dc:creator>Kartik Hadiya</dc:creator>
      <pubDate>Mon, 08 Jun 2026 19:35:52 +0000</pubDate>
      <link>https://dev.to/kartik_hadiya_0292/flutter-shimmer-skeleton-loaders-without-duplicate-code-527d</link>
      <guid>https://dev.to/kartik_hadiya_0292/flutter-shimmer-skeleton-loaders-without-duplicate-code-527d</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feri01qkj0869vqevibpe.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feri01qkj0869vqevibpe.gif" alt=" " width="490" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Loading states are one of those things that every Flutter app needs but nobody enjoys building.&lt;/p&gt;

&lt;p&gt;You either skip them entirely and show a blank screen while data loads, or you spend time building a shimmer layout that mirrors your real UI — and then maintain both forever.&lt;/p&gt;

&lt;p&gt;There's a third option that most developers don't know about yet.&lt;/p&gt;




&lt;h2&gt;
  
  
  The standard approach and why it breaks down
&lt;/h2&gt;

&lt;p&gt;The typical Flutter shimmer setup looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build your real screen&lt;/li&gt;
&lt;li&gt;Build a separate shimmer screen that matches the layout&lt;/li&gt;
&lt;li&gt;Toggle between them with a boolean&lt;/li&gt;
&lt;li&gt;Repeat for every screen in the app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This works fine for one screen. For ten screens it becomes a maintenance problem. Every time a designer changes a card layout, you update two files. Miss one, and you ship a shimmer that no longer matches the real content.&lt;/p&gt;




&lt;h2&gt;
  
  
  A better way: auto_shimmer_animate
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;auto_shimmer_animate&lt;/code&gt; takes a different approach. Instead of you building the skeleton, the package generates it from your existing widget tree.&lt;/p&gt;

&lt;p&gt;You wrap your real widget, pass &lt;code&gt;isLoading&lt;/code&gt;, and it handles the rest.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;auto_shimmer_animate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^0.2.1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:auto_shimmer_animate/auto_shimmer_animate.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Basic implementation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When &lt;code&gt;isLoading&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, the skeleton renders. When it's &lt;code&gt;false&lt;/code&gt;, the real &lt;code&gt;ProductCard&lt;/code&gt; shows up. Same widget, zero duplication.&lt;/p&gt;




&lt;h2&gt;
  
  
  Handling lists
&lt;/h2&gt;

&lt;p&gt;Lists need placeholder data while loading so the skeleton has a shape to render:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;visibleItems&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;
    &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;filled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Product&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;ProductList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;products:&lt;/span&gt; &lt;span class="n"&gt;visibleItems&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the placeholder count close to the expected item count so the skeleton looks natural.&lt;/p&gt;




&lt;h2&gt;
  
  
  Choosing a shimmer effect
&lt;/h2&gt;

&lt;p&gt;Four effects ship with the package. Each fits a different context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sweep&lt;/strong&gt; — classic left-to-right shimmer, works everywhere:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;effect:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;AutoShimmerSweepEffect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;highlightOpacity:&lt;/span&gt; &lt;span class="mf"&gt;0.62&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;duration:&lt;/span&gt; &lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;milliseconds:&lt;/span&gt; &lt;span class="mi"&gt;1600&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Aurora&lt;/strong&gt; — soft multi-color shimmer, good for image-heavy screens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;effect:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;AutoShimmerAuroraEffect&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pulse&lt;/strong&gt; — low-motion fade, better for accessibility or minimal UIs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;effect:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;AutoShimmerPulseEffect&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Raw&lt;/strong&gt; — full gradient control for brand-specific loading animations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;effect:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;AutoShimmerRawEffect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;colors:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x26FFFFFF&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="n"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0xCCFFFFFF&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="n"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x26FFFFFF&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="nl"&gt;stops:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.48&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.72&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="nl"&gt;duration:&lt;/span&gt; &lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;milliseconds:&lt;/span&gt; &lt;span class="mi"&gt;1700&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Custom skeleton colors
&lt;/h2&gt;

&lt;p&gt;The package uses adaptive theme colors by default. Override them when your screen has a specific color palette:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;baseColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;indigo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;shade100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;childBaseColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;indigo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;shade200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;highlightColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;baseColor&lt;/code&gt; applies to parent containers. &lt;code&gt;childBaseColor&lt;/code&gt; applies to nested elements like text blocks and image placeholders. The two-layer contrast makes the skeleton look more realistic.&lt;/p&gt;




&lt;h2&gt;
  
  
  Using enums instead of booleans
&lt;/h2&gt;

&lt;p&gt;If your screen state is an enum or object rather than a plain bool, use &lt;code&gt;AutoShimmerStateAnimate&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kt"&gt;enum&lt;/span&gt; &lt;span class="n"&gt;ViewStatus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;initial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;loaded&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;AutoShimmerStateAnimate&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ViewStatus&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;state:&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;loadingStates:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;ViewStatus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;initial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ViewStatus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No extra boolean flag needed. The loading state stays tied directly to your state machine.&lt;/p&gt;




&lt;h2&gt;
  
  
  Controlling what gets skeletonized
&lt;/h2&gt;

&lt;p&gt;Sometimes you want parts of the widget tree to stay visible during loading. Three flags handle this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Keep network images visible instead of replacing them with grey blocks&lt;/span&gt;
&lt;span class="n"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;ignoreImages:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// Keep text and containers visible&lt;/span&gt;
&lt;span class="n"&gt;AutoShimmerAnimate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;isLoading:&lt;/span&gt; &lt;span class="n"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;ignoreTexts:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;ignoreContainers:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ProductCard&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  App-wide defaults with AutoShimmerTheme
&lt;/h2&gt;

&lt;p&gt;If you want consistent shimmer behavior across your entire app, set defaults once with &lt;code&gt;AutoShimmerTheme&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;AutoShimmerTheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;data:&lt;/span&gt; &lt;span class="n"&gt;AutoShimmerConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;baseColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;grey&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;shade200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;childBaseColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;grey&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;shade300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;highlightColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;duration:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;seconds:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;MyApp&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Individual &lt;code&gt;AutoShimmerAnimate&lt;/code&gt; widgets can still override these when needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick parameter reference
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;isLoading&lt;/code&gt; — bool, required. Shows skeleton when true.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;child&lt;/code&gt; — Widget, required. The widget tree to skeletonize.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;baseColor&lt;/code&gt; — Color?. Parent surface skeleton color.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;childBaseColor&lt;/code&gt; — Color?. Content/child skeleton color.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;highlightColor&lt;/code&gt; — Color?. Sweep highlight color (default: white).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;highlightOpacity&lt;/code&gt; — double?. Highlight opacity (default: 0.45).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;highlightWidth&lt;/code&gt; — double?. Highlight band width (default: 0.2).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;effect&lt;/code&gt; — AutoShimmerEffect?. Sweep, Aurora, Pulse, or Raw.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;duration&lt;/code&gt; — Duration?. Sweep cycle duration (default: 3s).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;repeatDelay&lt;/code&gt; — Duration?. Pause between sweeps (default: 0ms).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;direction&lt;/code&gt; — AutoShimmerDirection?. Sweep direction (default: diagonal).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;borderRadius&lt;/code&gt; — BorderRadius?. Corner radius of skeletons (default: 8px).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;enabled&lt;/code&gt; — bool?. Disable animation for a static skeleton.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;layeredSkeleton&lt;/code&gt; — bool?. Separate colors for parent and child layers.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;blockChildShimmer&lt;/code&gt; — bool?. Paint parent blocks behind child skeletons.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onlyChildShimmer&lt;/code&gt; — bool?. Paint only leaf-level skeletons.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ignoreContainers&lt;/code&gt; — bool. Keep containers unchanged.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ignoreImages&lt;/code&gt; — bool. Keep images visible.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ignoreTexts&lt;/code&gt; — bool. Keep text visible.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;loadingBuilder&lt;/code&gt; — builder?. Fully custom loading widget.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;shimmerBuilder&lt;/code&gt; — builder?. Custom shimmer animation wrapper.&lt;/p&gt;




&lt;h2&gt;
  
  
  When does this approach make sense?
&lt;/h2&gt;

&lt;p&gt;If you're building a screen with a single loading state that you'll never touch again, the manual approach is fine. But if you're working on a product that gets updated regularly, screens that get redesigned, or a team where multiple people maintain the UI the auto-generation approach saves real time.&lt;/p&gt;

&lt;p&gt;The shimmer stays in sync because it's derived from the real layout. There's nothing to forget to update.&lt;/p&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;pub.dev: &lt;a href="https://pub.dev/packages/auto_shimmer_animate" rel="noopener noreferrer"&gt;https://pub.dev/packages/auto_shimmer_animate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/kartikhadiya09/auto_shimmer_animate" rel="noopener noreferrer"&gt;https://github.com/kartikhadiya09/auto_shimmer_animate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Website: &lt;a href="https://hadiyakartik.online" rel="noopener noreferrer"&gt;https://hadiyakartik.online&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stars and likes help a lot for a solo maintained package. If you try it out and run into anything, open an issue on GitHub.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>shimmer</category>
      <category>dart</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
