A lightweight responsive utility for scaling widgets, text, and layout based on screen size and device type (mobile, tablet, desktop).
- 📱 Responsive width, height, and text scaling
- 🧠 Automatic device type classification (mobile, tablet, desktop)
- 🔄 Orientation-aware layout support
- 💡 Easy-to-use extensions:
.w,.h,.sp - ⚡️ Minimal setup – no need to wrap
MaterialApp
return AdaptSize(
designSize: const Size(360, 690),
builder: (context) => MyApp(),
);Container(
width: 100.w,
height: 50.h,
child: Text('Hello', style: TextStyle(fontSize: 14.sp)),
)if (AdaptDeviceType.isTablet) {
// tablet specific UI
}Run tests:
flutter testMIT