matchTextDirection property
bool
get
matchTextDirection
Whether to paint the picture in the direction of the TextDirection.
If this is true, then in TextDirection.ltr contexts, the picture will be drawn with its origin in the top left (the "normal" painting direction for pictures); and in TextDirection.rtl contexts, the picture 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 pictures in right-to-left environments, for pictures that were designed for left-to-right locales. Be careful, when using this, to not flip pictures 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) {
assert(value != null); // ignore: unnecessary_null_comparison
if (value == _matchTextDirection) {
return;
}
_matchTextDirection = value;
markNeedsPaint();
}