resolve method

  1. @override
EdgeInsets resolve(
  1. 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:

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),
  };
}