when method

  1. @override
bool when(
  1. BuildContext context
)
override

Determines whether the current Brightness matches the specified brightness.

Returns true if the Brightness obtained from the context matches the brightness associated with this variant, and false otherwise.

Implementation

@override
bool when(BuildContext context) {
  return Theme.of(context).brightness == brightness;
}