title: Access argument data in Kotlin from Flutter's Method channel
body: <p>I have setup a basic Method channel in flutter and Kotlin.</p>
  
  <p>Following is my sample data: </p>
  
  <pre><code>{    
      "user_dob":"15 November 1997", 
      "user_description":"Hello there, I am a User!", 
      "user_gender":"Male", 
      "user_session":"KKDSH3G9OJKJFIHXLJXUGWIOG9UJKLJ98WHIJ"
  }
  </code></pre>
  
  <p>Following method channel can pass the data to Kotlin side from Flutter:</p>
  
  <pre><code>var result = await platform.invokeMethod('updateProfile', data);
  </code></pre>
  
  <p>Following code catches the data in Kotlin: </p>
  
  <pre><code>MethodChannel(flutterView, channel).setMethodCallHandler { call, result -&gt;
        if(call.method == "updateProfile"){
          var argData = call.arguments
  ...
  </code></pre>
  
  <p>Now,<code>argData</code> contains the data I just sent,
  and two questions come up:</p>
  
  <ol>
  <li><p>How do I access data from <code>argdata</code>? for.eg. </p></li>
  <li><p>How do I get my <code>user_dob</code> from this <code>argData</code>?</p></li>
  </ol>
  
  <p>Following code is my current solution.</p>
  
  <pre><code>val userDOB : String = call.argument("user_dob")
  </code></pre>
  
  <p>But the following error is thrown: <code>Kotlin: Type mismatch: inferred type is String? but String was expected</code></p>
  
  <blockquote>
    <p>Note: When I was sending the map data to the MethodChannel, it was accidentally being sent as a String. To follow <strong>THIS</strong> method through, please make sure that a Map object is implemented in passing the data.</p>
  </blockquote>