Skip to content

A package provides an easy way to add shimmer effect in Flutter project

License

Notifications You must be signed in to change notification settings

serk87/flutter_shimmer

 
 

Repository files navigation

Shimmer

pub package

A package provides an easy way to add shimmer effect in Flutter project

New Feature

Add support shader

How to use shader

import 'package:shimmer/shimmer.dart';
ShimmerFromShader.fromShader(
    shader: snapshot.data!,
    child: const SingleChildScrollView(
      physics: NeverScrollableScrollPhysics(),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.max,
        children: [
          BannerPlaceholder(),
          TitlePlaceholder(width: double.infinity),
          SizedBox(height: 16.0),
          ContentPlaceholder(
            lineType: ContentLineType.threeLines,
          ),
          SizedBox(height: 16.0),
          TitlePlaceholder(width: 200.0),
          SizedBox(height: 16.0),
          ContentPlaceholder(
            lineType: ContentLineType.twoLines,
          ),
          SizedBox(height: 16.0),
          TitlePlaceholder(width: 200.0),
          SizedBox(height: 16.0),
          ContentPlaceholder(
            lineType: ContentLineType.twoLines,
          ),
        ],
      ),
    ));

Default Shimmer

How to use

import 'package:shimmer/shimmer.dart';
SizedBox(
  width: 200.0,
  height: 100.0,
  child: Shimmer.fromColors(
    baseColor: Colors.red,
    highlightColor: Colors.yellow,
    child: Text(
      'Shimmer',
      textAlign: TextAlign.center,
      style: TextStyle(
        fontSize: 40.0,
        fontWeight:
        FontWeight.bold,
      ),
    ),
  ),
);

About

A package provides an easy way to add shimmer effect in Flutter project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 34.5%
  • C++ 28.7%
  • CMake 23.6%
  • GLSL 6.7%
  • HTML 2.3%
  • Swift 2.2%
  • Other 2.0%