layout method
void
layout(
- Context context,
- BoxConstraints constraints, {
- bool parentUsesSize = false,
override
First widget pass to calculate the children layout and bounding box
Implementation
@override
void layout(Context context, BoxConstraints constraints,
{bool parentUsesSize = false}) {
super.layout(context, constraints, parentUsesSize: parentUsesSize);
switch (Directionality.of(context)) {
case TextDirection.rtl:
_resolvedLeft = end;
_resolvedRight = start;
break;
case TextDirection.ltr:
_resolvedLeft = start;
_resolvedRight = end;
break;
}
}