containsKey method

  1. @override
Future<bool> containsKey(
  1. String key
)
override

Determine it has unique record of the key.

It returns false if no key assigned or found with duplicated entries.

Implementation

@override
Future<bool> containsKey(String key) async {
  try {
    await entries.singleWhere((element) => element.key == key);
    return true;
  } on StateError {
    return false;
  }
}