Files
Remever/lib/helpers/hive_creator.dart
2025-03-03 20:59:42 +03:00

16 lines
405 B
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Package imports:
import 'package:hive_ce_flutter/hive_flutter.dart';
///
/// Вспомогательный класс для открытия [Hive] хранилищ
///
class HiveCreator<T> {
///
/// Открывает [Hive] хранилище с типом [T]
///
Future<Box<T>> open(String name, [HiveCipher? cipher]) {
return Hive.openBox<T>(name, encryptionCipher: cipher);
}
}