ResponsiveWrapperData class
Responsive data about the current screen.
Resized and scaled values can be accessed such as ResponsiveWrapperData.scaledWidth.
- Annotations
Constructors
-
ResponsiveWrapperData({double screenWidth = 0, double screenHeight = 0, double scaledWidth = 0, double scaledHeight = 0, List<
ResponsiveBreakpoint> breakpoints = const [], List<ResponsiveBreakpointSegment> breakpointSegments = const [], ResponsiveBreakpoint activeBreakpoint = const ResponsiveBreakpoint.tag(0, name: ''), bool isMobile = false, bool isPhone = false, bool isTablet = false, bool isDesktop = false, Orientation orientation = Orientation.portrait}) -
Creates responsive data with explicit values.
const
Properties
- activeBreakpoint → ResponsiveBreakpoint
-
final
-
breakpoints
→ List<
ResponsiveBreakpoint> -
final
-
breakpointSegments
→ List<
ResponsiveBreakpointSegment> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
- scaledHeight → double
-
final
- scaledWidth → double
-
final
- screenHeight → double
-
final
- screenWidth → double
-
final
Methods
-
equals(
String? name) → bool -
firstBreakpointNamed(
String name) → ResponsiveBreakpoint? -
isLargerThan(
String? name) → bool -
Is the scaledWidth larger than or equal to
name
? Defaults to false if thename
cannot be found. -
isSmallerThan(
String? name) → bool -
Is the screenWidth smaller than the
name
? Defaults to false if thename
cannot be found. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromResponsiveWrapper(
ResponsiveWrapperState state) → ResponsiveWrapperData - Creates data based on the ResponsiveWrapper state.