discontinuedPackage thingsboard_pe_client has been discontinued and replaced by thingsboard_client.

getItem method

  1. @override
Future? getItem(
  1. String key, {
  2. dynamic defaultValue,
})
override

Returns the value associated with the given key. If the key does not exist, null is returned.

If defaultValue is specified, it is returned in case the key does not exist.

Implementation

@override
getItem(String key, {defaultValue}) async {
  return storageMap[key] ?? defaultValue;
}