LoadingSkeleton constructor

LoadingSkeleton({
  1. required double width,
  2. required double height,
  3. EdgeInsetsGeometry? margin,
  4. List<Color> colors = const [Colors.black12, Colors.black26, Colors.black12],
  5. AnimationEnd animationEnd = AnimationEnd.NORMAL,
  6. int animationDuration = 3000,
  7. Widget? child,
})

This method constructs the LoadingSkeleton widget

Params width and height are @required

Params margin and colors are optional

If the user don't pass any colors list in colors, the package will use a default set color list

Param animationEnd is optional and defines the animation ending point on Y axis

Param animationDuration defines the duration of the animation in milliseconds

Param child can be used to get child widgets inside of loading skeleton

Implementation

LoadingSkeleton({
  required this.width,
  required this.height,
  this.margin,
  this.colors = const [Colors.black12, Colors.black26, Colors.black12],
  this.animationEnd = AnimationEnd.NORMAL,
  this.animationDuration = 3000,
  this.child,
}) : assert(colors.length > 1);