whenOrNull<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  1. TResult? $default(
    1. Brightness brightness,
    2. Color primary,
    3. Color onPrimary,
    4. Color? primaryContainer,
    5. Color? onPrimaryContainer,
    6. Color secondary,
    7. Color onSecondary,
    8. Color? secondaryContainer,
    9. Color? onSecondaryContainer,
    10. Color? tertiary,
    11. Color? onTertiary,
    12. Color? tertiaryContainer,
    13. Color? onTertiaryContainer,
    14. Color error,
    15. Color onError,
    16. Color? errorContainer,
    17. Color? onErrorContainer,
    18. Color background,
    19. Color onBackground,
    20. Color surface,
    21. Color onSurface,
    22. Color? surfaceVariant,
    23. Color? onSurfaceVariant,
    24. Color? outline,
    25. Color? outlineVariant,
    26. Color? shadow,
    27. Color? scrim,
    28. Color? inverseSurface,
    29. Color? onInverseSurface,
    30. Color? inversePrimary,
    31. Color? surfaceTint
    )?,
  2. {TResult? fromSeed(
    1. Color seedColor,
    2. Brightness brightness,
    3. Color? primary,
    4. Color? onPrimary,
    5. Color? primaryContainer,
    6. Color? onPrimaryContainer,
    7. Color? secondary,
    8. Color? onSecondary,
    9. Color? secondaryContainer,
    10. Color? onSecondaryContainer,
    11. Color? tertiary,
    12. Color? onTertiary,
    13. Color? tertiaryContainer,
    14. Color? onTertiaryContainer,
    15. Color? error,
    16. Color? onError,
    17. Color? errorContainer,
    18. Color? onErrorContainer,
    19. Color? outline,
    20. Color? outlineVariant,
    21. Color? background,
    22. Color? onBackground,
    23. Color? surface,
    24. Color? onSurface,
    25. Color? surfaceVariant,
    26. Color? onSurfaceVariant,
    27. Color? inverseSurface,
    28. Color? onInverseSurface,
    29. Color? inversePrimary,
    30. Color? shadow,
    31. Color? scrim,
    32. Color? surfaceTint
    )?}
)
@optionalTypeArgs, inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>(
  TResult? Function(
          Brightness brightness,
          Color primary,
          Color onPrimary,
          Color? primaryContainer,
          Color? onPrimaryContainer,
          Color secondary,
          Color onSecondary,
          Color? secondaryContainer,
          Color? onSecondaryContainer,
          Color? tertiary,
          Color? onTertiary,
          Color? tertiaryContainer,
          Color? onTertiaryContainer,
          Color error,
          Color onError,
          Color? errorContainer,
          Color? onErrorContainer,
          Color background,
          Color onBackground,
          Color surface,
          Color onSurface,
          Color? surfaceVariant,
          Color? onSurfaceVariant,
          Color? outline,
          Color? outlineVariant,
          Color? shadow,
          Color? scrim,
          Color? inverseSurface,
          Color? onInverseSurface,
          Color? inversePrimary,
          Color? surfaceTint)?
      $default, {
  TResult? Function(
          Color seedColor,
          Brightness brightness,
          Color? primary,
          Color? onPrimary,
          Color? primaryContainer,
          Color? onPrimaryContainer,
          Color? secondary,
          Color? onSecondary,
          Color? secondaryContainer,
          Color? onSecondaryContainer,
          Color? tertiary,
          Color? onTertiary,
          Color? tertiaryContainer,
          Color? onTertiaryContainer,
          Color? error,
          Color? onError,
          Color? errorContainer,
          Color? onErrorContainer,
          Color? outline,
          Color? outlineVariant,
          Color? background,
          Color? onBackground,
          Color? surface,
          Color? onSurface,
          Color? surfaceVariant,
          Color? onSurfaceVariant,
          Color? inverseSurface,
          Color? onInverseSurface,
          Color? inversePrimary,
          Color? shadow,
          Color? scrim,
          Color? surfaceTint)?
      fromSeed,
}) =>
    throw _privateConstructorUsedError;