toPdfMainAxisSpacing method

double toPdfMainAxisSpacing()

Gets the main axis spacing of the SliverGridDelegate.

Implementation

double toPdfMainAxisSpacing() {
  switch (runtimeType) {
    case SliverGridDelegateWithFixedCrossAxisCount:
      return (this as SliverGridDelegateWithFixedCrossAxisCount)
          .mainAxisSpacing;
    case SliverGridDelegateWithMaxCrossAxisExtent:
      return (this as SliverGridDelegateWithMaxCrossAxisExtent)
          .mainAxisSpacing;
    default:
      throw Exception('Unsupported SliverGridDelegate: $runtimeType');
  }
}