border method
Widget
border({
- required BorderRadius borderRadius,
- Color color = Colors.black,
- double width = 1.0,
Add a rounded border around the widget.
Implementation
Widget border({
required BorderRadius borderRadius,
Color color = Colors.black,
double width = 1.0,
}) {
return DecoratedBox(
decoration: BoxDecoration(
borderRadius: borderRadius,
border: Border.all(color: color, width: width),
),
child: this,
);
}