Below code will help you to get the width of the screen in flutter.
double width = MediaQuery.of(context).size.width
Here is an example of how we can get width in widgets,
new Container(
constraints: new BoxConstraints.expand(
width: MediaQuery.of(context).size.width - 20,
),
padding: const EdgeInsets.all(8.0),
color: Colors.teal.shade700,
alignment: Alignment.center,
child: new Text('Hello World',
style: Theme.of(context).textTheme.display1.copyWith(color: Colors.white)),
)
Hope this is useful.
Thanks,
Srikanth