addWindow method

dynamic addWindow({
  1. required String title,
  2. required Widget body,
  3. Alignment? parentWidgetAlignment,
  4. double? minWidth,
  5. double? minHeight,
  6. double? width,
  7. double? height,
  8. double? placementPadding,
  9. double? x,
  10. double? y,
  11. Color? headerColor,
  12. Color? bodyColor,
})

Implementation

addWindow({
  required String title,
  required Widget body,
  Alignment? parentWidgetAlignment,
  double? minWidth,
  double? minHeight,
  double? width,
  double? height,
  double? placementPadding,
  double? x,
  double? y,
  Color? headerColor,
  Color? bodyColor,
}) {
  final windowState = WindowState(
    key: UniqueKey(),
    config: config,
    title: title,
    body: body,
    headerColor: headerColor,
    bodyColor: bodyColor,
    minWidth: minWidth,
    minHeight: minHeight,
    height: height,
    width: width,
    x: x,
    y: y,
  );

  _windows.add(windowState);
  notifyListeners();
}