how to make a widget fit to its parent widget in flutter code example
Example: flutter set widget width to 50% o parent
build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("MediaQuery"),
),
body: Container(
width: MediaQuery.of(context).size.width * 0.5,
height: MediaQuery.of(context).size.height * 0.5,
),
);
}
Widget