layout method

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

layout API.

Implementation

@override
PwBox layout(Context context, BoxConstraints constraints) {
  final PageNumberBuilder? custom = builder;
  final Widget child = custom != null
      ? custom(context.pageNumber, context.pagesCount)
      : Text(
          template
              .replaceAll('{page}', '${context.pageNumber}')
              .replaceAll('{count}', '${context.pagesCount}'),
          style:
              style ??
              const TextStyle(fontSize: 9, color: '607D8B'),
        );
  return child.layout(context, constraints);
}