Skip to content
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

fix: future must not be created during build #250

Merged
merged 4 commits into from
Dec 13, 2024
Merged

Conversation

boxdot
Copy link
Collaborator

@boxdot boxdot commented Dec 12, 2024

No description provided.

The `UserCubit` is accessible in the whole app, after a user is loaded.
All widgets that access the user information e.g. their user name or
profile, are doing it via the `UserCubit`. In particular, it makes them
stateless and they automatically re-rendered when the user information
is changed.

Implementation details:

The cubit is implemented on the Rust side, and
is exposed to Flutter via frb. On the Flutter side, the `UserCubit` is a
wrapper around the `UserCubit` in Rust. Currently, it is not possible to
require that a from-Rust generated class in Dart impements a specific
interface. When this will be possible, the wrapper can be removed. ([1])

Also:
* rename `ObservableUser` to `LoadableUserCubit`
* CI: don't flutter clean and pub get in `just frb-generate`

[1]: #248
@boxdot boxdot added bug Something isn't working app App related issues labels Dec 12, 2024
Base automatically changed from dima/user-rust-cubit to main December 12, 2024 18:57
@boxdot boxdot merged commit 5d8af9b into main Dec 13, 2024
8 checks passed
@boxdot boxdot deleted the dima/fix-future-builder branch December 13, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app App related issues bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants