Skip to content

Is it possible to access the rootIsolateToken with WorkManager? #616

@kedaly

Description

@kedaly

I am struggling to figure out how to access the rootIsolateToken in WorkManger..

In a dart isolate in flutter I would pass it into the isolate using this code..

RootIsolateToken rootIsolateToken = RootIsolateToken.instance!; Isolate.spawn(_isolateMain, rootIsolateToken);

And this would allow me to access platform "plugins" within the isolate..

In the case of WorkManger, how would I achieve this?

Is this even possible? Would the case be that work manager tasks run without any connection to Flutter other than the Isolate NameServer?

Thank you in advance for any advice on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions