Skip to content

Instantly share code, notes, and snippets.

@rinukkusu
Created November 21, 2018 13:54
Show Gist options
  • Save rinukkusu/34c6937210422810b44f708731c9d2ff to your computer and use it in GitHub Desktop.
Save rinukkusu/34c6937210422810b44f708731c9d2ff to your computer and use it in GitHub Desktop.
Interop Example
<script>
window.callback = null;
function callCallback(e) {
callback(e);
}
</script>
<button onclick="callCallback()"></button>
import 'dart:js'
void main() {
context['callback'] = allowInterop((e) {
print(e);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment