title: 'TextStyle?' can't be assigned to the parameter type 'TextStyle'
body: <p>I am Getting this null safety error while working on my flutter app.</p>
  <pre><code>The argument type 'TextStyle?' can't be assigned to the parameter type 'TextStyle'.
  </code></pre>
  <p>Here is the code snippet that is throwing this error:</p>
  <pre class="lang-dart prettyprint-override"><code>ButtonStyle(textStyle: MaterialStateProperty.all&lt;TextStyle&gt;(Theme.of(context).textTheme.button))
  </code></pre>
  <p>VS Code suggest this solution to put not operator at the end of the argument.</p>
  <pre><code>ButtonStyle(textStyle: MaterialStateProperty.all&lt;TextStyle&gt;(Theme.of(context).textTheme.button!))
  </code></pre>
  <p><strong>Question:</strong> Is this a good practice to use <strong>!</strong> in my code and what other solutions are possible in this case?</p>