computeJsonEncode method
Runs a one-off JSON encoding task directly on the main thread for web.
On web, there are no isolates, so JSON encoding is performed synchronously.
Implementation
Future<String> computeJsonEncode(Object? object) async {
return jsonEncode(object);
}