flutter_overlay_window
flutter_overlay_window copied to clipboard
Overlay method channel isn't working
Strange I thought I saw this working fine before but I might be wrong. For me it currently throws:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method resizeOverlay on channel x-slayer/overlay)
Checked on latest stable and again on your example project.
I see the overlay channel is created referencing the engine cache from the overlay service window that gets invoked when the service is is called and running. I tried creating a new test channel in the overlay service onCreate() and it doesn't work either. Can anyone confirm its actually working their end?
AsyncSnapshot<bool?>(ConnectionState.done, null, MissingPluginException(No implementation found for method resizeOverlay on channel x-slayer/overlay), #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7)
resolve with: @override Widget build(BuildContext context) { return FutureBuilder<bool?>( future: FlutterOverlayWindow.isActive(), initialData: false, builder: ( BuildContext context, AsyncSnapshot<bool?> snapshot, ) { log("=====######^&&&%%%@@@@@@@@@===================== FlutterOverlayWindow 0 snapshot $snapshot"); if (snapshot.connectionState == ConnectionState.done && snapshot.data == true) { if (phoneStateClient?.callStatus == CALL_STATUS.CLIENT) { log("=====######^&&&%%%@@@@@@@@@===================== FlutterOverlayWindow 1 CALL_STATUS.CLIENT "); try { return FutureBuilder<bool?>( future: FlutterOverlayWindow.resizeOverlay(WindowSize.matchParent, 400), initialData: false, builder: ( BuildContext context, AsyncSnapshot<bool?> snapshot, ) { log("=====######^&&&%%%@@@@@@@@@===================== FlutterOverlayWindow 1 snapshot $snapshot"); if (snapshot.connectionState == ConnectionState.done && snapshot.data == true) { log("=====######^&&&%%%@@@@@@@@@===================== FlutterOverlayWindow return ClientWidget"); return ClientWidget( client: phoneStateClient!.client!, ); } else { log("=====######^&&&%%%@@@@@@@@@===================== FlutterOverlayWindow return SizedBox"); return const SizedBox(width: 0, height: 0); } }); } catch (e) { log("=====######^&&&%%%@@@@@@@@@===================== ERROR 2 $e"); } } else if (phoneStateClient?.callStatus == CALL_STATUS.NOT_CLIENT) { try { return NotClientWidget( client: phoneStateClient!.client!, ); } catch (e) { log("=====######^&&&%%%@@@@@@@@@===================== ERROR 3 $e"); } } else { try { closeWindows(); } catch (e) { log("=====######^&&&%%%@@@@@@@@@===================== ERROR 4 $e"); } } return const SizedBox(width: 0, height: 0); } else { log("=====######^&&&%%%@@@@@@@@@===================== FlutterOverlayWindow return SizedBox"); return const SizedBox(width: 0, height: 0); } });