--

Using MediaQuery.sizeOf(context).width is cleaner but doesn't impact performance much compared to MediaQuery.of(context).size.width. The key is to avoid repeated calls and pass the size value where needed.

--

--

Hassan Al Najjar
Hassan Al Najjar

Written by Hassan Al Najjar

Senior Mobile Application Developer.

Responses (1)