-
Notifications
You must be signed in to change notification settings - Fork 304
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
[ui_state] Not working properly #2440
Comments
Hi! Thanks for opening your first issue here! 😄 |
Hi, according to the demo
instead of
|
The code I generated using the latest version of flutter_rust_bridge_codegen abstract class RustState implements RustOpaqueInterface {
int get count;
set count(int count);
Future<void> increment();
// HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class.
static Future<RustState> newInstance() =>
RustLib.instance.api.crateApiSimpleRustStateNew();
Future<void> setBaseState({required BaseRustState baseState});
}
abstract class RustState implements RustOpaqueInterface {
int get count;
set count(int count);
void increment();
factory RustState() => RustLib.instance.api.crateAppRustStateNew();
void setBaseState({required BaseRustState baseState});
} |
Not very sure about your question in the latest reply, but I mean your own code maybe need to remove that |
Please delete my question completely, thank you. |
No worries, everyone asks naive questions when starting programming! |
|
Yes, indeed both manually and automatically (via CI). The CI tests the code for each commit, e.g. flutter_rust_bridge/.github/workflows/ci.yaml Line 435 in 3eeaa96
If you find any issues running the command, it is suggested to create an issue with detailed error logs or minimal reproducible sample.
I never claim my code is "great". It is because you mentioned deleting your question completely that I guess you thought your question was too naive and I hope to make you not felt that, thus I said the "naive question" thing. In addition, it is true that new learners often ask naive questions, and some people even claim there are no dumb questions.
It is confusing what do you mean by "match". Surely the quickstart and the rust_ui_counter are different demos, so the code should be different. |
If only you had written the code with half the focus you have in your replies, you don't even bother to validate the questions, there is no point in picking on my words, I translated it through a machine, are you fighting with the translator? Good luck to you and your project! |
To be honest, I spent a large amount of time writing the code - which can be clearly seen from git commit history, much more than handling GitHub replies.
It seems I have already answer your question here, and I am not sure what your further reply asks (thus I said "not very sure about your question in the latest reply ..."). Maybe add a few sentences describing what makes you confused may help. For example, what error do you see, etc. Only pasting two code snippets and expect a busy and tired programmer (me) to guess what you mean may not seem to super ideal.
I am not picking on any words. As mentioned above, since you mentioned you wanted to delete the whole question, I am worried whether you felt the question is too easy and thus want to remove it from your thread history, and thus wanted to comfort you. Not sure what your machine translation convert my sentences to. |
I hope you stay confident. |
Class 'Future<RustState>' has no instance method 'setBaseState'. Receiver: Instance of 'Future<RustState>' Tried calling: setBaseState(baseState: Instance of 'BaseRustStateImpl')
The text was updated successfully, but these errors were encountered: