Shimmer.title constructor

Shimmer.title({
  1. Key? key,
  2. Color backgroundColor = _defaultBackgroundColor,
  3. double borderRadius = _defaultBorderRadius,
  4. Gradient? gradient,
  5. Duration period = _defaultPeriod,
})

A shimmer effect widget.

Inspired by: https://github.com/hnvn/flutter_shimmer/blob/master/lib/shimmer.dart

Title uses a Column as a child.

Implementation

Shimmer.title({
  super.key,
  Color backgroundColor = _defaultBackgroundColor,
  double borderRadius = _defaultBorderRadius,
  Gradient? gradient,
  this.period = _defaultPeriod,
})  : gradient = gradient ?? _getDefaultGradient(backgroundColor),
      child = Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          _Container(
            borderRadius: borderRadius,
            color: backgroundColor,
          ),
          const SizedBox(height: 8.0),
          _Container(
            borderRadius: borderRadius,
            color: backgroundColor,
          ),
        ],
      );