google / google/built_value.dart

Unhandled Exception: Converting object to an encodable object failed: Instance of '_$RecordStandardNoteModel'

Open
#1,092 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
886
Forks
195
Avg merge
1d 11h
Merged PRs (30d)
4

Description

`
Future fetchSavePlayRecord() async {

PlayRecordModel responseRecord = _musicEngine.recordEngine.responseRecord;

ListBuilder temp = responseRecord.playNoteList.toBuilder();

print(temp);
print("==============");
// final Iterable types = new BuiltList([RecordStandardNoteModel]);

ResultData res = await _pianoService.savePlayRecordDetail(
endPlayTime: responseRecord.endPlayTime,
startPlayTime: responseRecord.startPlayTime,
taskType: responseRecord.taskType,
teachingType: responseRecord.teachingType,
standardDuration: responseRecord.standardDuration,
relationId: responseRecord.relationId,
metronomeMark: responseRecord.metronomeMark,
musicId: responseRecord.musicId,
playNoteList: responseRecord.playNoteList.toList(), // i want get a list
);

if (res.code == 0) {
} else {
showToast(res.msg]);
}
}
`

![image](https://user-images.githubusercontent.com/13759936/131784426-14c394fa-29ac-45f9-bb8c-e7835afb72d9.png)

![image](https://user-images.githubusercontent.com/13759936/131784536-b4b2d522-6cb4-4f00-a0a4-f851efd82dfb.png)

![image](https://user-images.githubusercontent.com/13759936/131784493-47011270-dd21-4ecf-8c9d-65258fd7a957.png)

![image](https://user-images.githubusercontent.com/13759936/131784625-eaa3c2cc-fd27-4f77-9594-cb285ed1f878.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.