RecordClass constructor

RecordClass(
  1. Map? fields
)

Implementation

RecordClass(Map? fields) {
  fields ??= Map.from({});
  _fields = (Map.from(fields)).entries.toList();
  assert(
      _fields.every((element) =>
          (element.key is String && element.key != null) ||
          (element.key == null)),
      "Currently we only support Map<String,dynamic> as input");
  _fields.sort((a, b) =>
      idlLabelToId((a.key).toString()).toInt() -
      idlLabelToId((b.key).toString()).toInt());
}