我的回復:
print(response.body);
我/撲(31140): {"code":99,"email":"[email protected]"}
如何僅列印code或email
我/撲(31140): {"code":99}
uj5u.com熱心網友回復:
我認為您可以使用 dart:convert 庫中的 jsonDecode 函式
import 'dart:convert';
Map<String, dynamic> myResponse= jsonDecode(response.body);
print('Code: ${myResponse['code']} Email: ${myResponse['email']} ');
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/354856.html
上一篇:如何為文本設定多行?
