Update Saqel Platform: 2026-09-08 13:43:36

This commit is contained in:
Hamza-Ayed
2026-09-08 13:43:36 +03:00
parent 0f424062fe
commit bb37b31cab
76 changed files with 3617 additions and 3059 deletions
@@ -33,6 +33,9 @@ class AppConfig {
static const String monetizationEndpoint = '/api/teacher/monetization';
static const String reputationEndpoint = '/api/teacher/reputation';
static const String auditVideoEndpoint = '/api/teacher/audit-studio-video';
static const String uploadLessonEndpoint = '/api/teacher/lessons/upload';
static const String uploadVideoEndpoint = '/api/teacher/videos/upload-direct';
static const String qnaEndpoint = '/api/teacher/qna';
static const String cliqPayoutEndpoint = '/api/teacher/payout/request';
// Chat & Real-Time Inquiries Endpoints
@@ -1,6 +1,5 @@
import 'package:flutter/services.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../utils/app_logger.dart';
/// Ultra-Resilient Storage Service for Teacher Studio
@@ -22,13 +21,6 @@ class StorageService {
static const String _keyUser = 'saqel_teacher_user_data';
Future<void> _writeSafe(String key, String value) async {
try {
final prefs = await SharedPreferences.getInstance();
await prefs.setString(key, value);
} catch (e) {
AppLogger.log('Prefs write notice ($key): $e', tag: 'STORAGE');
}
try {
await _secureStorage.write(key: key, value: value);
} on PlatformException catch (e) {
@@ -42,23 +34,13 @@ class StorageService {
if (val != null && val.isNotEmpty) return val;
} catch (_) {}
try {
final prefs = await SharedPreferences.getInstance();
return prefs.getString(key);
} catch (_) {
return null;
}
return null;
}
Future<void> saveToken(String token) async => await _writeSafe(_keyToken, token);
Future<String?> getToken() async => await _readSafe(_keyToken);
Future<void> clearSession() async {
try {
final prefs = await SharedPreferences.getInstance();
await prefs.remove(_keyToken);
await prefs.remove(_keyUser);
} catch (_) {}
try {
await _secureStorage.delete(key: _keyToken);
await _secureStorage.delete(key: _keyUser);