mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-06-02 07:47:08 +08:00
refactor(many files): 页面部分的文件结构调整
1.views 文件夹里面分类,页面相关文件;2.公共组件全部放在components里;3.创建resources文件夹放置资源dart文件4.修改二级菜单文字大小 BREAKING CHANGE: 重构,建议删除本地db,再编译
This commit is contained in:
17
lib/utils/net_utils.dart
Normal file
17
lib/utils/net_utils.dart
Normal file
@ -0,0 +1,17 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'dart:async';
|
||||
|
||||
var dio = new Dio();
|
||||
|
||||
class NetUtils {
|
||||
|
||||
static Future get(String url,{Map<String,dynamic> params}) async{
|
||||
var response = await dio.get(url, data: params);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
static Future post(String url,Map<String,dynamic> params) async{
|
||||
var response = await dio.post(url, data: params);
|
||||
return response.data;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user