Breakpoint
Breakpoint - A Flutter plugin to calculate the material design breakpoints. Maintainer: @rodydavis
Install / Use
/learn @fluttercommunity/BreakpointREADME
breakpoint
View the online demo here!
[!WARNING] This project has moved here: https://github.com/rodydavis/packages.dart
Overview
Follows Material Design Docs.

Usage
When you are wanting to calculate the breakpoint of a widget that may not take up the full screen. This needs BoxConstraints but can be provided by the layout builder.
final _breakpoint = Breakpoint.fromConstraints(constraints);
When a widget always takes up thye full screen.
final _breakpoint = Breakpoint.fromMediaQuery(context);
Use BreakpointBuilder if you want the layout builder wrapped for you.
return BreakpointBuilder(
builder: (context, breakpoint) {
print('Breakpoint: $breakpoint');
return Container();
},
);
Example
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:breakpoint/breakpoint.dart';
/// main is entry point of Flutter application
void main() {
// Desktop platforms aren't a valid platform.
_setTargetPlatformForDesktop();
return runApp(MyApp());
}
/// If the current platform is desktop, override the default platform to
/// a supported platform (iOS for macOS, Android for Linux and Windows).
/// Otherwise, do nothing.
void _setTargetPlatformForDesktop() {
TargetPlatform targetPlatform;
if (Platform.isMacOS) {
targetPlatform = TargetPlatform.iOS;
} else if (Platform.isLinux || Platform.isWindows) {
targetPlatform = TargetPlatform.android;
}
if (targetPlatform != null) {
debugDefaultTargetPlatformOverride = targetPlatform;
}
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return LayoutBuilder(builder: (_, constraints) {
final _breakpoint = Breakpoint.fromConstraints(constraints);
return Scaffold(
appBar: AppBar(
title: Text('Breakpoint Example: ${_breakpoint.toString()}'),
),
body: Container(
padding: EdgeInsets.all(_breakpoint.gutters),
child: GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: _breakpoint.columns,
crossAxisSpacing: _breakpoint.gutters,
mainAxisSpacing: _breakpoint.gutters,
),
itemCount: 200,
itemBuilder: (_, index) {
return Container(
child: Card(
child: Text(
index.toString(),
),
),
);
},
),
),
);
});
}
}
Related Skills
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
2.0kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
HappyColorBlend
HappyColorBlendVibe Project Guidelines Project Overview HappyColorBlendVibe is a Figma plugin for color palette generation with advanced tint/shade blending capabilities. It allows designers to
Flyaro-waffle-app
Waffle Delight - Full Stack MERN Application Rules & Documentation Project Overview A comprehensive waffle delivery application built with MERN stack featuring premium UI/UX, admin management, a
