borderRadius static method
Returns a BorderRadiusDirectional from the specified list.
The list is a list of values as interpreted by radius. An empty or missing list results in a null return value. The list should have one through four items. Extra items are ignored.
The values are interpreted as follows:
- topStart: first value.
- topEnd: second value, defaulting to same as topStart.
- bottomStart: third value, defaulting to same as topStart.
- bottomEnd: fourth value, defaulting to same as topEnd.
Implementation
static List<Map<String, dynamic>?>? borderRadius(
BorderRadiusGeometry? borderRadiusGeometry) {
if (borderRadiusGeometry == null) {
return null;
}
final borderRadius = borderRadiusGeometry as BorderRadius;
return [
radius(borderRadius.topLeft),
radius(borderRadius.topRight),
radius(borderRadius.bottomLeft),
radius(borderRadius.bottomRight),
];
}