Relabel JSFunction as JSExportedDartFunction (#125453)

toDart exists on the latter, not the former.

Fixing https://github.com/flutter/flutter/pull/125220.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
This commit is contained in:
Srujan Gaddam 2023-04-25 12:19:33 -07:00 committed by GitHub
parent 4dddac97f9
commit 829a2d07ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@ class TestHttpRequest {
JSVoid addEventListener(JSString type, DomEventListener listener) {
if (type.toDart == mockEvent?.type) {
final DartDomEventListener dartListener =
(listener as JSFunction).toDart as DartDomEventListener;
(listener as JSExportedDartFunction).toDart as DartDomEventListener;
dartListener(mockEvent!.event);
}
}