mirror of
https://github.com/flutter/samples.git
synced 2026-04-20 14:03:38 +00:00
Clean up ng-flutter a bit (#2236)
No functional change, just while I was verifying it still works with the latest Angular releases, completed some cleanup as well.
This commit is contained in:
@@ -4,7 +4,8 @@ import 'package:web/web.dart';
|
||||
/// Locates the root of the flutter app (for now, the first element that has
|
||||
/// a flt-renderer tag), and dispatches a JS event named [name] with [data].
|
||||
void broadcastAppEvent(String name, JSObject data) {
|
||||
final HTMLElement? root = document.querySelector('[flt-renderer]') as HTMLElement?;
|
||||
final HTMLElement? root =
|
||||
document.querySelector('[flt-renderer]') as HTMLElement?;
|
||||
assert(root != null, 'Flutter root element cannot be found!');
|
||||
|
||||
final eventDetails = CustomEventInit(detail: data);
|
||||
|
||||
Reference in New Issue
Block a user