borderS method

ContainerBuilder borderS({
  1. double width = 1.0,
  2. Color color = const Color(0xFFE5E7EB),
})

border-s -> 设置开始方向的边框(LTR 时为 left,RTL 时为 right)

Implementation

ContainerBuilder borderS({double width = 1.0, Color color = const Color(0xFFE5E7EB)}) {
  if (_borderDirectional == null) {
    _borderDirectional = BorderDirectional(
      start: BorderSide(color: color, width: width),
    );
  } else {
    final existing = _borderDirectional!;
    _borderDirectional = BorderDirectional(
      start: BorderSide(color: color, width: width),
      end: existing.end,
      top: existing.top,
      bottom: existing.bottom,
    );
  }
  return this;
}