title: How to pass extra variable to callback function in Dart
body: <p>I need to access a variable from main in a callback function. Callback functions only have one parameter, Event. What would be preferred way to access a variable from callback, other than setting it as global variable? Is it possible to pass it to callback as an extra parameter?</p>