rename constants (#1047)

pull/1052/head
Miguel Beltran 3 years ago committed by GitHub
parent 07e99272f3
commit 35713ac2d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -33,20 +33,20 @@ void main() {
runApp(const AnimationSamples()); runApp(const AnimationSamples());
} }
const double kWindowWidth = 480; const double windowWidth = 480;
const double kWindowHeight = 854; const double windowHeight = 854;
void setupWindow() { void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('Animation Samples'); setWindowTitle('Animation Samples');
setWindowMinSize(const Size(kWindowWidth, kWindowHeight)); setWindowMinSize(const Size(windowWidth, windowHeight));
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight)); setWindowMaxSize(const Size(windowWidth, windowHeight));
getCurrentScreen().then((screen) { getCurrentScreen().then((screen) {
setWindowFrame(Rect.fromCenter( setWindowFrame(Rect.fromCenter(
center: screen!.frame.center, center: screen!.frame.center,
width: kWindowWidth, width: windowWidth,
height: kWindowHeight, height: windowHeight,
)); ));
}); });
} }

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

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

@ -19,20 +19,20 @@ void main() {
runApp(const FormApp()); runApp(const FormApp());
} }
const double kWindowWidth = 480; const double windowWidth = 480;
const double kWindowHeight = 854; const double windowHeight = 854;
void setupWindow() { void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('Form Samples'); setWindowTitle('Form Samples');
setWindowMinSize(const Size(kWindowWidth, kWindowHeight)); setWindowMinSize(const Size(windowWidth, windowHeight));
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight)); setWindowMaxSize(const Size(windowWidth, windowHeight));
getCurrentScreen().then((screen) { getCurrentScreen().then((screen) {
setWindowFrame(Rect.fromCenter( setWindowFrame(Rect.fromCenter(
center: screen!.frame.center, center: screen!.frame.center,
width: kWindowWidth, width: windowWidth,
height: kWindowHeight, height: windowHeight,
)); ));
}); });
} }

@ -17,20 +17,20 @@ void main() {
runApp(const MyApp()); runApp(const MyApp());
} }
const double kWindowWidth = 480; const double windowWidth = 480;
const double kWindowHeight = 854; const double windowHeight = 854;
void setupWindow() { void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('Infinite List'); setWindowTitle('Infinite List');
setWindowMinSize(const Size(kWindowWidth, kWindowHeight)); setWindowMinSize(const Size(windowWidth, windowHeight));
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight)); setWindowMaxSize(const Size(windowWidth, windowHeight));
getCurrentScreen().then((screen) { getCurrentScreen().then((screen) {
setWindowFrame(Rect.fromCenter( setWindowFrame(Rect.fromCenter(
center: screen!.frame.center, center: screen!.frame.center,
width: kWindowWidth, width: windowWidth,
height: kWindowHeight, height: windowHeight,
)); ));
}); });
} }

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

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

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

@ -20,20 +20,20 @@ void main() {
runApp(const MyApp()); runApp(const MyApp());
} }
const double kWindowWidth = 400; const double windowWidth = 400;
const double kWindowHeight = 800; const double windowHeight = 800;
void setupWindow() { void setupWindow() {
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
setWindowTitle('Provider Demo'); setWindowTitle('Provider Demo');
setWindowMinSize(const Size(kWindowWidth, kWindowHeight)); setWindowMinSize(const Size(windowWidth, windowHeight));
setWindowMaxSize(const Size(kWindowWidth, kWindowHeight)); setWindowMaxSize(const Size(windowWidth, windowHeight));
getCurrentScreen().then((screen) { getCurrentScreen().then((screen) {
setWindowFrame(Rect.fromCenter( setWindowFrame(Rect.fromCenter(
center: screen!.frame.center, center: screen!.frame.center,
width: kWindowWidth, width: windowWidth,
height: kWindowHeight, height: windowHeight,
)); ));
}); });
} }

Loading…
Cancel
Save