fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.

Home Page:https://fzyzcjy.github.io/flutter_rust_bridge/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ability for using freezed to generate classes

jquesada2016 opened this issue · comments

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently, it seems like only sum-type enums are using @freezed to generate their classes. It would be really nice if we could opt in to using @freezed for other transferable classes, mostly to get the nice codegen that comes with the copyWith() method.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Add something like #[frb(freezed)].

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

N/A

Additional context
Add any other context or screenshots about the feature request here.

N/A

Nevermind, I just found this.

Can we please get a link to these docs in the docs.rs documentation? I always have to hunt down the link in the github repo

Can we please get a link to these docs in the docs.rs documentation? I always have to hunt down the link in the github repo

Sure! Where do you think we should put it?

It could be one of the first things at the top of the crate's docs as well as in the attribute macro's docs. There it says to go read the docs but doesn't say where to find them :p

Good idea, feel free to PR for the doc!