title: Type 'String' is not a subtype of type 'int' of 'index'
body: <p>My App can authenticate successfully when debugging against the Android emulator, but if I try to authenticate using debugging against the physical device (with same OS version), an error message appears after more than one minute waiting:</p>
  <blockquote>
  <p>Exception has occurred.</p>
  <p>_TypeError (type 'String' is not a subtype of type 'int' of 'index')</p>
  </blockquote>
  <p>The error message points to the following code:</p>
  <pre><code>        if (responseJson[AuthUtils.authTokenKey] != null) {
            AuthUtils.insertDetails(
                userNameController.text, passwordController.text, responseJson);
  ...
          } else {
  ...
          };
  </code></pre>
  <p>And in the DEBUG CONSOLE I get the following:</p>
  <blockquote>
  <p>I/flutter ( 9531): Auth: SocketException: OS Error: Connection timed
  out, errno = 110, address = example.com, port = 38975
  V/InputMethodManager( 9531): Starting input:
  tba=android.view.inputmethod.EditorInfo@4aece4e nm :
  example.com.todoapp ic=null</p>
  </blockquote>
  <p>Here is the screenshot:
  <a href="https://i.stack.imgur.com/gJuu4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gJuu4.png" alt="enter image description here" /></a></p>
  <p>What am I doing wrong here ?</p>