You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I have created four models: appModel, TrackModel, ClipModel, and NoteModel, which are nested (Details are in my repositories: editor_demo.). When I use methods in ClipModel to update data within ClipModel, the UI is not updated.
However, at line 46 in lib/views/track_view.dart of the repository editor_demo, the UI does not update normally. I have to use setState to force an update.
onPanUpdate: (details) {
var clip = widget.track.findClipById(appModel.selectedClipId);
var deltaX = details.localPosition.dx - clip.start;
if (deltaX >120) {
clip.setLength(deltaX);
setState(() {});
}
},
Is this due to the complexity of my model? How can I solve this problem?
The text was updated successfully, but these errors were encountered:
Description
I have created four models: appModel, TrackModel, ClipModel, and NoteModel, which are nested (Details are in my repositories: editor_demo.). When I use methods in ClipModel to update data within ClipModel, the UI is not updated.
At line 54 in lib/views/track_view.dart of the repository editor_demo, the UI can be updated normally.
However, at line 46 in lib/views/track_view.dart of the repository editor_demo, the UI does not update normally. I have to use setState to force an update.
Is this due to the complexity of my model? How can I solve this problem?
The text was updated successfully, but these errors were encountered: