isMobileDevice method

bool isMobileDevice()

Checks if the viewport is less than 768 pixels wide indicating a mobile device.

Implementation

bool isMobileDevice() => html.window.matchMedia("(max-width: 767px)").matches;