borderTop method

Widget borderTop({
  1. Color color = const Color(0xFF000000),
  2. double width = 1,
})

Adds a border on the top side only.

Wraps this widget in a DecoratedBox with a Border containing only a top BorderSide.

widget.borderTop(color: TwColors.slate.shade200)

Implementation

Widget borderTop({Color color = const Color(0xFF000000), double width = 1}) =>
    DecoratedBox(
      decoration: BoxDecoration(
        border: Border(top: BorderSide(color: color, width: width)),
      ),
      child: this,
    );