Firestore - How to decrement integer value atomically in database? : <p>Firestore has recently launched a new feature to increment and decrement the integer values atomically.</p>

<p>I can increment the integer value using</p>

<p>For instance,
    <code>FieldValue.increment(50)</code></p>

<p>But how to decrement ?</p>

<p>I tried using <code>FieldValue.decrement(50)</code>
But there is no method like decrement in FieldValue.</p>

<p>It's not working.</p>

<p><a href="https://firebase.googleblog.com/2019/03/increment-server-side-cloud-firestore.html?linkId=65365800&amp;m=1" rel="noreferrer">https://firebase.googleblog.com/2019/03/increment-server-side-cloud-firestore.html?linkId=65365800&amp;m=1</a></p>
