FFSnackBarAction constructor

FFSnackBarAction({
  1. FFValue? textMessage,
  2. FFText? textStyle,
  3. @Deprecated('This field is deprecated.') FFColor? legacyBackgroundColor,
  4. double? durationMillis,
  5. FFSnackBarAction_FFSnackBarSubAction? subAction,
  6. bool? shouldHidePreviousSnackbar,
  7. FFValue? backgroundColor,
})

Implementation

factory FFSnackBarAction({
  FFValue? textMessage,
  FFText? textStyle,
  @$core.Deprecated('This field is deprecated.')
  FFColor? legacyBackgroundColor,
  $core.double? durationMillis,
  FFSnackBarAction_FFSnackBarSubAction? subAction,
  $core.bool? shouldHidePreviousSnackbar,
  FFValue? backgroundColor,
}) {
  final result = create();
  if (textMessage != null) result.textMessage = textMessage;
  if (textStyle != null) result.textStyle = textStyle;
  if (legacyBackgroundColor != null)
    result.legacyBackgroundColor = legacyBackgroundColor;
  if (durationMillis != null) result.durationMillis = durationMillis;
  if (subAction != null) result.subAction = subAction;
  if (shouldHidePreviousSnackbar != null)
    result.shouldHidePreviousSnackbar = shouldHidePreviousSnackbar;
  if (backgroundColor != null) result.backgroundColor = backgroundColor;
  return result;
}