when method

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

Determines whether the current TextDirection matches the specified direction.

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

Implementation

@override
bool when(BuildContext context) {
  return Directionality.of(context) == direction;
}