Cequiel Cequiel - 1 year ago 115
Dart Question

Dart: access the caller instance from a function

How could I access the "caller" instance from a function. The following code throws a syntax error:

// Error: Local variables cannot be referenced before they are declared
Function listener = (Event event) {

I would like to access the "listener" variable from inside the function. Thanks.

Answer Source
Function listener;
listener = (Event event) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download