only<T> static method
Returns a Mode with the same value but with the given context.
final value = Mode<bool>(
context: context,
light: true,
dark: false,
);
Implementation
static T only<T>({
required BuildContext context,
required T light,
required T? dark,
}) {
return Mode<T>(
context: context,
light: light,
dark: dark,
).value;
}