search logic added to desktop tenders
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tm_app/core/utils/breakpoints.dart';
|
||||
|
||||
/// Utility class for device and platform detection
|
||||
class DeviceUtils {
|
||||
/// Check if the current context represents a desktop screen
|
||||
static bool isDesktop(BuildContext context) {
|
||||
final size = MediaQuery.sizeOf(context);
|
||||
return size.displaySize == DisplaySize.medium ||
|
||||
size.displaySize == DisplaySize.large;
|
||||
}
|
||||
|
||||
/// Check if the current context represents a mobile screen
|
||||
static bool isMobile(BuildContext context) {
|
||||
final size = MediaQuery.sizeOf(context);
|
||||
return size.displaySize == DisplaySize.extraSmall;
|
||||
}
|
||||
|
||||
/// Check if the current context represents a tablet screen
|
||||
static bool isTablet(BuildContext context) {
|
||||
final size = MediaQuery.sizeOf(context);
|
||||
return size.displaySize == DisplaySize.small;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user