Skip to content
pubscout

responsive_sizer

3.3.1, released 3 years ago by hanstan.link

Provides responsive helpers for width, height, font size and unit conversions in Flutter.

WASM-ready
$ flutter pub add responsive_sizer
Source repository

What it does

It wraps the app to expose extension methods like .w, .h, .sp, .dp and absolute units. These calculate values as percentages of screen size or physical units, enabling responsive UI design.

AI-written summary of version 3.3.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need quick, percentage‑based sizing without custom layout code.
  • You want to support multiple screen types (mobile, tablet, desktop) with a single API.
  • You prefer extension methods over manual MediaQuery calculations.

Skip it when

  • You need fine‑grained control over layout beyond simple percentages.
  • You are building a highly custom widget tree that requires manual constraints.

Strengths

  • Simple API via extensions
  • Supports many units (cm, mm, inches, etc.)
  • Handles orientation and screen type automatically
  • Works on all Flutter platforms

Weaknesses

  • Relies on extension methods, which may not auto‑import in IDEs
  • No built‑in theming or advanced layout widgets
  • May add runtime overhead for every call

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency and wrap MaterialApp with ResponsiveSizer widget.

import 'package:responsive_sizer/responsive_sizer.dart';

ResponsiveSizer(
  builder: (context, orientation, screenType) {
    return MaterialApp(home: HomePage());
  },
);

Alternatives

Packages that do the same job and could replace responsive_sizer.