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