Initial commit — DLS lab-app Flutter project

This commit is contained in:
egecankomur
2026-06-10 23:22:15 +03:00
commit d1acc1d367
225 changed files with 31294 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import Cocoa
import FlutterMacOS
class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
let flutterViewController = FlutterViewController()
// Center window with a sensible default size
let screenSize = NSScreen.main?.frame.size ?? CGSize(width: 1440, height: 900)
let windowWidth: CGFloat = min(1280, screenSize.width * 0.85)
let windowHeight: CGFloat = min(820, screenSize.height * 0.85)
let origin = CGPoint(
x: (screenSize.width - windowWidth) / 2,
y: (screenSize.height - windowHeight) / 2
)
let windowFrame = NSRect(origin: origin, size: CGSize(width: windowWidth, height: windowHeight))
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)
// Keep sidebar always visible desktop layout kicks in at 720px
self.minSize = CGSize(width: 880, height: 560)
self.titlebarAppearsTransparent = true
RegisterGeneratedPlugins(registry: flutterViewController)
super.awakeFromNib()
}
}