getRoundedRectangleBorder static method

RoundedRectangleBorder getRoundedRectangleBorder(
  1. BuildContext context, {
  2. UpStyle? override,
  3. UpStyle? style,
  4. UpColorType? colorType,
})

Implementation

static RoundedRectangleBorder getRoundedRectangleBorder(
  BuildContext context, {
  UpStyle? override,
  UpStyle? style,
  UpColorType? colorType,
}) {
  return RoundedRectangleBorder(
    borderRadius: override?.isRounded ??
            style?.isRounded ??
            getStyleByType(UpConfig.of(context).theme, colorType).isRounded ??
            UpConstants.kDefaultStyleIsRounded
        ? BorderRadius.circular(override?.borderRadius ??
            style?.borderRadius ??
            getStyleByType(UpConfig.of(context).theme, colorType)
                .borderRadius ??
            UpConstants.kDefaultStyleBorderRadius)
        : BorderRadius.zero,
    side: BorderSide(
      color: override?.borderColor ??
          style?.borderColor ??
          getStyleByType(UpConfig.of(context).theme, colorType).borderColor ??
          UpConstants.kDefaultStyleBorderColor,
      width: override?.borderWidth ??
          style?.borderWidth ??
          getStyleByType(UpConfig.of(context).theme, colorType).borderWidth ??
          UpConstants.kDefaultStyleBorderWidth,
    ),
  );
}