setInt method

Future<void> setInt(
  1. String key,
  2. int value
)

Encrypts and saves an int value.

Implementation

Future<void> setInt(String key, int value) async {
  try {
    await _storage.write(key: key, value: value.toString());
  } catch (e, st) {
    throw StorageException(
      message: 'Failed to set int',
      key: key,
      cause: e,
      stackTrace: st,
    );
  }
}