get<T> method

Future<T?> get<T>(
  1. String key
)

Implementation

Future<T?> get<T>(String key) async {
  final v = (await this).get(key);
  if (T == bool && v is String) {
    return (v == 'true') as T;
  } else if (T == String && v is! String) {
    return v?.toString() as T?;
  } else {
    return v as T?;
  }
}