优化
This commit is contained in:
@@ -98,4 +98,23 @@ class LocalStorage {
|
||||
await removeToken();
|
||||
await removeUserInfo();
|
||||
}
|
||||
|
||||
// ==================== 引导页状态 ====================
|
||||
|
||||
static const String _onboardingKey = 'onboarding_completed';
|
||||
|
||||
/// 检查是否已完成引导页
|
||||
static bool get isOnboardingCompleted {
|
||||
return getBool(_onboardingKey) ?? false;
|
||||
}
|
||||
|
||||
/// 标记引导页已完成
|
||||
static Future<void> setOnboardingCompleted() async {
|
||||
await setBool(_onboardingKey, true);
|
||||
}
|
||||
|
||||
/// 重置引导页状态(用于测试)
|
||||
static Future<void> resetOnboarding() async {
|
||||
await prefs.remove(_onboardingKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user