[英]Flutter Dio multipart request image save name
我正在使用 Dio 撥打 API 電話。 我的問題是我從文件中選擇了一張圖片並將其命名為“path+flower.jpg”。 所以在 Multipart 請求中,我們有一個參數Filename 。 將圖像保存到 S3 時,圖像名稱 flower.png 或 flower_one.jpg 是什么? 謝 ...
[英]Flutter Dio multipart request image save name
我正在使用 Dio 撥打 API 電話。 我的問題是我從文件中選擇了一張圖片並將其命名為“path+flower.jpg”。 所以在 Multipart 請求中,我們有一個參數Filename 。 將圖像保存到 S3 時,圖像名稱 flower.png 或 flower_one.jpg 是什么? 謝 ...
[英]Same Quantity Problem in List Item in Flutter
如何專門更改每件商品的金額? 我在 Flutter 中使用 Bloc Pattern 和 Json。 每個元素在列表中是如何排列的? ...
[英]Flutter - How to read json object with two lists?
我有一個這樣的 json: } 基本上,object 中有 2 個列表。 我無法反序列化此數據。 如何反序列化此數據以獲得 2 個列表? 我需要根據公共 ID 獲取數據。 這是我目前擁有的(WIP): ...
[英]Flutter Dio helper post return null value
我使用 Fire Base 消息傳遞為另一台設備發送消息。 我得到了另一台設備的密鑰和令牌,但該帖子僅在 postman 中運行,並且我在我的設備上成功收到通知。 但是當我使用如下代碼時,它返回 null 值 為什么發送消息 Function 中的發布請求返回的值是 null。發布請求在 postm ...
[英]How to post a data using dio to an array wrapped inside a json and inside that array is also a json
如何使用 dio 將數據發布到包裹在 json 內的數組,並且該數組內也是一個 json。響應的結構如下所示: 我想將值發布到相關鍵內的 relatedTitle 和 relatedCaption。 請幫幫忙。 ...
[英]Post request successful but Dio throwing DioError code 500 and returning content-type: text/html;
我是迪奧的新手。 我正在嘗試調用 Api 來創建一個新用戶,當我調用這個 function createUser()時,用戶是在后端創建的,但是 Dio 拋出 DioError: 狀態代碼 500。這是 function: Future<User> createUser({ req ...
[英]how do i set an empty value if i don't fill image with file type lest the type is not null
當我不想包含文件類型圖像的圖像值但我總是得到 null 時,即使我已經為變量添加了 null 安全性,所以我可以將值發布到 api,所以總而言之我想如果我不填寫圖像,請將圖像文件設置為可選,這是我的代碼 這就是選擇圖像的方式 這就是我如何調用按鈕上的服務 如果我清空圖像,它會引發這樣的錯誤ente ...
[英]Connecting php mysql using dio with flutter
我想做的就是一個登錄屏幕,但我想用 dio 來做。 我將在下面分享我的代碼。 當我用 postman 測試 php 部分時,它工作正常,但我不能用 dio 發布。我在調試模式下運行它時看不到響應是什么。我沒有收到任何錯誤。我會很高興如果你幫忙這是我的 ILoginService 頁面 這是我的登錄 ...
[英]File upload works in Thunder Client and Chrome, but not Dio or MultipartRequest
我正在嘗試創建一個 flutter 應用程序,它允許用戶上傳圖像和所述圖像的簡短描述,如果我使用 Thunder Client 或 Chrome 測試我的服務器代碼,它運行良好,但如果我嘗試來自 Flutter 應用程序的 MultipartRequest 或 Dio,圖像似乎包含在文本字段列表中 ...
[英]I think parsing this type of json response is impossible in Dart. How can I convert this json to Dart Class?
API 給我 json 這樣的響應: 如您所見,這是一個對象列表。 我嘗試使用 quicktype 生成的 model 類像這樣解析它- 但它失敗了,因為每個對象都是不同類型的。 我想我必須將數組中的每個對象一個一個地轉換為 Dart 個類並將其添加到一個數組中。 所以我嘗試了這個(我正在使用 ...
[英]Type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>'
如何以列表的形式從看起來像http://lovemonster.my.id/hospital的模型中獲取數據到我的 BLoC 構建器? 我在獲取它時收到一條錯誤消息Type 'List<dynamic>' is not a subtype of type 'Map<String, ...
[英]Flutter Dio send multipart form with Text and Image array to PHP file on backend
我希望有一個人可以幫助我。 我的應用程序有問題,我無法將表單發送到后端並將數據保存到 mysql 數據庫。 我使用 Dio 和 Flutter 將表單發送到我的后端到一個 PHP 文件。 我可以發送多張圖片和文本,到目前為止一切正常。 問題是,正如我現在所寫的那樣,數據庫中為每個圖像保存了一行,即如 ...
[英]DioError HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: certificate has expired(handshake.cc:393))
E/flutter (17310): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: DioError [DioErrorType.other]: HandshakeException: Handsha ...
[英]Dio interceptor not working with dependency injection
我正在嘗試使用Retrofit作為我的遠程 API 客戶端。 我在我的項目中使用Injectable實現依賴注入,然后我像這樣注冊 Dio class。 請注意,我在 TSApiDio 的構造函數中注冊了我的LogInterceptor 。 這是日志攔截器。 然后我嘗試訪問 newsapi.org, ...
[英]Hi there,i have an error "'FutureOr<Response<dynamic>>', is a potentially non-nullable type."
我用我的 api 在 Dio 中調用 get 響應,但我不斷收到此錯誤“'FutureOr<Response>',是一個潛在的不可為空的類型。” 雖然我已經在我的 get api 函數中返回了一個 return 語句。 我向它添加了一個 return 語句,我現在很想降級 flutte ...
[英]What are the tasks we can perform using interceptors in flutter?
我對刷新令牌、訪問令牌等感到困惑。攔截器是否僅用於檢查身份驗證? 我在 inte.net 上找到這個? 你也能解釋一下嗎? 攔截器圖表: ...
[英]How to get Dio response
我通過使用它來使用dio我正在傳遞表單數據並獲得響應,但我無法將數據存儲到 object。請幫助我它在打印 response.data 時給出響應,但我不知道如何將響應存儲到object。 這是我的 json 文件jsonfile 這是我的 api 文件api 文件 } } 這是我的 model ...
[英]DioError [DioErrorType.other]: Converting object to an encodable object failed: Instance of 'DbApiClientRequest<Company, CompanyRegistration>'
Flutter, Dart, Dio, JsonSerialization 我收到錯誤的代碼塊: 響應 response = await Dio().post("https://10.0.2.2:44301/api/Company/companies", data: dbApiClientReq ...
[英]Unhandled exception: [type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'String']
這是我需要獲取數據的 json 甲酸鹽` ` json的model class這樣編碼 api 調用我使用了 DIO,方法是,這里我建立了一個連接 class,其中包含所有類型 api 調用的 dio 代碼` ` 我收到這個錯誤,我必須想辦法解決這個問題,但我為此嘗試了幾種解決方案 ...
[英]Tiva C Dio driver with AUTOSAR method
我的畢業設計部分是帶有 AUTOSAR 的 Tiva C MCU 的 DIO 驅動程序,我不知道從哪里開始以及如何開始。 鑒於我對 AUTOSAR 方法或 ARM (Tiva C) 配置一無所知,是否有任何有用的資源/材料可以幫助我實現這樣的事情? 提前致謝。 ...