map<TResult extends Object?> method

TResult map<TResult extends Object?>({
  1. required TResult fail(
    1. StartLiveStoryResultFail value
    ),
  2. required TResult ok(
    1. StartLiveStoryResultOk value
    ),
})

Implementation

TResult map<TResult extends Object?>({
  required TResult Function(StartLiveStoryResultFail value) fail,
  required TResult Function(StartLiveStoryResultOk value) ok,
}) {
  switch (getConstructor()) {
    case StartLiveStoryResultFail.constructor:
      return fail.call(this as StartLiveStoryResultFail);
    case StartLiveStoryResultOk.constructor:
      return ok.call(this as StartLiveStoryResultOk);
  }
  throw StateError('not handled type Generator');
}