toPdfWidget method

Future<Container> toPdfWidget(
  1. Widget? child
)

Converts the Container to a pw.Container.

Implementation

Future<pw.Container> toPdfWidget(pw.Widget? child) async => pw.Container(
      alignment: alignment?.toPdfAlignment(),
      decoration: await (decoration as BoxDecoration?)?.toPdfBoxDecoration(),
      color: color?.toPdfColor(),
      constraints: constraints?.toPdfBoxConstraints(),
      foregroundDecoration: await (foregroundDecoration as BoxDecoration?)
          ?.toPdfBoxDecoration(),
      margin: margin?.toPdfEdgeInsets(),
      padding: padding?.toPdfEdgeInsets(),
      transform: transform,
      child: child,
    );