FlutterWindowsVault class

A singleton class holds the static methods like set, get and del to invoke.

you can't construct this class you only can call methods.

example:

// Delete value
bool result = await FlutterWindowsVault.del(key: 'password');

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

platformVersion Future<String>
get current device windows version
no setter

Static Methods

containsKey({required String key, Type type = Type.CRED_TYPE_GENERIC, bool encrypted = false, bool fAsSelf = false}) Future<bool>
decrypt({required String value, bool fAsSelf = false}) Future<String>
The CredUnprotect function (uses CredUnprotectW from wincred.h) decrypts credentials that were previously encrypted by using the CredProtect function. The credentials must have been encrypted in the same security context in which CredUnprotect is called. return string of the decrypted value.
del({required String key, Type type = Type.CRED_TYPE_GENERIC}) Future<bool>
The del function (user CredDeleteW from wincred.h) deletes a credential from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled.
encrypt({required String value, bool fAsSelf = false}) Future<String>
The encrypt function (uses CredProtectW from wincred.h) encrypts the specified credentials so that only the current security context can decrypt them. return string of the encrypted value.
get({required String key, Type type = Type.CRED_TYPE_GENERIC, bool encrypted = false, bool fAsSelf = false}) Future<Cred?>
The get (uses CredReadW from wincred.h) function reads a credential from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled.
list({String? filter}) Future<List<Cred>>
The list function (uses CredEnumerateW from wincred.h) enumerates the credentials from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled.
set({required String key, required String value, Type type = Type.CRED_TYPE_GENERIC, Persist persist = Persist.CRED_PERSIST_LOCAL_MACHINE, String userName = 'com.ayoub.flutter_windows_vault', bool encrypted = false, bool fAsSelf = false}) Future<bool>
save a key/value data in windows credential manager (vault). you could find more info: https://docs.microsoft.com/en-us/windows/win32/api/wincred/nf-wincred-credwritew