e00c39aa5f
Flutter's safe area leaves out the window controls of a windowed iPad app, so they covered the list pane's title pill and took its taps. A small Runner plugin reports their corner from UIKit's corner-adapted safe-area regions over a method channel, and SegmentedBar pads the side they overlap. No-op off iOS and when there are no controls.
20 lines
696 B
Swift
20 lines
696 B
Swift
import Flutter
|
|
import UIKit
|
|
|
|
@main
|
|
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
|
override func application(
|
|
_ application: UIApplication,
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
) -> Bool {
|
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
}
|
|
|
|
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
|
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
|
if let registrar = engineBridge.pluginRegistry.registrar(forPlugin: "WindowControlsPlugin") {
|
|
WindowControlsPlugin.register(with: registrar)
|
|
}
|
|
}
|
|
}
|