FFBadge constructor

FFBadge({
  1. FFText? text,
  2. FFColor? legacyColor,
  3. double? legacyElevation,
  4. bool? legacyAnimation,
  5. FFBorderRadius? borderRadius,
  6. bool? legacyShowBadge,
  7. bool? legacyPositionStart,
  8. FFPadding? innerPadding,
  9. FFColorValue? colorValue,
  10. FFDoubleValue? elevationValue,
  11. FFBooleanValue? animationValue,
  12. FFBooleanValue? showBadgeValue,
  13. FFBooleanValue? positionStartValue,
})

Implementation

factory FFBadge({
  FFText? text,
  FFColor? legacyColor,
  $core.double? legacyElevation,
  $core.bool? legacyAnimation,
  FFBorderRadius? borderRadius,
  $core.bool? legacyShowBadge,
  $core.bool? legacyPositionStart,
  FFPadding? innerPadding,
  FFColorValue? colorValue,
  FFDoubleValue? elevationValue,
  FFBooleanValue? animationValue,
  FFBooleanValue? showBadgeValue,
  FFBooleanValue? positionStartValue,
}) {
  final result = create();
  if (text != null) result.text = text;
  if (legacyColor != null) result.legacyColor = legacyColor;
  if (legacyElevation != null) result.legacyElevation = legacyElevation;
  if (legacyAnimation != null) result.legacyAnimation = legacyAnimation;
  if (borderRadius != null) result.borderRadius = borderRadius;
  if (legacyShowBadge != null) result.legacyShowBadge = legacyShowBadge;
  if (legacyPositionStart != null)
    result.legacyPositionStart = legacyPositionStart;
  if (innerPadding != null) result.innerPadding = innerPadding;
  if (colorValue != null) result.colorValue = colorValue;
  if (elevationValue != null) result.elevationValue = elevationValue;
  if (animationValue != null) result.animationValue = animationValue;
  if (showBadgeValue != null) result.showBadgeValue = showBadgeValue;
  if (positionStartValue != null)
    result.positionStartValue = positionStartValue;
  return result;
}