Skip to main content

Border Radius

StacBorderRadius allows you to build the Flutter BorderRadius class using JSON. To know more about the BorderRadius class in Flutter, refer to the official documentation.

Properties​

PropertyTypeDescription
radiusdouble?Defines the border Radius for all corners to be painted.
radiusMap<String, double>?Defines the border Radius of each corner to be painted explicitly.
radiusList<double>?Defines the border Radius of each corner to be painted explicitly.
note

Above three properties defined are optional. i.e. StacBorderRadius can be defined using one of the above 3 methods.

Example​

// Generic Declaration

{
"borderRadius": 16.0
}

// Explicit Declaration

{
"borderRadius": {
"topLeft": 16.0,
"topRight": 16.0,
"bottomLeft": 16.0,
"bottomRight": 16.0
}
}

// Explicit Declaration (List)

{
"borderRadius": [
16.0,
16.0,
16.0,
16.0
]
}