removeItem method
A method that removes 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.
If an optional eventHandler
parameter was passed, the callback function will be called.
In case of an error
, the first argument will contain the error. In case of success
,
the first argument will be null and the second argument will be a boolean indicating
whether the value was removed.
Implementation
CloudStorage removeItem(String key, [void Function(String? error, [bool? removed])? callback]) {
Telegram.WebApp.CloudStorage.removeItem(key, callback?.toJS);
return this;
}