resolve static method
Resolves rounded values from FlyStyle and FlyThemeData into BorderRadius
Implementation
static BorderRadius resolve(BuildContext context, FlyStyle style) {
try {
final radius = FlyTheme.of(context).radius;
return BorderRadius.only(
topLeft: Radius.circular(
_resolveValue(
style.roundedTl ??
style.roundedT ??
style.roundedL ??
style.rounded,
context,
radius,
),
),
topRight: Radius.circular(
_resolveValue(
style.roundedTr ??
style.roundedT ??
style.roundedR ??
style.rounded,
context,
radius,
),
),
bottomLeft: Radius.circular(
_resolveValue(
style.roundedBl ??
style.roundedB ??
style.roundedL ??
style.rounded,
context,
radius,
),
),
bottomRight: Radius.circular(
_resolveValue(
style.roundedBr ??
style.roundedB ??
style.roundedR ??
style.rounded,
context,
radius,
),
),
);
} catch (e) {
throw ArgumentError('Failed to resolve border radius: $e');
}
}