import 'package:hive/hive.dart'; import 'package:path_provider/path_provider.dart'; class HiveManager { static Box? _userInfoBox; static Future initHive() async { final dir = await getApplicationDocumentsDirectory(); Hive.defaultDirectory = dir.path; _userInfoBox = Hive.box(); } static String getUserToken() { return _userInfoBox?.get('token') ?? ''; } }