@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Title Text'),
),
body: SafeArea(
child: Stack(children: [
Column(
children: const [
Text('short content'),
],
),
const Positioned(
top: 100,
width: 320,
child: SizedBox(
width: 320,
height: 50,
child: ColoredBox(color: Colors.red),
))
])),
);
我需要红色的框几乎整个屏幕与,但它流动的文本宽度.我该怎么做呢?