SnackBarAction constructor

const SnackBarAction({
  1. Key? key,
  2. Color? textColor,
  3. Color? disabledTextColor,
  4. Color? backgroundColor,
  5. Color? disabledBackgroundColor,
  6. required String label,
  7. required VoidCallback onPressed,
})

Creates an action for a SnackBar.

Implementation

const SnackBarAction({
  super.key,
  this.textColor,
  this.disabledTextColor,
  this.backgroundColor,
  this.disabledBackgroundColor,
  required this.label,
  required this.onPressed,
}) : assert(backgroundColor is! MaterialStateColor || disabledBackgroundColor == null,
      'disabledBackgroundColor must not be provided when background color is '
      'a MaterialStateColor');