Here is an extended answer. DecoratedBox- this is what you need to add a border, but I use Containerfor the convenience of adding margins and indents.
Here is a general setup.

Widget myWidget() {
return Container(
margin: const EdgeInsets.all(30.0),
padding: const EdgeInsets.all(10.0),
decoration: myBoxDecoration(), // <--- BoxDecoration here
child: Text(
"text",
style: TextStyle(fontSize: 30.0),
),
);
}
Where BoxDecoration
BoxDecoration myBoxDecoration() {
return BoxDecoration(
border: Border.all(),
);
}
Frame width

They have a border width 1, 3and 10accordingly.
BoxDecoration myBoxDecoration() {
return BoxDecoration(
border: Border.all(
width: 1, // <--- border width here
),
);
}
Border color

They have a border color.
Colors.redColors.blueColors.green
The code
BoxDecoration myBoxDecoration() {
return BoxDecoration(
border: Border.all(
color: Colors.red, // <--- border color
width: 5.0,
),
);
}

- (3,0), (3,0)
- (13,0)
- ( [100], 15,0), ( [300], 10,0), ( [500], 5,0), ( [800], 3,0)
BoxDecoration myBoxDecoration() {
return BoxDecoration(
border: Border(
left: BorderSide( // <--- left side
color: Colors.black,
width: 3.0,
),
top: BorderSide( // <--- top side
color: Colors.black,
width: 3.0,
),
),
);
}

5, 10 30 .
BoxDecoration myBoxDecoration() {
return BoxDecoration(
border: Border.all(
width: 3.0
),
borderRadius: BorderRadius.all(
Radius.circular(5.0) // <--- border radius here
),
);
}
DecoratedBox/ BoxDecoration . Flatter - BoxDecoration .