MethodChannelCalljmpStore class

An implementation of CalljmpStore that uses method channels and caching.

This class provides the default implementation for secure storage operations by communicating with platform-specific native code through Flutter's method channel system. It includes an in-memory cache to optimize performance for frequently accessed values.

Caching Strategy

Values are cached in memory after the first retrieval to reduce native calls and improve performance. The cache is automatically updated when values are stored or deleted.

Usage

This class is typically used automatically as the default implementation and doesn't need to be instantiated directly.

// Used automatically through CalljmpStore.instance
final token = await CalljmpStore.instance.get(
  CalljmpStoreKey.accessToken
);
Inheritance

Constructors

MethodChannelCalljmpStore()

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(CalljmpStoreKey key) Future<void>
Deletes a value from secure storage and removes it from cache.
override
get(CalljmpStoreKey key) Future<String?>
Retrieves a value from secure storage with caching.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(CalljmpStoreKey key, String value) Future<void>
Stores a value in secure storage and updates the cache.
override
toString() String
A string representation of this object.
inherited

Operators

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