title: How to test MaterialStateProperty values?
body: <p>I have a button with a specific elevation, set as an argument:</p>
  <pre class="lang-dart prettyprint-override"><code>        child: ElevatedButton(
            key: const Key('MyButton'),
            onPressed: () {},
            child: Text('My Button'),
            style: ButtonStyle(
              elevation: MaterialStateProperty.all&lt;double&gt;(2.0),
                ),
              ), ...
  </code></pre>
  <p>I would like to test the elevation value. The snippet I've wrote is below:</p>
  <pre class="lang-dart prettyprint-override"><code>      final button = tester
            .widget&lt;ElevatedButton&gt;(find.byKey(Key('NewSessionsElevatedButton')));
        expect(button.style.elevation, MaterialStateProperty.all&lt;double&gt;(2.0));
  </code></pre>
  <p>However, the exception below is raised in the test, telling both values are equal, but it breaks anyway:</p>
  <pre class="lang-bash prettyprint-override"><code>══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
  The following TestFailure object was thrown running a test:
    Expected: _MaterialStatePropertyAll&lt;double&gt;:&lt;MaterialStateProperty.all(2.0)&gt;
    Actual: _MaterialStatePropertyAll&lt;double&gt;:&lt;MaterialStateProperty.all(2.0)&gt;
  </code></pre>
  <p>I've read the <a href="https://github.com/flutter/flutter/blob/87804363e4b5c9150eb19869a14319a622b79bc8/packages/flutter/test/material/material_state_property_test.dart" rel="nofollow noreferrer">tests</a> for this class in the repository, but they are not clear. How can I test <code>MaterialStateProperty</code> values?</p>