toMap method
Converts the options into a map representation.
This method is intended to be overridden by subclasses to provide a specific mapping of their configuration properties.
Returns:
- A map containing the configuration options.
Implementation
@override
Map<String, String> toMap() => <String, String>{
'encryptedSharedPreferences': '$_encryptedSharedPreferences',
'resetOnError': '$_resetOnError',
'migrateOnAlgorithmChange': '$_migrateOnAlgorithmChange',
'migrateWithBackup': '$_migrateWithBackup',
'enforceBiometrics': '$_enforceBiometrics',
'keyCipherAlgorithm': _keyCipherAlgorithm.name,
'storageCipherAlgorithm': _storageCipherAlgorithm.name,
'biometricType': _biometricType.name,
// ignore: deprecated_member_use_from_same_package — legacy support
'sharedPreferencesName': sharedPreferencesName ?? '',
'preferencesKeyPrefix': preferencesKeyPrefix ?? '',
'storageNamespace': storageNamespace ?? '',
'biometricPromptTitle':
biometricPromptTitle ?? 'Authenticate to access',
'biometricPromptSubtitle':
biometricPromptSubtitle ?? 'Use biometrics or device credentials',
'biometricPromptNegativeButton':
biometricPromptNegativeButton ?? 'Cancel',
};