matches method

  1. @override
bool matches(
  1. ExtensionContext context
)

This method is called to test whether or not this extension needs to do any work in this context.

By default returns true if supportedTags contains the element's name

Implementation

@override
bool matches(ExtensionContext context) {
  switch (context.currentStep) {
    case CurrentStep.preparing:
      return super.matches(context);
    case CurrentStep.building:
      return context.styledElement is ImageTapExtensionElement;
    default:
      return false;
  }
}