breakpoints 0.2.0 copy "breakpoints: ^0.2.0" to clipboard
breakpoints: ^0.2.0 copied to clipboard

A simple library for getting page breakpoints xs, sm, md, lg, xl

breakpoints #

A simple library for getting page breakpoints xs, sm, md, lg, xl

Inspired by material-ui

breakpoints:

xs: 0
sm: 600
md: 960
lg: 1280
xl: 1920
innerWidth  |xs      sm       md       lg       xl
            |--------|--------|--------|--------|-------->
width       |   xs   |   sm   |   md   |   lg   |   xl

Install #

dependencies:
  breakpoints:

Usage #

double width = MediaQuery.of(context).size.width;

Breakpoints.only(width, [Breakpoints.xs, Breakpoints.lg])
    ? Text('xs or lg')
    : Container()

Breakpoints.isSm(width) ? Text('isSm') : Container()

width.isXl ? Text('isXl') : SizedBox()

Breakpoints(200).toString() // xs
2
likes
30
pub points
44%
popularity

Publisher

verified publisherajanuw.lol

A simple library for getting page breakpoints xs, sm, md, lg, xl

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on breakpoints