ProgressDialog constructor

ProgressDialog({
  1. required BuildContext context,
  2. String loadingText = 'Loading...',
  3. Color? backgroundColor,
  4. Color? backgroundOverlay = Colors.white,
  5. required Color textColor,
  6. LinearGradient? linearGradient,
  7. String? assetImageName,
  8. String? networkImageUrl,
  9. Color? progressIndicatorColor = Colors.white,
})

Implementation

ProgressDialog(
    {required this.context,
    this.loadingText = 'Loading...',
    this.backgroundColor,
    this.backgroundOverlay = Colors.white,
    required Color this.textColor,
    this.linearGradient,
    this.assetImageName,
    this.networkImageUrl,
    this.progressIndicatorColor = Colors.white})
    : assert(backgroundColor != null || linearGradient != null,
          'This widget either needs a background color or background linear gradient\n'),
      assert(backgroundColor == null || linearGradient == null,
          'Cannot provide both a backgroundColor and a linearGradient\n'),
      assert(assetImageName == null || networkImageUrl == null,
          'Cannot provide both a assetImageName and a networkImageUrl\n'),
      assert(loadingText.length <= 55,
          'Loading text should not be more than 50 characters\n'),
      assert(loadingText != null, 'Loading text should no be null\n'),
      assert(textColor != null, 'textColor is required\n');