setInt abstract method

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

Saves an int value with the given key.

This method stores an integer value in the storage, associating it with the specified key. If a value already exists for this key, it will be replaced.

Parameters:

  • key - The unique identifier for the integer value.
  • value - The integer value to store.

Returns a Future that completes when the integer has been successfully stored.

Throws:

Implementation

Future<void> setInt(String key, int value);