@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Container"),
),
body: Container(
width: 200,
height: 200,
color: Colors.red,
child: Container(
width: 100,
height: 100,
color: Colors.blue,
),
),
);
}
解决办法:设置第一个Container的alignment即可