Skip to content

Commit 35713ac

Browse files
rename constants (#1047)
1 parent 07e9927 commit 35713ac

9 files changed

Lines changed: 39 additions & 39 deletions

File tree

animations/lib/main.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ void main() {
3333
runApp(const AnimationSamples());
3434
}
3535

36-
const double kWindowWidth = 480;
37-
const double kWindowHeight = 854;
36+
const double windowWidth = 480;
37+
const double windowHeight = 854;
3838

3939
void setupWindow() {
4040
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
4141
WidgetsFlutterBinding.ensureInitialized();
4242
setWindowTitle('Animation Samples');
43-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
44-
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight));
43+
setWindowMinSize(const Size(windowWidth, windowHeight));
44+
setWindowMaxSize(const Size(windowWidth, windowHeight));
4545
getCurrentScreen().then((screen) {
4646
setWindowFrame(Rect.fromCenter(
4747
center: screen!.frame.center,
48-
width: kWindowWidth,
49-
height: kWindowHeight,
48+
width: windowWidth,
49+
height: windowHeight,
5050
));
5151
});
5252
}

desktop_photo_search/fluent_ui/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ void main() {
4444
);
4545
}
4646

47-
const double kWindowWidth = 1024;
48-
const double kWindowHeight = 800;
47+
const double windowWidth = 1024;
48+
const double windowHeight = 800;
4949

5050
void setupWindow() {
5151
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
5252
WidgetsFlutterBinding.ensureInitialized();
53-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
53+
setWindowMinSize(const Size(windowWidth, windowHeight));
5454
}
5555
}
5656

desktop_photo_search/material/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ void main() {
4444
);
4545
}
4646

47-
const double kWindowWidth = 1024;
48-
const double kWindowHeight = 800;
47+
const double windowWidth = 1024;
48+
const double windowHeight = 800;
4949

5050
void setupWindow() {
5151
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
5252
WidgetsFlutterBinding.ensureInitialized();
53-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
53+
setWindowMinSize(const Size(windowWidth, windowHeight));
5454
}
5555
}
5656

form_app/lib/main.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ void main() {
1919
runApp(const FormApp());
2020
}
2121

22-
const double kWindowWidth = 480;
23-
const double kWindowHeight = 854;
22+
const double windowWidth = 480;
23+
const double windowHeight = 854;
2424

2525
void setupWindow() {
2626
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
2727
WidgetsFlutterBinding.ensureInitialized();
2828
setWindowTitle('Form Samples');
29-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
30-
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight));
29+
setWindowMinSize(const Size(windowWidth, windowHeight));
30+
setWindowMaxSize(const Size(windowWidth, windowHeight));
3131
getCurrentScreen().then((screen) {
3232
setWindowFrame(Rect.fromCenter(
3333
center: screen!.frame.center,
34-
width: kWindowWidth,
35-
height: kWindowHeight,
34+
width: windowWidth,
35+
height: windowHeight,
3636
));
3737
});
3838
}

infinite_list/lib/main.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ void main() {
1717
runApp(const MyApp());
1818
}
1919

20-
const double kWindowWidth = 480;
21-
const double kWindowHeight = 854;
20+
const double windowWidth = 480;
21+
const double windowHeight = 854;
2222

2323
void setupWindow() {
2424
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
2525
WidgetsFlutterBinding.ensureInitialized();
2626
setWindowTitle('Infinite List');
27-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
28-
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight));
27+
setWindowMinSize(const Size(windowWidth, windowHeight));
28+
setWindowMaxSize(const Size(windowWidth, windowHeight));
2929
getCurrentScreen().then((screen) {
3030
setWindowFrame(Rect.fromCenter(
3131
center: screen!.frame.center,
32-
width: kWindowWidth,
33-
height: kWindowHeight,
32+
width: windowWidth,
33+
height: windowHeight,
3434
));
3535
});
3636
}

isolate_example/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ void main() {
3131
);
3232
}
3333

34-
const double kWindowWidth = 1024;
35-
const double kWindowHeight = 800;
34+
const double windowWidth = 1024;
35+
const double windowHeight = 800;
3636

3737
void setupWindow() {
3838
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
3939
WidgetsFlutterBinding.ensureInitialized();
4040
setWindowTitle('Isolate Example');
41-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
41+
setWindowMinSize(const Size(windowWidth, windowHeight));
4242
}
4343
}
4444

jsonexample/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ void main() {
1414
runApp(const MyApp());
1515
}
1616

17-
const double kWindowWidth = 1200;
18-
const double kWindowHeight = 800;
17+
const double windowWidth = 1200;
18+
const double windowHeight = 800;
1919

2020
void setupWindow() {
2121
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
2222
WidgetsFlutterBinding.ensureInitialized();
2323
setWindowTitle('JSON Sample');
24-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
24+
setWindowMinSize(const Size(windowWidth, windowHeight));
2525
}
2626
}
2727

null_safety/null_safe_app/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ void main() {
1515
runApp(const GoodMyApp());
1616
}
1717

18-
const double kWindowWidth = 400;
19-
const double kWindowHeight = 400;
18+
const double windowWidth = 400;
19+
const double windowHeight = 400;
2020

2121
void setupWindow() {
2222
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
2323
WidgetsFlutterBinding.ensureInitialized();
2424
setWindowTitle('Weather');
25-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
25+
setWindowMinSize(const Size(windowWidth, windowHeight));
2626
}
2727
}

provider_shopper/lib/main.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ void main() {
2020
runApp(const MyApp());
2121
}
2222

23-
const double kWindowWidth = 400;
24-
const double kWindowHeight = 800;
23+
const double windowWidth = 400;
24+
const double windowHeight = 800;
2525

2626
void setupWindow() {
2727
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
2828
WidgetsFlutterBinding.ensureInitialized();
2929
setWindowTitle('Provider Demo');
30-
setWindowMinSize(const Size(kWindowWidth, kWindowHeight));
31-
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight));
30+
setWindowMinSize(const Size(windowWidth, windowHeight));
31+
setWindowMaxSize(const Size(windowWidth, windowHeight));
3232
getCurrentScreen().then((screen) {
3333
setWindowFrame(Rect.fromCenter(
3434
center: screen!.frame.center,
35-
width: kWindowWidth,
36-
height: kWindowHeight,
35+
width: windowWidth,
36+
height: windowHeight,
3737
));
3838
});
3939
}

0 commit comments

Comments
 (0)