when method

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

Determines whether the current Orientation matches the specified orientation.

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

Implementation

@override
bool when(BuildContext context) {
  return MediaQuery.of(context).orientation == orientation;
}