title: Flutter how to name a function then pass it through another function?
body: <p>I am brand new to Flutter and come from an Angular / React background.</p>
  <p>I am trying to find the correct syntax to store a function within a variable and pass that function to another function.</p>
  <p>Here is my code:</p>
  <p>The negativeBtnFunc is saying &quot;Expected to find '}'.&quot; but I don't see where I am missing that.</p>
  <p>The positiveBtnFunc seems to be working just fine.</p>
  <pre><code>onPressed: () {
      negativeBtnFunc() =&gt; {
          RouteGenerator().hasAcceptedTAndC = false;
          if (Platform.isAndroid) {
             SystemChannels.platform.invokeMethod('SystemNavigator.pop');
          } else if (Platform.isIOS) {
            exit(0);
          }
      };
      positiveBtnFunc() =&gt; {};
      return showAlertDialog(
             context,
             kTermsAlertTitle,
             kTermsAlertBody,
             kAlertPosOk,
             positiveBtnFunc,
             kAlertNegCloseApp,
             negativeBtnFunc
      );
   },
  </code></pre>