resolve method
- TextDirection? direction
override
Convert this instance into an EdgeInsets, which uses literal coordinates
(i.e. the left
coordinate being explicitly a distance from the left, and
the right
coordinate being explicitly a distance from the right).
See also:
- EdgeInsets, for which this is a no-op (returns itself).
- EdgeInsetsDirectional, which flips the horizontal direction
based on the
direction
argument.
Implementation
@override
EdgeInsets resolve(TextDirection? direction) {
assert(direction != null);
return switch (direction!) {
TextDirection.rtl => EdgeInsets.fromLTRB(end, top, start, bottom),
TextDirection.ltr => EdgeInsets.fromLTRB(start, top, end, bottom),
};
}