title: What's the meaning of passing underscore _ "_" (_) when calling a function in dart/flutter?
body: <p>When reading dart code I often see some functions called with just an underscore _ parameter. It's bugging me out for some time now and since flutter has improved its analysis messages I have some clues... but I feel like I don't really grasp this concept :-(</p>
  
  <p>Yesterday I wrote the following for a test : </p>
  
  <pre><code>when(mockDevice.getLocalPath()).thenAnswer(() async =&gt; fileFolder);
  </code></pre>
  
  <p>and obtain the following analysis</p>
  
  <blockquote>
    <p>error: The argument type 'Future Function()' can't be assigned to the parameter type 'Future Function(Invocation)'. </p>
  </blockquote>
  
  <p>When adding underscore it's working perfectly.</p>
  
  <pre><code>when(mockDevice.getLocalPath()).thenAnswer((_) async =&gt; fileFolder);
  </code></pre>
  
  <p>The most frightenning example I meet come from provider package written by @remi rousselet</p>
  
  <pre><code>builder: (_, counter, __) =&gt; Translations(counter.value),
  </code></pre>
  
  <p>It's from the provider example : </p>
  
  <pre><code>Widget build(BuildContext context) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider(builder: (_) =&gt; Counter()),
        ProxyProvider&lt;Counter, Translations&gt;(
          builder: (_, counter, __) =&gt; Translations(counter.value),
        ),
      ],
      child: Foo(),
    );
  }
  
  class Translations {
    const Translations(this._value);
  
    final int _value;
  
    String get title =&gt; 'You clicked $_value times';
  }
  </code></pre>