title: How to add headers to dio http request in Flutter
body: <p>I have this put request that sends a file to the server, it requires a token as part of the headers. Please how do I add this token to the header while using Dio().put to make my request?</p>
  <pre><code> Future&lt;String&gt; sendImage(File file) async {
      String token = storage.read('token');
      String fileName = file.path.split('/').last;
      FormData formData = FormData.fromMap({
        &quot;CustomerProfilePicture&quot;:
            await MultipartFile.fromFile(file.path, filename: fileName),
      });
      Response response =
          await Dio().put(
              '$BASE_URL/Customers/Picture', data: formData);
      return response.statusMessage;
    }
  </code></pre>