Skip to content

Instantly share code, notes, and snippets.

@juskek
Created August 19, 2021 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juskek/19f09cc82871a2b63445f2460a5de16f to your computer and use it in GitHub Desktop.
Save juskek/19f09cc82871a2b63445f2460a5de16f to your computer and use it in GitHub Desktop.
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