when<TResult extends Object?> method Null safety

  1. @optionalTypeArgs
TResult when<TResult extends Object?>(
  1. TResult $default(
    1. int value
    ),
  2. {required TResult fromARGB(
    1. int a,
    2. int r,
    3. int g,
    4. int b
    ),
  3. required TResult fromRGBO(
    1. int r,
    2. int g,
    3. int b,
    4. double opacity
    ),
  4. required TResult alphaBlend(
    1. Color foreground,
    2. Color background
    ),
  5. required TResult material(
    1. int value,
    2. Map<int, Color> swatch
    ),
  6. required TResult materialAccentColor(
    1. int value,
    2. Map<int, Color> swatch
    ),
  7. required TResult primary(
      ),
    1. required TResult onPrimary(
        ),
      1. required TResult primaryContainer(
          ),
        1. required TResult onPrimaryContainer(
            ),
          1. required TResult secondary(
              ),
            1. required TResult onSecondary(
                ),
              1. required TResult secondaryContainer(
                  ),
                1. required TResult onSecondaryContainer(
                    ),
                  1. required TResult tertiary(
                      ),
                    1. required TResult onTertiary(
                        ),
                      1. required TResult tertiaryContainer(
                          ),
                        1. required TResult onTertiaryContainer(
                            ),
                          1. required TResult error(
                              ),
                            1. required TResult onError(
                                ),
                              1. required TResult errorContainer(
                                  ),
                                1. required TResult onErrorContainer(
                                    ),
                                  1. required TResult outline(
                                      ),
                                    1. required TResult outlineVariant(
                                        ),
                                      1. required TResult background(
                                          ),
                                        1. required TResult onBackground(
                                            ),
                                          1. required TResult surface(
                                              ),
                                            1. required TResult onSurface(
                                                ),
                                              1. required TResult surfaceVariant(
                                                  ),
                                                1. required TResult onSurfaceVariant(
                                                    ),
                                                  1. required TResult inverseSurface(
                                                      ),
                                                    1. required TResult onInverseSurface(
                                                        ),
                                                      1. required TResult inversePrimary(
                                                          ),
                                                        1. required TResult shadow(
                                                            ),
                                                          1. required TResult scrim(
                                                              ),
                                                            1. required TResult surfaceTint(
                                                                )}
                                                              )
                                                              @optionalTypeArgs, inherited

                                                              Implementation

                                                              @optionalTypeArgs
                                                              TResult when<TResult extends Object?>(
                                                                TResult Function(int value) $default, {
                                                                required TResult Function(int a, int r, int g, int b) fromARGB,
                                                                required TResult Function(int r, int g, int b, double opacity) fromRGBO,
                                                                required TResult Function(Color foreground, Color background) alphaBlend,
                                                                required TResult Function(int value, Map<int, Color> swatch) material,
                                                                required TResult Function(int value, Map<int, Color> swatch)
                                                                    materialAccentColor,
                                                                required TResult Function() primary,
                                                                required TResult Function() onPrimary,
                                                                required TResult Function() primaryContainer,
                                                                required TResult Function() onPrimaryContainer,
                                                                required TResult Function() secondary,
                                                                required TResult Function() onSecondary,
                                                                required TResult Function() secondaryContainer,
                                                                required TResult Function() onSecondaryContainer,
                                                                required TResult Function() tertiary,
                                                                required TResult Function() onTertiary,
                                                                required TResult Function() tertiaryContainer,
                                                                required TResult Function() onTertiaryContainer,
                                                                required TResult Function() error,
                                                                required TResult Function() onError,
                                                                required TResult Function() errorContainer,
                                                                required TResult Function() onErrorContainer,
                                                                required TResult Function() outline,
                                                                required TResult Function() outlineVariant,
                                                                required TResult Function() background,
                                                                required TResult Function() onBackground,
                                                                required TResult Function() surface,
                                                                required TResult Function() onSurface,
                                                                required TResult Function() surfaceVariant,
                                                                required TResult Function() onSurfaceVariant,
                                                                required TResult Function() inverseSurface,
                                                                required TResult Function() onInverseSurface,
                                                                required TResult Function() inversePrimary,
                                                                required TResult Function() shadow,
                                                                required TResult Function() scrim,
                                                                required TResult Function() surfaceTint,
                                                              }) =>
                                                                  throw _privateConstructorUsedError;