my_responsive_ui 1.0.1 copy "my_responsive_ui: ^1.0.1" to clipboard
my_responsive_ui: ^1.0.1 copied to clipboard

A Flutter package for creating responsive UIs with easy to use extensions and utilities.

My Responsive UI #

A Flutter package that makes it easy to create responsive UIs across different screen sizes.

Features #

  • Easy to use extensions for responsive dimensions (.h, .w, .sp, .r)
  • Built-in spacing utilities (vs, hs)
  • Safe dimension calculations with min/max boundaries
  • Orientation change support
  • Memory leak prevention

Getting started #

Add this to your package's pubspec.yaml file:

dependencies:
  my_responsive_ui: ^1.0.0

Usage #

  1. Wrap your app with ResponsiveInitializer:
void main() {
  runApp(
    MaterialApp(
      home: ResponsiveInitializer(
        baseHeight: 812, // Design height
        baseWidth: 375,  // Design width
        child: MyApp(),
      ),
    ),
  );
}
  1. Use responsive extensions:
Container(
  height: 200.h,  // Responsive height
  width: 300.w, // Responsive width
  padding: EdgeInsets.all(16.r),
  child: Text(
    'Hello',
    style: TextStyle(fontSize: 16.sp),
  ),
)
  1. Use spacing utilities:
Column(
  children: [
    Text('First'),
    vs(20),  // Vertical space
    Text('Second'),
  ],
)
2
likes
0
points
18
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for creating responsive UIs with easy to use extensions and utilities.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on my_responsive_ui