matches method

bool matches(
  1. String query
)

True when query names this session: device id, app identity, or a case-insensitive prefix of the app or device name.

Implementation

bool matches(String query) {
  final q = query.trim().toLowerCase();
  if (q.isEmpty) return false;
  if (id.toLowerCase() == q) return true;
  for (final s in [package, displayName, bundleId, deviceName]) {
    if (s == null) continue;
    final v = s.toLowerCase();
    if (v == q || v.startsWith(q)) return true;
  }
  return false;
}