getBorderRadius static method
- BuildContext context
Static method to get the border radius for a button based on the border parameter. Returns a BorderRadius object with the appropriate radius value.
Implementation
static BorderRadius getBorderRadius(BuildContext context) {
final button = OudsTheme.of(context).componentsTokens(context).button;
final buttonRounded = OudsThemeConfigModel.of(context)?.button?.rounded ?? false;
switch (buttonRounded) {
case true:
return BorderRadius.circular(button.borderRadiusRounded);
case false:
return BorderRadius.circular(button.borderRadiusDefault);
}
}