getValue<T> method
获取指定 key 的值。
key 要获取的键名。
type 期望的类型(如 int、String 等)。
返回对应类型的值。
Implementation
@override
T getValue<T>(String key, Type type) {
final value = _box.get(key);
if (value == null) {
throw Exception('Key $key not found in Hive storage');
}
return value as T;
}