map<TResult extends Object?> method

TResult map<TResult extends Object?>({
  1. required TResult bottom(
    1. PageBlockVerticalAlignmentBottom value
    ),
  2. required TResult middle(
    1. PageBlockVerticalAlignmentMiddle value
    ),
  3. required TResult top(
    1. PageBlockVerticalAlignmentTop value
    ),
})

Implementation

TResult map<TResult extends Object?>({
  required TResult Function(PageBlockVerticalAlignmentBottom value) bottom,
  required TResult Function(PageBlockVerticalAlignmentMiddle value) middle,
  required TResult Function(PageBlockVerticalAlignmentTop value) top,
}) {
  switch (getConstructor()) {
    case PageBlockVerticalAlignmentBottom.constructor:
      return bottom.call(this as PageBlockVerticalAlignmentBottom);
    case PageBlockVerticalAlignmentMiddle.constructor:
      return middle.call(this as PageBlockVerticalAlignmentMiddle);
    case PageBlockVerticalAlignmentTop.constructor:
      return top.call(this as PageBlockVerticalAlignmentTop);
  }
  throw StateError('not handled type Generator');
}