I've got a problem with Stack and Positioned widget.
I'm trying to do something like this (picture below).
But instead I have something like this.
How can I move this mid rectangle up, to have divide screen in half like on first picture.
My code below:
return Scaffold(
backgroundColor: Colors.cyan,
body: SingleChildScrollView(
child: Column(
children: [
Stack(
children: [
Container(
decoration: const BoxDecoration(
color: Colors.amber,
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(20),
),
),
height: MediaQuery.of(context).size.height * 0.55,
),
],
),
Positioned(
bottom: 100,
child: Card(
child: Container(
height: 100,
width: MediaQuery.of(context).size.width - 80,
color: Colors.red,
),
),
),
],
),
),
);
Thanks for help