matchTextDirection property

bool get matchTextDirection

Whether to paint the image in the direction of the TextDirection.

If this is true, then in TextDirection.ltr contexts, the image will be drawn with its origin in the top left (the "normal" painting direction for images); and in TextDirection.rtl contexts, the image will be drawn with a scaling factor of -1 in the horizontal direction so that the origin is in the top right.

This is occasionally used with images in right-to-left environments, for images that were designed for left-to-right locales. Be careful, when using this, to not flip images with integral shadows, text, or other effects that will look incorrect when flipped.

If this is set to true, textDirection must not be null.

Implementation

bool get matchTextDirection => _matchTextDirection;
set matchTextDirection (bool value)

Implementation

set matchTextDirection(bool value) {
  if (value == _matchTextDirection) {
    return;
  }
  _matchTextDirection = value;
  _markNeedResolution();
}