ResponsiveEdgeInsets class
EdgeInsets for MasamuneUniversalUI
.
It can be passed directly to EdgeInsetsGeometry, and if the widget is compatible with Masamune Universal UI
, the content will change depending on the breakpoint you set.
If the screen width is less than breakpoint, primary is used.
If greaterThanBreakpoint is specified and the screen width is greater than breakpoint, greaterThanBreakpoint is used.
MasamuneUniversalUI
に対応したEdgeInsets。
EdgeInsetsGeometryにそのまま渡すことができ、Masamune Universal UI
に対応したウィジェットであれば、設定したbreakpointによって内容が変化します。
画面の横幅がbreakpointより下回っている場合はprimaryが利用されます。
greaterThanBreakpointが指定されていて画面の横幅がbreakpointより上回っている場合はgreaterThanBreakpointが利用されます。
- Inheritance
-
- Object
- EdgeInsetsGeometry
- ResponsiveEdgeInsets
Constructors
- ResponsiveEdgeInsets.new(EdgeInsets primary, {Breakpoint? breakpoint, EdgeInsets? greaterThanBreakpoint})
-
EdgeInsets for
MasamuneUniversalUI
.const
Properties
- bottomLeft → Offset
-
An Offset describing the vector from the bottom left of a rectangle to the
bottom left of that rectangle inset by this object.
no setter
- bottomRight → Offset
-
An Offset describing the vector from the bottom right of a rectangle to the
bottom right of that rectangle inset by this object.
no setter
- breakpoint → Breakpoint?
-
Breakpoints for responsive support.
final
- collapsedSize → Size
-
The size that this EdgeInsets would occupy with an empty interior.
no setterinherited
- flipped → EdgeInsets
-
An EdgeInsetsGeometry with top and bottom, left and right, and start and end flipped.
no setteroverride
- greaterThanBreakpoint → EdgeInsets?
-
If greaterThanBreakpoint is specified and the screen width is greater than breakpoint, greaterThanBreakpoint is used.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontal → double
-
The total offset in the horizontal direction.
no setterinherited
- isNonNegative → bool
-
Whether every dimension is non-negative.
no setterinherited
- primary → EdgeInsets
-
Main EdgeInsets.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- topLeft → Offset
-
An Offset describing the vector from the top left of a rectangle to the
top left of that rectangle inset by this object.
no setter
- topRight → Offset
-
An Offset describing the vector from the top right of a rectangle to the
top right of that rectangle inset by this object.
no setter
- vertical → double
-
The total offset in the vertical direction.
no setterinherited
Methods
-
add(
EdgeInsetsGeometry other) → EdgeInsetsGeometry -
Returns the sum of two EdgeInsetsGeometry objects.
override
-
along(
Axis axis) → double -
The total offset in the given direction.
inherited
-
clamp(
EdgeInsetsGeometry min, EdgeInsetsGeometry max) → EdgeInsetsGeometry -
Returns a new EdgeInsetsGeometry object with all values greater than
or equal to
min
, and less than or equal tomax
.override -
copyWith(
{double? left, double? top, double? right, double? bottom}) → EdgeInsets - Creates a copy of this EdgeInsets but with the given fields replaced with the new values.
-
deflateRect(
Rect rect) → Rect -
Returns a new rect that is smaller than the given rect in each direction by
the amount of inset in each direction. Specifically, the left edge of the
rect is moved right by
left
, the top edge of the rect is moved down bytop
, the right edge of the rect is moved left byright
, and the bottom edge of the rect is moved up bybottom
. -
deflateSize(
Size size) → Size -
Returns a new size that is smaller than the given size by the amount of
inset in the horizontal and vertical directions.
inherited
-
inflateRect(
Rect rect) → Rect -
Returns a new rect that is bigger than the given rect in each direction by
the amount of inset in each direction. Specifically, the left edge of the
rect is moved left by
left
, the top edge of the rect is moved up bytop
, the right edge of the rect is moved right byright
, and the bottom edge of the rect is moved down bybottom
. -
inflateSize(
Size size) → Size -
Returns a new size that is bigger than the given size by the amount of
inset in the horizontal and vertical directions.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
TextDirection? direction) → EdgeInsets -
Convert this instance into an EdgeInsets, which uses literal coordinates
(i.e. the
left
coordinate being explicitly a distance from the left, and theright
coordinate being explicitly a distance from the right).override -
responsive(
BuildContext context, {Breakpoint? breakpoint}) → EdgeInsetsGeometry -
Get the EdgeInsets corresponding to the current breakpoint by passing
context
. -
subtract(
EdgeInsetsGeometry other) → EdgeInsetsGeometry -
Returns the difference between two EdgeInsetsGeometry objects.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator %(
double other) → EdgeInsets -
Computes the remainder in each dimension by the given factor.
override
-
operator *(
double other) → EdgeInsets -
Scales the EdgeInsets in each dimension by the given factor.
override
-
operator +(
EdgeInsets other) → EdgeInsets - Returns the sum of two EdgeInsets.
-
operator -(
EdgeInsets other) → EdgeInsets - Returns the difference between two EdgeInsets.
-
operator /(
double other) → EdgeInsets -
Divides the EdgeInsets in each dimension by the given factor.
override
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator unary-(
) → EdgeInsets -
Returns the EdgeInsets object with each dimension negated.
override
-
operator ~/(
double other) → EdgeInsets -
Integer divides the EdgeInsets in each dimension by the given factor.
override
Static Methods
-
lerp(
EdgeInsets? a, EdgeInsets? b, double t) → EdgeInsets? -
Linearly interpolate between two EdgeInsets.
override