Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[study] refactor: make EngineLines independent of AnalysisController #1063

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

tom-anders
Copy link
Contributor

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 and StudyController derive from, but as discussed we won't do that for now)

@veloce
Copy link
Contributor

veloce commented Oct 3, 2024

I have now an example of Notifier mixin:

mixin PreferencesStorage<T extends SerializablePreferences> {

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.

@tom-anders
Copy link
Contributor Author

I have now an example of Notifier mixin:

mixin PreferencesStorage<T extends SerializablePreferences> {

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.

lib/src/view/engine/engine_lines.dart Outdated Show resolved Hide resolved
lib/src/view/engine/engine_lines.dart Outdated Show resolved Hide resolved
@veloce veloce merged commit 1b90da9 into lichess-org:main Oct 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants