shimmer_a 1.0.0 shimmer_a: ^1.0.0 copied to clipboard
A package offers a simple method of including shimmer effect in Flutter project.
shimmer_a #
A package offers a simple method of including shimmer effect in Flutter project.
[] https://github.com/uttom41/shimmer_a_example.git
How to use #
import 'package:shimmer_a/shimmer_a.dart';
ShimmerA(
shimmerCount: 10,
shimmerAxis: Axis.horizontal,
shimmerWidget: const [
ShimmerWidget(
height: 50,
width: 50,
radius: 40,
padding: EdgeInsets.all(5.0),
),
],
isShimmer: _isLoading,
child: ListView.builder(
itemCount: 10,
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) {
return Container(
height: 60,
width: 60,
padding: const EdgeInsets.all(5.0),
child: CircleAvatar(
radius: 40,
child: ClipOval(
child: Image.network(
'https://docs.flutter.dev/cookbook'
'/img-files/effects/split-check/Food1.jpg',
),
),
),
);
},
),
),
simple example:
ShimmerA(
shimmerCount: 10,
isShimmer: _isLoading,
ownGradient: const LinearGradient(
colors: [
Color(0xFFD0CECE),
Color(0xFFECEBEB),
Color(0xFFD0CECE),
],
stops: [0.0, 0.5, 1.0],
begin: Alignment.topCenter,
end: Alignment.centerRight,
),
child: Container(), ///Your own widget.
),