MediaQuery

MediQuery is an InheritedWidget descendant that contains information about the size of the whole screen, and not only the parent widget. As an InheritedWidget widget, this also provides the previously introduced MediaQuery.of method, which looks up the tree for a MediaQuery instance. 

Its use is conditioned by the presence of an instance in the context. This can be easily done by adding a WidgetsApp instance as our root widget. WidgetsApp is not platform-specific, like MaterialApp or CupertinoApp, which use this class in their internal implementation.

Let's see how to use MediaQuery class to make a responsive layout.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.84.32