write method

  1. @override
dynamic write(
  1. int value
)
override

write

A callback function that defines how the state is serialized for storage in the local cache. This function is responsible for converting the state into a format suitable for storage, which can include various primitive types such as num, double, int, bool, String, BigInt, DateTime, Uint8List, as well as collections like List, Set, and Map MUST be containing primitive types.

The write function is invoked whenever the state needs to be written to the cache, ensuring the state is stored in an efficient and accessible manner.

NOTE: if you write any object that is not a primitive type, an UnSupportedType exception will be raised.

Implementation

@override
dynamic write(int value) => value;