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 as Alignment?)?.toPdfAlignment(),
      decoration: await (decoration as BoxDecoration?)?.toPdfBoxDecoration(),
      color: color?.toPdfColor(),
      constraints: constraints?.toPdfBoxConstraints(),
      foregroundDecoration: await (foregroundDecoration as BoxDecoration?)
          ?.toPdfBoxDecoration(),
      margin: (margin as EdgeInsets?)?.toPdfEdgeInsets(),
      padding: (padding as EdgeInsets?)?.toPdfEdgeInsets(),
      transform: transform,
      child: child,
    );