workerConfigFromJson function
Rebuilds a WorkerConfig from JSON. engine is intentionally left null: each
prebuilt worker is compiled for one engine (the main isolate picks which
worker script to load from engineTag), so no engine backend needs to be
reconstructed (or depended on) here.
Implementation
WorkerConfig workerConfigFromJson(Map<String, dynamic> j) => WorkerConfig(
langs: (j['langs'] as List)
.map((e) => langDescriptorFromJson((e as Map).cast<String, dynamic>()))
.toList(),
rawLangJsons: (j['rawLangJsons'] as List).cast<String>(),
themeJsons: (j['themeJsons'] as List).cast<String>(),
);