matches method

  1. @override
bool matches(
  1. String input
)
override

Checks if the input string matches this permission's key or common aliases.

Implementation

@override
bool matches(String input) {
  final lowerKey = key.toLowerCase();
  final lowerInput = input.toLowerCase();
  if (lowerKey == lowerInput) {
    return true;
  } else if (lowerKey.replaceAll('android.permission.', '') == lowerInput) {
    return true;
  }
  return false;
}