isTablet property
bool
get
isTablet
Implementation
bool get isTablet {
var queryData = MediaQuery.of(this);
var screenSize = queryData.size;
var diagonal = sqrt((screenSize.width * screenSize.width) + (screenSize.height * screenSize.height));
// Assuming 600 dpi (dots per inch) is the threshold for a tablet
var diagonalInches = diagonal / queryData.devicePixelRatio;
return diagonalInches >= 7;
}