removeMenuItem method
Removes a menu item by its ID.
itemId is the identifier of the menu item to remove.
Returns true if the menu item was successfully removed.
Implementation
@override
Future<bool> removeMenuItem(String itemId) async {
try {
final result = await methodChannel.invokeMethod<bool>(
'removeMenuItem',
<String, dynamic>{'itemId': itemId},
);
return result ?? false;
} on PlatformException catch (e) {
debugPrint('Error removing menu item: ${e.message}');
return false;
}
}