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

A simple Flutter extension on BuildContext for responsive width, height, font size, and padding scaling.

ResponsiveScale #

A lightweight Flutter extension on BuildContext that helps you build responsive UIs effortlessly.
With ResponsiveScale, you can scale width, height, font size, icons, and padding proportionally based on the current screen size – without writing repetitive MediaQuery logic.


✨ Features #

  • 🔹 Scale width relative to screen width (context.w())
  • 🔹 Scale height relative to screen height (context.h())
  • 🔹 Scale font size & icons with balanced screen scaling (context.s())
  • 🔹 Responsive symmetric padding (context.symmetric())
  • 🔹 Clean and intuitive API
  • 🔹 No external dependencies

🚀 Usage #

import 'package:flutter/material.dart';
import 'package:context_size_extensions/context_size_extensions.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SizedBox(
        width: context.w(50),
        height: context.h(50),
        child: Padding(
          padding: context.symmetric(horizontal: 16, vertical: 8),
          child: Text(
            'Responsive Text',
            style: TextStyle(fontSize: context.s(16)),
          ),
        ),
      ),
    );
  }
}

📦 Installation #

Add this to your pubspec.yaml:

dependencies:
  responsive_scale: ^1.0.1
0
likes
160
points
6
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A simple Flutter extension on BuildContext for responsive width, height, font size, and padding scaling.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on responsive_scale