title: Flutter: Notification listener, how to make onNotification dynamic
body: <p>I am new to dart and hence flutter. I am using NotificationListener like this</p>
  
  <pre><code>   String x = a; // or could be x=b, x=c, etc, comes as function parameter 
      return NotificationListener(
            onNotification: onNotificationHandler,
            child: new ListView.builder(
                scrollDirection: Axis.horizontal,
                shrinkWrap: true,
                physics: const BouncingScrollPhysics(),
                 // other codes comes here
  </code></pre>
  
  <p>Problem,</p>
  
  <p>I want value of <code>onNotification</code> to be dynamic on the basis of the value of variable <code>x</code>
  Can anyone help me on this?</p>