Skip to content

Instantly share code, notes, and snippets.

@lmzach09
Created August 6, 2019 02:08
Show Gist options
  • Save lmzach09/b3a7dfd68995deb59ab2fa6dea2f84ed to your computer and use it in GitHub Desktop.
Save lmzach09/b3a7dfd68995deb59ab2fa6dea2f84ed to your computer and use it in GitHub Desktop.
This Dart main function kicks off an async function to set up a second thread using the Isolate class.
void main() async {
SendPort mainToIsolateStream = await initIsolate();
mainToIsolateStream.send('This is from main()');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment