paint method
Implementation
@protected
void paint(Widget child, Context context) {
if (pageTheme.clip) {
final _margin = margin!;
context.canvas
..saveContext()
..drawRect(
_margin.left,
_margin.bottom,
pageFormat.width - _margin.horizontal,
pageFormat.height - _margin.vertical,
)
..clipPath();
}
if (mustRotate) {
final _margin = margin!;
context.canvas
..saveContext()
..setTransform(Matrix4.identity()
..rotateZ(-math.pi / 2)
..translate(
-pageFormat.height - _margin.left + _margin.top,
-pageFormat.height + pageFormat.width + _margin.top - _margin.right,
));
child.paint(context);
context.canvas.restoreContext();
} else {
child.paint(context);
}
if (pageTheme.clip) {
context.canvas.restoreContext();
}
}