SmartStateOverlayConfig constructor

const SmartStateOverlayConfig({
  1. List<SmartState> enabledStates = const [SmartState.loading, SmartState.error, SmartState.success],
  2. bool isDismissible = false,
  3. bool barrierDismissible = false,
  4. Color? barrierColor,
  5. Alignment alignment = Alignment.center,
  6. OverlayStateConfig loadingConfig = const OverlayStateConfig(),
  7. OverlayStateConfig errorConfig = const OverlayStateConfig(backgroundColor: Colors.white, iconColor: Colors.red, textColor: Colors.black87),
  8. OverlayStateConfig successConfig = const OverlayStateConfig(backgroundColor: Colors.white, iconColor: Colors.green, textColor: Colors.black87),
  9. OverlayStateConfig emptyConfig = const OverlayStateConfig(),
  10. OverlayStateConfig offlineConfig = const OverlayStateConfig(backgroundColor: Colors.white, iconColor: Colors.orange, textColor: Colors.black87),
})

Implementation

const SmartStateOverlayConfig({
  this.enabledStates = const [
    SmartState.loading,
    SmartState.error,
    SmartState.success
  ],
  this.isDismissible = false,
  this.barrierDismissible = false,
  this.barrierColor,
  this.alignment = Alignment.center,
  this.loadingConfig = const OverlayStateConfig(),
  this.errorConfig = const OverlayStateConfig(
    backgroundColor: Colors.white,
    iconColor: Colors.red,
    textColor: Colors.black87,
  ),
  this.successConfig = const OverlayStateConfig(
    backgroundColor: Colors.white,
    iconColor: Colors.green,
    textColor: Colors.black87,
  ),
  this.emptyConfig = const OverlayStateConfig(),
  this.offlineConfig = const OverlayStateConfig(
    backgroundColor: Colors.white,
    iconColor: Colors.orange,
    textColor: Colors.black87,
  ),
});