摘要: 记录一下,在使用异步操作时,将方法当参数传入回调的使用。 static void Get(String path,{data,success,error}){ success('wo shi 数据'); }//success为传入的方法 DioUtil.Get('path',success: (da 阅读全文
posted @ 2021-01-18 18:53 淡然吖 阅读(2521) 评论(0) 推荐(0) 编辑
摘要: 引入包 import 'dart:convert'; 此包为系统自带。 使用: Map map = {"user":"张三","age":13}; var data = json.encode(map);//将map数据转换为json字符串 String jsonStr = '{"user":"zh 阅读全文
posted @ 2021-01-18 10:36 淡然吖 阅读(4330) 评论(0) 推荐(0) 编辑