Breakpoints
This commit is contained in:
@@ -51,16 +51,14 @@ class Breakpoint {
|
||||
///
|
||||
/// Use [Breakpoint.fromConstraints] when the widget does not take up the full screen
|
||||
factory Breakpoint.fromMediaQuery(BuildContext context) {
|
||||
final _media = MediaQuery.of(context);
|
||||
final size = MediaQuery.sizeOf(context);
|
||||
|
||||
double _width = 359;
|
||||
double width = size.width;
|
||||
|
||||
Orientation orientation = Orientation.portrait;
|
||||
final orientation =
|
||||
size.width > size.height ? Orientation.landscape : Orientation.portrait;
|
||||
|
||||
_width = _media.size.width;
|
||||
orientation = _media.orientation;
|
||||
|
||||
return _calcBreakpoint(orientation, _width);
|
||||
return _calcBreakpoint(orientation, width);
|
||||
}
|
||||
|
||||
static Breakpoint _calcBreakpoint(Orientation orientation, double _width) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
name: breakpoint
|
||||
description: A Flutter plugin to calculate the material design breakpoints.
|
||||
version: 1.3.0
|
||||
version: 1.3.1
|
||||
|
||||
maintainer: Rody Davis (@rodydavis)
|
||||
homepage: https://github.com/rodydavis/plugins
|
||||
repository: https://github.com/fluttercommunity/breakpoint
|
||||
repository: https://github.com/rodydavis/packages.dart/tree/main/packages/breakpoint
|
||||
resolution: workspace
|
||||
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user