when method
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;
}