createStorageMessage function

String createStorageMessage(
  1. StorageMessageType type, [
  2. String? key,
  3. String? value
])

Implementation

String createStorageMessage(StorageMessageType type, [String? key, String? value]) {
  final t = type == StorageMessageType.getStorage ? 'GET_STORAGE' : 'SET_STORAGE';
  return "window.handleStorageOperation(${_jsonEncode({'type': t, 'key': key, 'value': value})});";
}