ApiSnackBarConfig constructor

const ApiSnackBarConfig({
  1. bool showOnSuccess = false,
  2. String? successTitle = 'Success',
  3. String? successMessageOverride,
  4. String? successMessageKey = 'message',
  5. bool showOnError = false,
  6. String? errorTitle = 'Error',
  7. String? errorMessageOverride,
  8. String? errorMessageKey = 'message',
  9. Color? backgroundColor,
  10. Color? successBackgroundColor,
  11. Color? errorBackgroundColor,
  12. Color? textColor,
  13. SnackPosition? position,
  14. Duration duration = const Duration(seconds: 3),
  15. double borderRadius = 12,
  16. EdgeInsets? margin,
})

Creates an ApiSnackBarConfig with the provided customizations.

Implementation

const ApiSnackBarConfig({
  this.showOnSuccess = false,
  this.successTitle = 'Success',
  this.successMessageOverride,
  this.successMessageKey = 'message',
  this.showOnError = false,
  this.errorTitle = 'Error',
  this.errorMessageOverride,
  this.errorMessageKey = 'message',
  this.backgroundColor,
  this.successBackgroundColor,
  this.errorBackgroundColor,
  this.textColor,
  this.position,
  this.duration = const Duration(seconds: 3),
  this.borderRadius = 12,
  this.margin,
});