-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestnew featureCompletly new featureCompletly new feature
Description
🎯 Goal
DeviceTypeGuard shows/hides UI elements based on the device type the app is running on.
- Show a simplified layout on phones, and an advanced one on tablets or desktops.
- Hide certain features on web (e.g., camera, hardware-specific tools).
- Customize banners, navigation, or settings based on device size/platform.
✅ Benefits
- Helps deliver platform-optimized UI for mobile, tablet, desktop, or web.
- Improves user experience by showing device-appropriate layouts or components.
- Enables conditional rendering of widgets based on screen size or device type.
- Supports responsive design logic directly in your widget tree.
- Useful for hiding or adapting features that don't work on certain devices.
🔧 Planned API
DeviceTypeGuard(
allowedDevices: ['mobile', 'tablet'],
builder: (_) => MobileView(),
fallbackBuilder: (_) => DesktopView(),
);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestnew featureCompletly new featureCompletly new feature
Projects
Status
No status