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

[FEATURE REQUEST] mixin on StatefulWidget #28

Open
lohnn opened this issue May 14, 2023 · 1 comment
Open

[FEATURE REQUEST] mixin on StatefulWidget #28

lohnn opened this issue May 14, 2023 · 1 comment
Labels
enhancement New feature or request integral_isolates_flutter Requires a Flutter specific package
Milestone

Comments

@lohnn
Copy link
Owner

lohnn commented May 14, 2023

It would be nice to be able to piggy back on the lifecycle of a StatefulWidget's state for handling the StatefulIsolate, like SingleTickerProviderStateMixin.

Describe the solution you'd like
Attaching a mixin on your StatefulWidget's state that creates and holds an Isolate and exposes it for running work on the isolate.
This mixin would handle lifecycle piggybacking on the State's initState and dispose functions.

Additional context
Naming is hard, the names I have come up with so far are probably not good for different reasons.

  • Reusing the name StatefulIsolate will probably end up in confusion, if even possible to implement.
  • Just use Isolate would look nice (class _MyWidgetState extends StatefulWidget<MyWidget> with Isolate) but would clash with the Isolate class from Dart.
@lohnn lohnn added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels May 14, 2023
@lohnn
Copy link
Owner Author

lohnn commented May 16, 2023

Realised that this would require a new package as integral_isolates does not (and should not) depend on Flutter, and hence removed the good first issue tag.

@lohnn lohnn added the integral_isolates_flutter Requires a Flutter specific package label Jan 15, 2024
@lohnn lohnn added this to the 1.1 milestone Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request integral_isolates_flutter Requires a Flutter specific package
Projects
None yet
Development

No branches or pull requests

1 participant