SnackBarAction constructor Null safety

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

Creates an action for a SnackBar.

The label and onPressed arguments must be non-null.

Implementation

const SnackBarAction({
  Key? key,
  this.textColor,
  this.disabledTextColor,
  required this.label,
  required this.onPressed,
}) : assert(label != null),
     assert(onPressed != null),
     super(key: key);