screenMatches static method

bool screenMatches(
  1. String screen,
  2. String expected
)

True when screen is the screen expected names (slug-equal, or one slug contained in the other: loans matches loans_list).

Implementation

static bool screenMatches(String screen, String expected) {
  final a = slugify(screen);
  final b = slugify(expected);
  if (a.isEmpty || b.isEmpty) return false;
  return a == b || a.contains(b) || b.contains(a);
}