adapt_size 0.0.1 copy "adapt_size: ^0.0.1" to clipboard
adapt_size: ^0.0.1 copied to clipboard

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

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
  • Device type classification
  • Orientation-aware layout
  • Easy to use extensions: .w, .h, .sp
  • Minimal setup, no builder wrapping MaterialApp required

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

1
likes
150
points
38
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on adapt_size