ScreenLayoutBreakpoints class

A class representing breakpoints for screen layout. Breakpoints refer to the widths determined by the application's design. You can set the breakpoints for portrait mode and landscape mode (portraitStandardBreakpoint, landscapeStandardBreakpoint), as well as width constraints for portrait mode and landscape mode (portraitConstrainedWidth, landscapeConstrainedWidth). Additionally, by setting maxScale, you can limit the scale to prevent the RenderSize of child elements from exceeding it. Pass these settings to ScreenLayout.breakpoints.

example:

ScreenLayout(
  breakpoints: const ScreenLayoutBreakpoints(
    portraitStandardBreakpoint: 375.0,
    portraitConstrainedWidth: double.infinity,
    landscapeStandardBreakpoint: 375.0,
    landscapeConstrainedWidth: double.infinity,
    maxScale: 1.2,
  ),
  child: HogehogeWidget(),
),

Constructors

ScreenLayoutBreakpoints.new({String? name, required double portraitStandardBreakpoint, required double portraitConstrainedWidth, required double landscapeStandardBreakpoint, required double landscapeConstrainedWidth, required double maxScale})
This function creates a breakpoint with the specified name. You can specify the portrait breakpoint (portraitStandardBreakpoint) and its width constraint (portraitConstrainedWidth), as well as the landscape breakpoint (landscapeStandardBreakpoint) and its width constraint (landscapeConstrainedWidth). The maxScale is a value that limits the scale to ensure it does not exceed the RenderSize of the child element.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
landscapeConstrainedWidth double
Value of the width constraint in landscape mode
final
landscapeStandardBreakpoint double
Value of the breakpoint in landscape mode
final
maxScale double
Value to limit the scale to prevent the RenderSize of child elements from exceeding it
final
name String?
Name of the breakpoint
final
portraitConstrainedWidth double
Value of the width constraint in portrait mode
final
portraitStandardBreakpoint double
Value of the breakpoint in portrait mode
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? name, double? portraitStandardBreakpoint, double? portraitConstrainedWidth, double? landscapeStandardBreakpoint, double? landscapeConstrainedWidth, double? maxScale}) ScreenLayoutBreakpoints
Partially modifies the properties of the existing ScreenLayoutBreakpoints. If a property is not specified, the existing value will be used.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override