supportsHover function
Provides information of current browser features. Detects if the current device and platform supports hovering.
Nexus 9 is a special case here because it does not match the "(hover: none)" media query.
Implementation
/// Detects if the current device and platform supports hovering.
///
/// Nexus 9 is a special case here because it does not match the
/// "(hover: none)" media query.
bool supportsHover(Window window) =>
!((window.matchMedia("(hover: none)").matches) ||
window.navigator.userAgent.contains("Nexus 9"));