windowingOwner property

  1. @internal
WindowingOwner get windowingOwner

The WindowingOwner is responsible for creating and managing BaseWindowControllers.

The default WindowingOwner supports macOS, Linux, and Windows.

A custom WindowingOwner can be provided by the setter.

Do not use this API in production applications or packages published to pub.dev. Flutter will make breaking changes to this API, even in patch versions.

This API throws an UnsupportedError error unless Flutter’s windowing feature is enabled by isWindowingEnabled.

See: https://github.com/flutter/flutter/issues/30701.

Implementation

@internal
WindowingOwner get windowingOwner {
  if (!isWindowingEnabled) {
    throw UnsupportedError('''
Windowing APIs are not enabled.

Windowing APIs are currently experimental. Do not use windowing APIs in
production applications or plugins published to pub.dev.

To try experimental windowing APIs:
1. Switch to Flutter's main release channel.
2. Turn on the windowing feature flag.

See: https://github.com/flutter/flutter/issues/30701.
''');
  }
  return _windowingOwner;
}
  1. @internal
set windowingOwner (WindowingOwner owner)

Sets the WindowingOwner.

The default WindowingOwner supports macOS, Linux, and Windows.

This setter can be used to provide a custom WindowingOwner.

Do not use this API in production applications or packages published to pub.dev. Flutter will make breaking changes to this API, even in patch versions.

This API throws an UnsupportedError error unless Flutter’s windowing feature is enabled by isWindowingEnabled.

See: https://github.com/flutter/flutter/issues/30701.

Implementation

@internal
set windowingOwner(WindowingOwner owner) {
  if (!isWindowingEnabled) {
    throw UnsupportedError('''
Windowing APIs are not enabled.

Windowing APIs are currently experimental. Do not use windowing APIs in
production applications or plugins published to pub.dev.

To try experimental windowing APIs:
1. Switch to Flutter's main release channel.
2. Turn on the windowing feature flag.

See: https://github.com/flutter/flutter/issues/30701.
''');
  }
  _windowingOwner = owner;
}