mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 06:18:49 +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:
@@ -3,5 +3,3 @@ library;
|
||||
|
||||
export 'js_interop/counter_state_manager.dart';
|
||||
export 'js_interop/helper.dart' show broadcastAppEvent;
|
||||
|
||||
export 'dart:js_interop' show createJSInteropWrapper;
|
||||
|
||||
@@ -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