import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:niogu_ecommerce_v1/core/constant/app_key.dart';

class SystemSecure {
  static final _storage = const FlutterSecureStorage();

  static Future<void> saveAccessToken(String accessToken) async {
    await _storage.write(key: AppKey.AUTH_TOKEN, value: accessToken);
  }

  static Future<String?> getAccessToken() async {
    return await _storage.read(key: AppKey.AUTH_TOKEN);
  }

  static Future<void> deleteAccessToken() async {
    await _storage.delete(key: AppKey.AUTH_TOKEN);
  }
}
