<p dir="auto">The following provider does not actually work:</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const fooToken = const OpaqueToken('fooToken');

Injector.resolveAndCreate([
  new Provider(fooToken, useFactory: () =&gt; 'Bar')
]);"><pre class="notranslate"><span class="pl-k">const</span> fooToken <span class="pl-k">=</span> <span class="pl-k">const</span> <span class="pl-c1">OpaqueToken</span>(<span class="pl-s">'fooToken'</span>);

<span class="pl-c1">Injector</span>.<span class="pl-en">resolveAndCreate</span>([
  <span class="pl-k">new</span> <span class="pl-c1">Provider</span>(fooToken, useFactory<span class="pl-k">:</span> () <span class="pl-k">=&gt;</span> <span class="pl-s">'Bar'</span>)
]);</pre></div>
<p dir="auto">Instead, it only works if you change the signature to</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new Provider(fooToken, useFactory: () =&gt; 'Bar', deps: const [])"><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-c1">Provider</span>(fooToken, useFactory<span class="pl-k">:</span> () <span class="pl-k">=&gt;</span> <span class="pl-s">'Bar'</span>, deps<span class="pl-k">:</span> <span class="pl-k">const</span> [])</pre></div>
<p dir="auto">Can the default be <code class="notranslate">deps: const []</code> instead of failing?</p>
<p dir="auto">The following fails<br>
const Binding(MyClass,toFactory: buildMyClass)</p>
<p dir="auto">The following is successful<br>
const Binding(MyClass,toFactory: buildMyClass, deps: const [])</p>
<p dir="auto">What is a valid use case for<br>
const Binding(MyClass,toFactory: buildMyClass, deps: null)?</p>