// key_storage.dart import 'package:flutter_secure_storage/flutter_secure_storage.dart'; class KeyStorage { static const _publicKeyKey = 'public_key'; static const _privateKeyKey = 'private_key'; final FlutterSecureStorage _storage = const FlutterSecureStorage(); Future saveKeys({required String publicKey, required String privateKey}) async { await _storage.write(key: _publicKeyKey, value: publicKey); await _storage.write(key: _privateKeyKey, value: privateKey); } Future getPublicKey() async { return await _storage.read(key: _publicKeyKey); } Future getPrivateKey() async { return await _storage.read(key: _privateKeyKey); } Future deleteKeys() async { await _storage.delete(key: _publicKeyKey); await _storage.delete(key: _privateKeyKey); } }