breakpoints_mq

Creator: coderz1093

Last updated:

0 purchases

breakpoints_mq Image
breakpoints_mq Images

Languages

Categories

Add to Cart

Description:

breakpoints mq

breakpoints_mq #
A lightweight library for implementing window-size-classes. Provide body, margin.
How to use. #

Once you've added breakpoints to your project, you can get breakpoints like this.
final size = MediaQuery.of(context).size;
final breakpoint = Breakpoint.fromSize(size); // or MediaQuery.of(context).breakpoint;
copied to clipboard
LayoutBuilder(
builder: (context, constraints) {
final breakpoint = Breakpoint.fromConstraints(constraints); // or constraints.breakpoint;
}
);
copied to clipboard
final double width = getWidth();
final breakpoint = Breakpoint.fromWidth(width);
copied to clipboard
Then, use breakpoint.column.
GridView.count(
crossAxisCount: 4,
children: List.generate(
100,
(index) => Padding(
child: Card(
child: Center(
child: Text('No.${index + 1}'),
),
),
),
),
),
copied to clipboard
Requirements #

Flutter 3.0.0 or higher

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.