breakpoint
1.3.2, released 9 months ago by rodydavis.com
Calculates Material Design responsive layout grid properties based on current screen size.
WASM-ready
What it does
Calculates standard Material Design responsive layout grid properties including columns, gutters, and margins. Identifies device classifications and window sizes using either LayoutConstraints or MediaQuery.
AI-written summary of version 1.3.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to follow Material Design responsive layout guidelines
- You need standard column counts, gutters, and margins based on screen width
- You want a simple builder widget or manual calculations for adaptive layouts
Skip it when
- You require complex custom breakpoint configurations outside of Material Design standards
- You are using a different responsive framework that handles scaling entirely
Strengths
- Implements standard Material Design responsive layout grid system seamlessly
- Supports both MediaQuery and BoxConstraints usage
- Includes a convenient BreakpointBuilder widget
Weaknesses
- Limited to predefined Material Design breakpoints and columns
- Does not provide automated scaling or font resizing features
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
BreakpointBuilder(
builder: (context, breakpoint) {
return Container(
padding: EdgeInsets.all(breakpoint.margin),
child: GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: breakpoint.columns,
crossAxisSpacing: breakpoint.gutters,
mainAxisSpacing: breakpoint.gutters,
),
itemBuilder: (context, index) => Container(),
),
);
},
)Alternatives
Packages that do the same job and could replace breakpoint.
- responsive_framework
Choose it if you need advanced auto-scaling, text scaling, and a comprehensive suite of responsive layout tools.
50Compare - responsive_builder
Choose it for widget-based screen type detection (mobile, tablet, desktop) and custom sizing queries.
50Compare