import 'package:flutter_secure_storage/flutter_secure_storage.dart'; class KeyStorage { final _storage = const FlutterSecureStorage(); Future savePrivateKey(String privateKey) async { await _storage.write(key: 'privateKey', value: privateKey); } Future getPrivateKey() async { return await _storage.read(key: 'privateKey'); } Future savePublicKey(String publicKey) async { await _storage.write(key: 'publicKey', value: publicKey); } Future getPublicKey() async { return await _storage.read(key: 'publicKey'); } }