PacktPublishing / Building-Games-with-Flutter

Building Games with Flutter, published by Packt
MIT License
48 stars 27 forks source link

window comes from where? #4

Closed Narven closed 1 year ago

Narven commented 1 year ago

"window" is supose to come from where?

after 10 seconds of reading a book

https://github.com/PacktPublishing/Building-Games-with-Flutter/blob/main/chapter01/lib/main.dart#L40

JoRiviera commented 1 year ago

Hi there, I was puzzled at first too, it comes from the "dart:ui" import, must be some kind of global (I'm a Dart and Flutter Newbie) from this module.

pteale commented 1 year ago

Yes it's a global value passed to the fromWindow method, in this case used for calculating the screen dimensions