Skip to content

Commit

Permalink
[web] Migrate Flutter Web to JS static interop - 13. (flutter#32660)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshualitt authored Apr 25, 2022
1 parent c418472 commit f1bb8f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/web_ui/lib/src/engine/js_interop/js_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ external DidCreateEngineInitializerFn? get didCreateEngineInitializer;
/// and run a Flutter Web app, from JavaScript.
@JS()
@anonymous
@staticInterop
abstract class FlutterEngineInitializer{
external factory FlutterEngineInitializer({
required InitializeEngineFn initializeEngine,
Expand All @@ -59,6 +60,7 @@ abstract class FlutterEngineInitializer{
/// (when called from JS).
@JS()
@anonymous
@staticInterop
abstract class InitializeEngineFnParameters {
}

Expand All @@ -75,6 +77,7 @@ typedef ImmediateRunAppFn = Promise<FlutterApp> Function();
/// and returns a promise of a FlutterAppCleaner.
@JS()
@anonymous
@staticInterop
abstract class FlutterAppRunner {
/// Runs a flutter app
external factory FlutterAppRunner({
Expand All @@ -86,6 +89,7 @@ abstract class FlutterAppRunner {
/// runApp function of the FlutterAppRunner object (from JS).
@JS()
@anonymous
@staticInterop
abstract class RunAppFnParameters {
}

Expand All @@ -97,6 +101,7 @@ typedef RunAppFn = Promise<FlutterApp> Function([RunAppFnParameters?]);
/// A class that exposes the public API of a running Flutter Web App running.
@JS()
@anonymous
@staticInterop
abstract class FlutterApp {
/// Cleans a Flutter app
external factory FlutterApp();
Expand Down

0 comments on commit f1bb8f4

Please sign in to comment.