post function

Future<Object?> post(
  1. String name, [
  2. Object? data
])

Send message to window.

Implementation

Future<Object?> post(String name, [Object? data]) async {
  final response = await _api.post({'name': name, 'data': data});
  if (response.isEmpty) return null;
  return response['data'];
}