optionallyResolveBorderRadius function

BorderRadius? optionallyResolveBorderRadius(
  1. BuildContext context,
  2. BorderRadiusGeometry? radius
)

Implementation

BorderRadius? optionallyResolveBorderRadius(
    BuildContext context, BorderRadiusGeometry? radius) {
  if (radius == null) {
    return null;
  }
  if (radius is BorderRadius) {
    return radius;
  }
  return radius.resolve(Directionality.of(context));
}