WindowConfig class

Configuration for window initialization.

Pass this to WindowPlugin to configure the initial window state.

// Fullscreen game
WindowPlugin(config: WindowConfig.fullscreen(title: 'My Game'))

// Borderless windowed
WindowPlugin(config: WindowConfig.borderless(title: 'My Game'))

// Custom windowed setup
WindowPlugin(config: WindowConfig(
  mode: WindowMode.windowed,
  title: 'My Game',
  windowedSize: Size(1920, 1080),
  minSize: Size(800, 600),
))

Constructors

WindowConfig({WindowMode mode = WindowMode.borderless, String title = 'Fledge Game', Size? windowedSize, Offset? windowedPosition, int? targetDisplay, Size? minSize, Size? maxSize, bool alwaysOnTop = false, bool resizable = true})
Creates a window configuration.
const
WindowConfig.borderless({String title = 'Fledge Game', int? targetDisplay})
Creates a borderless windowed configuration.
const
WindowConfig.fullscreen({String title = 'Fledge Game', int? targetDisplay})
Creates a fullscreen configuration.
const
WindowConfig.windowed({String title = 'Fledge Game', Size? size, Offset? position, Size? minSize, Size? maxSize, bool resizable = true})
Creates a windowed configuration with optional size.
const

Properties

alwaysOnTop bool
Whether the window should always be on top.
final
hashCode int
The hash code for this object.
no setterinherited
maxSize Size?
Maximum window size (for windowed mode).
final
minSize Size?
Minimum window size (for windowed mode).
final
mode WindowMode
Initial window mode.
final
resizable bool
Whether the window should be resizable in windowed mode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetDisplay int?
Target display index.
final
title String
Window title displayed in the title bar.
final
windowedPosition Offset?
Initial position for windowed mode.
final
windowedSize Size?
Initial size for windowed mode.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

defaultWindowedSize → const Size
Default size for windowed mode when no size is specified.