ResponsiveBreakpointsData class
Responsive data about the current screen.
Resized and scaled values can be accessed
such as ResponsiveBreakpointsData.scaledWidth
.
- Annotations
Constructors
-
ResponsiveBreakpointsData({double screenWidth = 0, double screenHeight = 0, Breakpoint breakpoint = const Breakpoint(start: 0, end: 0), List<
Breakpoint> breakpoints = const [], bool isMobile = false, bool isPhone = false, bool isTablet = false, bool isDesktop = false, Orientation orientation = Orientation.portrait}) -
Creates responsive data with explicit values.
const
Properties
- breakpoint → Breakpoint
-
final
-
breakpoints
→ List<
Breakpoint> -
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isDesktop → bool
-
final
- isMobile → bool
-
final
- isPhone → bool
-
final
- isTablet → bool
-
final
- orientation → Orientation
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenHeight → double
-
final
- screenWidth → double
-
final
Methods
-
between(
String name, String name1) → bool -
Is the screenWidth smaller than or equal to the
name
? Defaults to false if thename
cannot be found. -
equals(
String name) → bool -
Returns if the active breakpoint is
name
. -
largerOrEqualTo(
String name) → bool -
Is the screenWidth larger than or equal to
name
? Defaults to false if thename
cannot be found. -
largerThan(
String name) → bool -
Is the screenWidth larger than
name
? Defaults to false if thename
cannot be found. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
smallerOrEqualTo(
String name) → bool -
Is the screenWidth smaller than or equal to the
name
? Defaults to false if thename
cannot be found. -
smallerThan(
String name) → bool -
Is the screenWidth smaller than the
name
? Defaults to false if thename
cannot be found. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromWidgetState(
ResponsiveBreakpointsState state) → ResponsiveBreakpointsData - Creates data based on the ResponsiveBreakpoints state.