getValue method

String? getValue(
  1. String key
)

Get value by key

Implementation

String? getValue(String key) {
  try {
    return entries.firstWhere((e) => e.key == key).value;
  } catch (e) {
    return null; // Return null if the key doesn't exist
  }
}