fzyzcjy / flutter_rust_bridge

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

Adding auto generation from Rust to Dart for toString() and compareTo() methods #1869

Closed VladTheJunior closed 1 month ago

VladTheJunior commented 1 month ago

Is your feature request related to a problem? Please describe. I can not find a way to override default Dart toString() and compareTo() method for my Rust struct that implements custom Display (or ToString) Eq, PartiqlEq, Ord, PartialOrd traits.

Describe the solution you'd like Adding auto generation of code for Display (or ToString) Eq, PartiqlEq, Ord, PartialOrd traits to Dart class

welcome[bot] commented 1 month ago

Hi! Thanks for opening your first issue here! :smile:

fzyzcjy commented 1 month ago

Currently you can provide arbitrary extra Dart code via https://cjycode.com/flutter_rust_bridge/guides/miscellaneous/dart-code.

Also related: https://cjycode.com/flutter_rust_bridge/guides/miscellaneous/eq-hash#custom-arbitrary

VladTheJunior commented 1 month ago

Thanks, it works!

fzyzcjy commented 1 month ago

You are welcome!

github-actions[bot] commented 3 weeks 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.