title: How to pass variable from flutter to native objective c
body: <p>I have found plenty of information on passing data from flutter to android using method channel but none for objective c. I understand calling functions, but not passing data. Below is an example of what I have.</p>
  
  <pre><code>  Future&lt;void&gt; _uploadImage(String filePath) async {
      try {
        await platform.invokeMethod('uploadImage', {"filePath": filePath});
      } on PlatformException catch (e) {
        print("Failed to get token: '${e.message}'.");
      }
    }
  </code></pre>
  
  <pre><code>else if([@"uploadImage" isEqualToString:call.method]){
        DBUserClient *client = [DBClientsManager authorizedClient];
        NSString *filePath = call.arguments(@"filePath");
        NSLog(filePath, result);
        NSData *fileData = [filePath dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
  
      [[[client.filesRoutes uploadData:filePath inputData:fileData]
        setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) {
            if (result)
            {
                NSLog(@"%@\n", result);
            } else
            {
                NSLog(@"%@\n%@\n", routeError, networkError);
            }
        }] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) {
            NSLog(@"\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded);
        }];
      }
  
      else{
        result(FlutterMethodNotImplemented);
      }
  }];
    return [super application:application didFinishLaunchingWithOptions:launchOptions];
  }
  </code></pre>
  
  <p>To clarify, the bottom set of code written in objective-c is definitely not correct, but I've been trying to piece it out. I have the images path and I am trying to upload it to Dropbox. Main issue is that the filePath is not reaching the method channel. NSString *filePath = call.arguments(@"filePath") isn't an actual function call.</p>