rand dart fix

This commit is contained in:
2026-01-15 17:36:22 -08:00
parent dbbdafd893
commit 91e7e39fe8
131 changed files with 976 additions and 1365 deletions
@@ -10,17 +10,9 @@ void newWindow(
}) {
final screen = html.window.screen;
double top = 0;
if (dy != null) {
top = dy;
} else if (screen.height != null) {
top = (screen.height - height) / 2;
}
top = dy;
double left = 0;
if (dx != null) {
left = dx;
} else if (screen.width != null) {
left = (screen.width - width) / 2;
}
left = dx;
final sb = StringBuffer();
sb.write("height=");
sb.write(height);
@@ -64,8 +64,6 @@ class NewWindow {
}
static NewWindow fromMap(Map<String, dynamic> map) {
if (map == null) return null;
return NewWindow(
url: map['url'],
width: map['width'],
@@ -114,8 +112,8 @@ void createWindow(NewWindow window) {
window.url,
window.width,
window.height,
dx: window?.offsetX,
dy: window?.offsetY,
name: window?.name,
dx: window.offsetX,
dy: window.offsetY,
name: window.name,
);
}
+2 -2
View File
@@ -84,10 +84,10 @@ class _MyAppState extends State<MyApp> {
final height = size.height;
final width = size.width;
final sb = StringBuffer();
final top = offset?.dy ??
final top = offset.dy ??
(screen.height != null ? (screen.height - height) / 2 : 0);
final left =
offset?.dx ?? (screen.width != null ? (screen.width - width) / 2 : 0);
offset.dx ?? (screen.width != null ? (screen.width - width) / 2 : 0);
sb.write("height=");
sb.write(height);
sb.write(",width=");