maybeWhen<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult maybeWhen<TResult extends Object?>(
  1. {TResult border(
    1. BorderSide top,
    2. BorderSide right,
    3. BorderSide bottom,
    4. BorderSide left
    )?,
  2. TResult directional(
    1. BorderSide top,
    2. BorderSide start,
    3. BorderSide end,
    4. BorderSide bottom
    )?,
  3. TResult roundedRectangle(
    1. BorderSide side,
    2. BorderRadius borderRadius
    )?,
  4. TResult stadium(
    1. BorderSide side
    )?,
  5. TResult oval(
    1. BorderSide side,
    2. double eccentricity
    )?,
  6. TResult circle(
    1. BorderSide side,
    2. double eccentricity
    )?,
  7. TResult continuousRectangle(
    1. BorderSide side,
    2. BorderRadius borderRadius
    )?,
  8. TResult beveledRectangle(
    1. BorderSide side,
    2. BorderRadius borderRadius
    )?,
  9. TResult underlineInput(
    1. BorderSide side,
    2. BorderRadius borderRadius
    )?,
  10. TResult outlineInput(
    1. BorderSide side,
    2. BorderRadius borderRadius,
    3. double gapPadding
    )?,
  11. TResult noneInput(
      )?,
    1. TResult star(
      1. BorderSide side,
      2. double points,
      3. double innerRadiusRatio,
      4. double pointRounding,
      5. double valleyRounding,
      6. double rotation,
      7. double squash
      )?,
    2. required TResult orElse(
        )}
      )
      @optionalTypeArgs, inherited

      Implementation

      @optionalTypeArgs
      TResult maybeWhen<TResult extends Object?>({
        TResult Function(BorderSide top, BorderSide right, BorderSide bottom,
                BorderSide left)?
            border,
        TResult Function(BorderSide top, BorderSide start, BorderSide end,
                BorderSide bottom)?
            directional,
        TResult Function(BorderSide side, BorderRadius borderRadius)?
            roundedRectangle,
        TResult Function(BorderSide side)? stadium,
        TResult Function(BorderSide side, double eccentricity)? oval,
        TResult Function(BorderSide side, double eccentricity)? circle,
        TResult Function(BorderSide side, BorderRadius borderRadius)?
            continuousRectangle,
        TResult Function(BorderSide side, BorderRadius borderRadius)?
            beveledRectangle,
        TResult Function(BorderSide side, BorderRadius borderRadius)?
            underlineInput,
        TResult Function(
                BorderSide side, BorderRadius borderRadius, double gapPadding)?
            outlineInput,
        TResult Function()? noneInput,
        TResult Function(
                BorderSide side,
                double points,
                double innerRadiusRatio,
                double pointRounding,
                double valleyRounding,
                double rotation,
                double squash)?
            star,
        required TResult orElse(),
      }) =>
          throw _privateConstructorUsedError;