toPdfTableCellVerticalAlignment method

TableCellVerticalAlignment toPdfTableCellVerticalAlignment()

Converts the TableCellVerticalAlignment to a pw.TableCellVerticalAlignment.

Implementation

pw.TableCellVerticalAlignment toPdfTableCellVerticalAlignment() {
  switch (this) {
    case TableCellVerticalAlignment.top:
      return pw.TableCellVerticalAlignment.top;
    case TableCellVerticalAlignment.middle:
      return pw.TableCellVerticalAlignment.middle;
    case TableCellVerticalAlignment.bottom:
      return pw.TableCellVerticalAlignment.bottom;
    case TableCellVerticalAlignment.fill:
      return pw.TableCellVerticalAlignment.full;
    // not supported by pdf package:
    // - TableCellVerticalAlignment.baseline
    default:
      debugPrint(
          'Unsupported TableCellVerticalAlignment: $this; defaulting to TableCellVerticalAlignment.top');
      return pw.TableCellVerticalAlignment.top;
  }
}