Closed tom-anders closed 1 month ago
I have now an example of Notifier mixin: https://github.com/lichess-org/mobile/blob/ef9fc55fdc08a606f26a7069140e73a1308c3e21/lib/src/model/settings/preferences_storage.dart#L15
We might eventually use this approach to share engine logic in different controllers. I'm not sure but I suspect it is not that easy to do.
I have now an example of Notifier mixin:
We might eventually use this approach to share engine logic in different controllers. I'm not sure but I suspect it is not that easy to do.
Ah that sounds very useful indeed, I'll see if I can use it in the study branch.
But I think for now it's safer to go with the callbacks, we can always refactor again later.
We'll want to reuse it for the study screen. It's easiest to remove the dependency from the widget for now (alternative would be to use an interface that both
AnalysisController
andStudyController
derive from, but as discussed we won't do that for now)