getItem method
A method that receives a value from the cloud storage using the specified key.
key
should contain 1-128 characters, only A-Z, a-z, 0-9, _ and - are allowed
In case of an error
, the callback function will be called and the first argument
will contain the error. In case of success
, the first argument will be null and
the value will be passed as the second argument.
Implementation
CloudStorage getItem(String key, void Function(String? error, [String? result]) callback) {
Telegram.WebApp.CloudStorage.getItem(key, callback.toJS);
return this;
}