layout method

  1. @override
PwBox layout(
  1. Context context,
  2. BoxConstraints constraints
)
override

layout API.

Implementation

@override
PwBox layout(Context context, BoxConstraints constraints) {
  final Context ctx = textDirection == null
      ? context
      : context.copyWith(textDirection: textDirection);
  final String flat = _flatten(text, ctx.theme.defaultTextStyle);
  return Text(
    flat,
    style: text.style,
    textAlign: textAlign,
    textDirection: textDirection,
  ).layout(ctx, constraints);
}