EufemiaInsets class
An immutable set of offsets in each of the four cardinal directions.
Typically used for an offset from each of the four sides of a box. For example, the padding inside a box can be represented using this class.
The EufemiaInsets class specifies offsets in terms of visual edges, left, top, right, and bottom. These values are not affected by the TextDirection.
Here are some examples of how to create EdgeInsets instances:
Typical eight-pixel margin on all sides:
const EufemiaInsets.small()
Eight pixel margin above and below, no horizontal margins:
const EufemiaInsets.small(EufemiaSides.vertical)
Left margin indent of 16 pixels:
const EufemiaInsets.only(EufemiaSpace.medium, EufemiaSides.left)
See also:
- EufemiaPadding, a widget that accepts EufemiaInsets to describe its margins.
Constructors
- EufemiaInsets({EufemiaSpace top, EufemiaSpace bottom, EufemiaSpace left, EufemiaSpace right, EufemiaSpace vertical, EufemiaSpace horizontal, EufemiaSpace all})
-
const
- EufemiaInsets.extraExtraLarge([EufemiaSides sides = EufemiaSides.all])
-
Constructs an EufemiaInsets instance with EufemiaSpace.extraExtraLarge on only the provided
sides
. Defaults to EufemiaSides.all.factory - EufemiaInsets.extraLarge([EufemiaSides sides = EufemiaSides.all])
-
Constructs an EufemiaInsets instance with EufemiaSpace.extraLarge on only the provided
sides
. Defaults to EufemiaSides.all.factory - EufemiaInsets.extraSmall([EufemiaSides sides = EufemiaSides.all])
-
Constructs an EufemiaInsets instance with EufemiaSpace.extraSmall on only the provided
sides
. Defaults to EufemiaSides.all.factory - EufemiaInsets.large([EufemiaSides sides = EufemiaSides.all])
-
Constructs an EufemiaInsets instance with EufemiaSpace.large on only the provided
sides
. Defaults to EufemiaSides.all.factory - EufemiaInsets.medium([EufemiaSides sides = EufemiaSides.all])
-
Constructs an EufemiaInsets instance with EufemiaSpace.medium on only the provided
sides
. Defaults to EufemiaSides.all.factory - EufemiaInsets.only(EufemiaSpace space, [EufemiaSides sides = EufemiaSides.all])
-
Constructs an EufemiaInsets instance with
space
on only the providedsides
. Defaults to EufemiaSides.all.factory - EufemiaInsets.small([EufemiaSides sides = EufemiaSides.all])
-
Constructs an EufemiaInsets instance with EufemiaSpace.small on only the provided
sides
. Defaults to EufemiaSides.all.factory
Properties
- bottom → EufemiaSpace
-
The padding to add on the bottom.
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- left → EufemiaSpace
-
The padding to add to the left.
final
- right → EufemiaSpace
-
The padding to add to the right.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- top → EufemiaSpace
-
The padding to add on the top.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toEdgeInsets(
{BuildContext context, EufemiaSpacingData data}) → EdgeInsets - Returns the corresponding Flutter-friendly EdgeInsets from this EufemiaInsets instace.
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
Constants
- allExtraExtraLarge → const EufemiaInsets
-
An EufemiaInsets instance with EufemiaSpace.extraExtraLarge spacing on
all sides.
EufemiaInsets(all: EufemiaSpace.extraExtraLarge)
- allExtraLarge → const EufemiaInsets
-
An EufemiaInsets instance with EufemiaSpace.extraLarge spacing on
all sides.
EufemiaInsets(all: EufemiaSpace.extraLarge)
- allExtraSmall → const EufemiaInsets
-
An EufemiaInsets instance with EufemiaSpace.extraSmall spacing on
all sides.
EufemiaInsets(all: EufemiaSpace.extraSmall)
- allLarge → const EufemiaInsets
-
An EufemiaInsets instance with EufemiaSpace.large spacing on
all sides.
EufemiaInsets(all: EufemiaSpace.large)
- allMedium → const EufemiaInsets
-
An EufemiaInsets instance with EufemiaSpace.medium spacing on
all sides.
EufemiaInsets(all: EufemiaSpace.medium)
- allSmall → const EufemiaInsets
-
An EufemiaInsets instance with EufemiaSpace.small spacing on
all sides.
EufemiaInsets(all: EufemiaSpace.small)
- none → const EufemiaInsets
-
An EufemiaInsets instance with no spacing.
EufemiaInsets(all: EufemiaSpace.none)