1
0
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:
Miguel Beltran
2022-03-08 02:08:53 +01:00
committed by GitHub
parent 07e99272f3
commit 35713ac2d9
9 changed files with 39 additions and 39 deletions

View File

@@ -33,20 +33,20 @@ void main() {
runApp(const AnimationSamples());
}
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('Animation 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,
));
});
}

View File

@@ -44,13 +44,13 @@ void main() {
);
}
const double kWindowWidth = 1024;
const double kWindowHeight = 800;
const double windowWidth = 1024;
const double windowHeight = 800;
void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized();
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
setWindowMinSize(const Size(windowWidth, windowHeight));
}
}

View File

@@ -44,13 +44,13 @@ void main() {
);
}
const double kWindowWidth = 1024;
const double kWindowHeight = 800;
const double windowWidth = 1024;
const double windowHeight = 800;
void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized();
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
setWindowMinSize(const Size(windowWidth, windowHeight));
}
}

View File

@@ -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,
));
});
}

View File

@@ -17,20 +17,20 @@ void main() {
runApp(const MyApp());
}
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('Infinite List');
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,
));
});
}

View File

@@ -31,14 +31,14 @@ void main() {
);
}
const double kWindowWidth = 1024;
const double kWindowHeight = 800;
const double windowWidth = 1024;
const double windowHeight = 800;
void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('Isolate Example');
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
setWindowMinSize(const Size(windowWidth, windowHeight));
}
}

View File

@@ -14,14 +14,14 @@ void main() {
runApp(const MyApp());
}
const double kWindowWidth = 1200;
const double kWindowHeight = 800;
const double windowWidth = 1200;
const double windowHeight = 800;
void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('JSON Sample');
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
setWindowMinSize(const Size(windowWidth, windowHeight));
}
}

View File

@@ -15,13 +15,13 @@ void main() {
runApp(const GoodMyApp());
}
const double kWindowWidth = 400;
const double kWindowHeight = 400;
const double windowWidth = 400;
const double windowHeight = 400;
void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('Weather');
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
setWindowMinSize(const Size(windowWidth, windowHeight));
}
}

View File

@@ -20,20 +20,20 @@ void main() {
runApp(const MyApp());
}
const double kWindowWidth = 400;
const double kWindowHeight = 800;
const double windowWidth = 400;
const double windowHeight = 800;
void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('Provider Demo');
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,
));
});
}