wantsMobileMagnifierToBeVisible static method

bool wantsMobileMagnifierToBeVisible([
  1. Finder? superReaderFinder
])

Returns true if SuperReader's policy believes that a mobile magnifier should be visible right now, or false otherwise.

This inspection is different from isMobileMagnifierVisible in a couple ways:

Implementation

static bool wantsMobileMagnifierToBeVisible([Finder? superReaderFinder]) {
  // TODO: add Android support
  final magnifierManager = find.state<SuperReaderIosMagnifierOverlayManagerState>(superReaderFinder);
  if (magnifierManager == null) {
    throw Exception(
        "Tried to verify that SuperReader wants mobile magnifier to be visible, but couldn't find the magnifier manager widget.");
  }

  return magnifierManager.wantsToDisplayMagnifier;
}