Skip to content

hendriari/adapt_size

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pub version

Adapt Size

A lightweight responsive utility for scaling widgets, text, and layout based on screen size and device type (mobile, tablet, desktop).

✨ Features

  • 📱 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

🚀 Getting Started

Getting Started

Initialize:

return AdaptSize(
  designSize: const Size(360, 690),
  builder: (context) => MyApp(),
);

Use it:

Container(
  width: 100.w,
  height: 50.h,
  child: Text('Hello', style: TextStyle(fontSize: 14.sp)),
)

Device Type:

if (AdaptDeviceType.isTablet) {
  // tablet specific UI
}

Test

Run tests:

flutter test

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors