none<T> static method

void none<T>(
  1. Option<T> option, {
  2. String? reason,
})

Asserts option is None.

Implementation

static void none<T>(Option<T> option, {String? reason}) => option.match(
  some: (T value) => throw AuthAssertionError(
    reason ?? 'expected None but got Some($value)',
  ),
  none: () {},
);