fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
4.29k stars 301 forks source link

Allow ui_state attribute to be used with arbitrary associated struct name #2337

Closed Vollbrecht closed 2 weeks ago

Vollbrecht commented 1 month ago

Is your feature request related to a problem? Please describe. Its not documented and non intuitive that the ui_state attribute can only be used with something that is exactly called RustState

Describe the solution you'd like Allow for arbitrary struct naming of a struct annotated with ui_state

Describe alternatives you've considered Warn the user if he uses the ui_state attribute on a struct that is not exactly RustState and document this implicit behavior.

fzyzcjy commented 1 month ago

Totally agree, we should support that! (Originally it was more like a quick demo so was quite minimal) Feel free to PR, alternatively I will work on it later (may not guarantee to be within days since this is related to experimental feature).

Btw possibly related: https://github.com/fzyzcjy/flutter_rust_bridge/issues/2307

github-actions[bot] commented 3 days ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.