listFromJson static method
Reads the problemsJson array native sends across FFI/wasm.
Implementation
static List<RmlProblem> listFromJson(String json) =>
(jsonDecode(json) as List<dynamic>)
.cast<Map<String, dynamic>>()
.map(
(problem) => RmlProblem(
severity: problem['severity'] as String,
kind: problem['kind'] as String,
message: problem['message'] as String,
line: problem['line'] as int,
ids: (problem['ids'] as List<dynamic>?)?.cast<String>() ??
const [],
),
)
.toList();