title: using Flutter to check a specific field value of a user
body: <p>how can i easily check a specific field - value of a relative user who has already been saved on firestore . so for example on firebase it has been recorded that the user's 'role'(field) is that of a 'client'(value)</p>
  <p>this is a code snippet i primarliry used to chek the user:</p>
  <pre><code> void checkRole(String name, String uid) async {
  await firestore.collection('users').doc(uid).get().then((role) {
    if (role.data()![&quot;client&quot;] == true) {
      print(&quot;true&quot;);
    } else {
      print(&quot;false&quot;);
    }
  });
  </code></pre>
  <p>im trying to call checkRole() on the snippet below , except I got an error saying &quot;2 positional argument(s) expected, but 0 found&quot;:</p>
  <pre><code>  InkWell(
              onTap: () =&gt; {authController.checkRole()},
              child: Padding(
                padding: const EdgeInsets.only(left: 13.0, top: 15.0),
                child: Row(
                  children: const [
                    Icon(
                      Icons.person,
                    ),
                    SizedBox(width: 9),
                    Text(
                      &quot;check role&quot;,
                      style: TextStyle(
                        fontSize: 16,
                      ),
                    ),
                  ],
                ),
              ),
            ),
  </code></pre>