ApiSnackBarConfig constructor
const
ApiSnackBarConfig({
- bool showOnSuccess = false,
- String? successTitle = 'Success',
- String? successMessageOverride,
- String? successMessageKey = 'message',
- bool showOnError = false,
- String? errorTitle = 'Error',
- String? errorMessageOverride,
- String? errorMessageKey = 'message',
- Color? backgroundColor,
- Color? successBackgroundColor,
- Color? errorBackgroundColor,
- Color? textColor,
- SnackPosition? position,
- Duration duration = const Duration(seconds: 3),
- double borderRadius = 12,
- 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,
});