Skip to content
pubscout

responsive_framework

1.5.1, released 2 years ago by codelessly.com

Automatically adapt Flutter app UI to different screen sizes and breakpoints.

WASM-ready
$ flutter pub add responsive_framework
Source repository

What it does

Provides widgets and utilities to make Flutter apps responsive. It includes breakpoint management, responsive values, grids, row/column switches, and auto-scaling capabilities for mobile, tablet, and desktop layouts.

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

Use it when

  • You need to build layouts that adapt to multiple screen sizes from mobile to 4K desktop.
  • You want to manage breakpoints globally using MaterialApp or CupertinoApp builders.
  • You require conditional UI rendering based on screen size or orientation.

Skip it when

  • You prefer implementing custom LayoutBuilder and MediaQuery logic manually for every screen.
  • You are building a fixed-size application that will never run on varying form factors.

Strengths

  • Simplifies cross-platform responsive design with predefined breakpoints and helper widgets.
  • Offers both resizing and proportional auto-scaling features.
  • Includes helpful layout components like ResponsiveRowColumn and ResponsiveGridView.

Weaknesses

  • Legacy ResponsiveWrapper has been deprecated, requiring migration to ResponsiveBreakpoints.
  • Auto-scaling can occasionally make text or UI elements look overly large on extremely wide viewports if not configured properly.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Add ResponsiveBreakpoints.builder to your MaterialApp or CupertinoApp builder function.

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      builder: (context, child) => ResponsiveBreakpoints.builder(
        child: child!,
        breakpoints: [
          const Breakpoint(start: 0, end: 450, name: MOBILE),
          const Breakpoint(start: 451, end: 800, name: TABLET),
          const Breakpoint(start: 801, end: 1920, name: DESKTOP),
          const Breakpoint(start: 1921, end: double.infinity, name: '4K'),
        ],
      ),
      initialRoute: "/",
    );
  }
}

Alternatives

Packages that do the same job and could replace responsive_framework.

  • responsive_builder

    Alternative approach to building responsive UIs with dedicated screen type builders.

  • sizer

    Alternative utility focused on scaling UI elements based on screen width and height percentages.