TxLoading.fromColors constructor

TxLoading.fromColors({
  1. required Color baseColor,
  2. required Color highlightColor,
  3. Widget? child,
  4. Key? key,
  5. TextStyle? textStyle,
  6. IconThemeData? iconTheme,
  7. Duration? period,
  8. ShimmerDirection? direction,
})

Implementation

TxLoading.fromColors({
  required Color baseColor,
  required Color highlightColor,
  this.child,
  super.key,
  this.textStyle,
  this.iconTheme,
  this.period,
  this.direction,
}) : gradient = LinearGradient(
          begin: Alignment.topLeft,
          end: Alignment.centerRight,
          colors: <Color>[
            baseColor,
            baseColor,
            highlightColor,
            baseColor,
            baseColor
          ],
          stops: const <double>[
            0.0,
            0.35,
            0.5,
            0.65,
            1.0
          ]);