registerOverlayUi method
Registers a custom overlay UI implementation with the platform.
This method must be called before showing the overlay to specify which Dart entrypoint function should be executed to build the overlay UI.
Parameters:
entrypointFunctionName: The name of the function that will be called to run the overlay UI (e.g., 'overlayMain')entrypointLibraryPath: The path to the Dart file containing the entrypoint function (e.g., 'package:my_app/overlay_ui.dart')
Implementation
@override
Future<void> registerOverlayUi({
required String entrypointFunctionName,
required String entrypointLibraryPath,
}) async {
await methodChannel.invokeMethod('registerOverlayUi', {
'entrypointFunctionName': entrypointFunctionName,
'entrypointLibraryPath': entrypointLibraryPath,
});
}