Created
August 19, 2021 16:02
-
-
Save juskek/19f09cc82871a2b63445f2460a5de16f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomGame extends Game { | |
Size? screenSize; | |
bool hasPressed; | |
// this will be CustomGame's resize function | |
@override | |
void resize (Size size) { | |
screenSize = size; // assign Game widget size to screenSize | |
super.resize(size); // call Game's resize function again | |
} | |
... // update and render functions | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment