mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
rename constants (#1047)
This commit is contained in:
@@ -19,20 +19,20 @@ void main() {
|
||||
runApp(const FormApp());
|
||||
}
|
||||
|
||||
const double kWindowWidth = 480;
|
||||
const double kWindowHeight = 854;
|
||||
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(kWindowWidth, kWindowHeight));
|
||||
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight));
|
||||
setWindowMinSize(const Size(windowWidth, windowHeight));
|
||||
setWindowMaxSize(const Size(windowWidth, windowHeight));
|
||||
getCurrentScreen().then((screen) {
|
||||
setWindowFrame(Rect.fromCenter(
|
||||
center: screen!.frame.center,
|
||||
width: kWindowWidth,
|
||||
height: kWindowHeight,
|
||||
width: windowWidth,
|
||||
height: windowHeight,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user