get<T> static method

Future<T?> get<T>({
  1. required String key,
})

获取存储数据

Implementation

static Future<T?> get<T>({required String key}) async {
  try {
    final value = await instance._delegate?.get(key: key);
    if (value != null && value is T) {
      return value;
    }
    return null;
  } catch (e) {
    return null;
  }
}