Skip to main content

Border

StacBorder allows you to define the Flutter Border class using JSON with support for both uniform borders (all sides) and individual border sides. To know more about the Border class in Flutter, refer to the official documentation.

Features

  • Uniform Border: Apply the same border to all sides (backward compatible)
  • Individual Border Sides: Specify different borders for top, right, bottom, and left sides
  • Automatic Detection: The system automatically detects whether to use uniform or individual borders

Properties

Uniform Border (All Sides)

Individual Border Sides

:::note When any individual border side is specified (top, right, bottom, or left), the system will use individual border mode and ignore the uniform border properties (color, width, borderStyle, strokeAlign). :::

Examples

Uniform Border (All Sides)

Individual Border Sides

Partial Border Sides

You can specify only some sides, and the others will default to BorderSide.none:

Complete Container Example

See Also