@override Future<void> attach() async { try { await methodChannel.invokeMethod('attach', {}); } on PlatformException catch (e) { throw Exception('Failed to register: ${e.message}'); } }