The MediaQuery Widget
Learn about the device running the application using MediaQuery.
We'll cover the following...
If we want to find information about the device our application is running on, we can use MediaQuery
. The MediaQuery
widget provides information to the subtree starting from its child. We need to provide a MediaQuery
widget to the widget tree of our application, but widgets like MaterialApp
, WidgetsApp
, and CupertinoApp
do that for us. Usually, we don’t need to do anything more than ask the MediaQuery
for the information that we need.
Actually, the MediaQuery
widget does not provide the information ...