|
|
|
|
@ -7,7 +7,6 @@ import 'dart:io' show Platform;
|
|
|
|
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
|
import 'package:window_size/window_size.dart';
|
|
|
|
|
|
|
|
|
|
import 'src/autofill.dart';
|
|
|
|
|
import 'src/form_widgets.dart';
|
|
|
|
|
@ -16,31 +15,10 @@ import 'src/sign_in_http.dart';
|
|
|
|
|
import 'src/validation.dart';
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
|
setupWindow();
|
|
|
|
|
// Removed setupWindow() call
|
|
|
|
|
runApp(const FormApp());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const double windowWidth = 480;
|
|
|
|
|
const double windowHeight = 854;
|
|
|
|
|
|
|
|
|
|
void setupWindow() {
|
|
|
|
|
if (!kIsWeb &&
|
|
|
|
|
(Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
|
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
|
setWindowTitle('Form Samples');
|
|
|
|
|
setWindowMinSize(const Size(windowWidth, windowHeight));
|
|
|
|
|
setWindowMaxSize(const Size(windowWidth, windowHeight));
|
|
|
|
|
getCurrentScreen().then((screen) {
|
|
|
|
|
setWindowFrame(
|
|
|
|
|
Rect.fromCenter(
|
|
|
|
|
center: screen!.frame.center,
|
|
|
|
|
width: windowWidth,
|
|
|
|
|
height: windowHeight,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
final demos = [
|
|
|
|
|
Demo(
|
|
|
|
|
|