overrideStandardWindowButtonPosition static method
Future<bool>
overrideStandardWindowButtonPosition({
- required NSWindowButtonType buttonType,
- required Offset? offset,
Overrides the standard window button position of type buttonType
.
If offset
is null, resets the button position to the default.
Usage example:
WindowManipulator.overrideStandardWindowButtonPosition(
buttonType: NSWindowButtonType.closeButton,
offset: const Offset(20, 20));
// Moves close button 20 pixels to the right and down.
Implementation
static Future<bool> overrideStandardWindowButtonPosition(
{required NSWindowButtonType buttonType, required Offset? offset}) async {
await _completer.future;
return await _windowManipulatorMethodChannel
.invokeMethod('overrideStandardWindowButtonPosition', {
'buttonType': buttonType.name,
'offsetX': offset?.dx,
'offsetY': offset?.dy,
});
}