simple_shimmer 0.1.0+1 copy "simple_shimmer: ^0.1.0+1" to clipboard
simple_shimmer: ^0.1.0+1 copied to clipboard

A simple widget with customizable shimmer-like fade animation between colors for skeleton screens

example/lib/main.dart

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

void main() {
  runApp(
    const MaterialApp(
      home: Example(),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Shimmer Example'),
      ),
      body: Column(
        children: [
          const Row(
            children: [
              Expanded(
                child: SimpleShimmer(
                  height: 100,
                ),
              ),
              SizedBox(
                width: 10,
              ),
              Expanded(
                child: SimpleShimmer(
                  height: 100,
                ),
              ),
            ],
          ),
          const SizedBox(
            height: 10,
          ),
          const SimpleShimmer(
            height: 100,
          ),
          const SizedBox(
            height: 10,
          ),
          const SimpleShimmer(
            height: 100,
            theme: ShimmerThemeData(
              decoration: ShimmerDecoration(
                shape: BoxShape.circle,
              ),
            ),
          ),
          const SizedBox(
            height: 10,
          ),
          SimpleShimmerTheme.merge(
            data: ShimmerThemeData(
                baseColor: Colors.red,
                highlightColor: Colors.red.shade200,
                decoration: ShimmerDecoration(
                  borderRadius: BorderRadius.circular(20),
                )),
            child: const Row(
              children: [
                Expanded(
                  child: SimpleShimmer(
                    height: 100,
                  ),
                ),
                SizedBox(
                  width: 10,
                ),
                Expanded(
                  child: SimpleShimmer(
                    height: 100,
                  ),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
2
likes
160
points
6
downloads

Publisher

verified publishermagnificsoftware.com

Weekly Downloads

A simple widget with customizable shimmer-like fade animation between colors for skeleton screens

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, meta

More

Packages that depend on simple_shimmer