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
right now, things like TextField and NavigationSplitView depends on TextController and ValueNotifier. ik this is a rewrite of flutter in swift, but wouldn't it be better to replace them with something like @State or Observation Framework...
The text was updated successfully, but these errors were encountered:
Totally agree with you that something like @State is absolutely better.
Currently things like "TextController" are intentionally kept to make it easier to port Flutter framework code to Shaft.
And there is some challenges in adopting @State. As far as I know the SwiftUI @State is implemented with some internal APIs and memory hacks that can be complex to replicate.
I'm actively exploring potential workarounds for this. And any suggestions would be greatly appreciated.
// State management example from the site:
structSearchView:View{@Stateprivatevarcount=0varview:Body{Button(icon:.minus){
count -=1}Text("\(count)")Button(icon:.plus){
count +=1}}}
It's part of the Aparoksha project for cross-platform apps that uses native widgets, but it could be beneficial to share code that is important regardless of how widgets are rendered.
right now, things like TextField and NavigationSplitView depends on TextController and ValueNotifier. ik this is a rewrite of flutter in swift, but wouldn't it be better to replace them with something like @State or Observation Framework...
The text was updated successfully, but these errors were encountered: