no message
This commit is contained in:
parent
5aaa4a0d64
commit
af286f8a2a
|
|
@ -42,3 +42,14 @@ app.*.map.json
|
|||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
/.fvm/flutter_sdk
|
||||
lib/common/api/retrofit_client.g.dart
|
||||
lib/common/job/user_info.g.dart
|
||||
lib/common/job/user_info.g.dart
|
||||
lib/common/job/user_login.g.dart
|
||||
lib/common/job/common/upload_img_secret_key.g.dart
|
||||
lib/common/job/common/base_structure_result.g.dart
|
||||
lib/common/job/common/base_page.g.dart
|
||||
lib/common/job/common/base_page_report.g.dart
|
||||
lib/common/job/common/base_page_data.g.dart
|
||||
lib/common/job/common/base_page_data_report.g.dart
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:dio/dio.dart' hide Headers;
|
||||
import 'package:retrofit/retrofit.dart';
|
||||
import 'package:school_asignment_app/common/job/common/base_structure_result.dart';
|
||||
|
||||
part 'retrofit_client.g.dart';
|
||||
|
||||
@RestApi(parser: Parser.JsonSerializable)
|
||||
@Headers(<String, dynamic>{"Content-Type": "application/json"})
|
||||
abstract class RetrofitClient {
|
||||
factory RetrofitClient(Dio dio, {String? baseUrl}) = _RetrofitClient;
|
||||
|
||||
@POST("/api/rbac/Auth/Login")
|
||||
Future<dynamic> toLogin(@Field() String account, @Field() String password);
|
||||
}
|
||||
|
|
@ -2,18 +2,18 @@ import 'package:school_asignment_app/common/job/user_info.dart';
|
|||
import 'package:school_asignment_app/common/request/rest_dio.dart';
|
||||
|
||||
import '../job/common/base_structure_result.dart';
|
||||
import 'retrofit_client.dart';
|
||||
|
||||
class UserApi{
|
||||
static Future<BaseStructureResult<dynamic>> toLogin({required String loginName, required String password}) async {
|
||||
var response = await RestDio.instance.post('/auth/login/exam-marking/user', data: {'loginName': loginName,'password': password});
|
||||
return BaseStructureResult.fromJson(response, (response) => response);
|
||||
}
|
||||
class UserApi {
|
||||
// static Future<BaseStructureResult<dynamic>> toLogin({required String loginName, required String password}) async {
|
||||
// var response = await RestDio.instance
|
||||
// .post('/auth/login/exam-marking/user', data: {'loginName': loginName, 'password': password});
|
||||
// return BaseStructureResult.fromJson(response, (response) => response);
|
||||
// }
|
||||
|
||||
// 获取用户信息
|
||||
static Future<BaseStructureResult<UserInfo>> getUserInfo() async {
|
||||
var response = await RestDio.instance.get('/auth/info/cur-user');
|
||||
return BaseStructureResult.fromJson(response, (response) => UserInfo.fromJson(response));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// // 获取用户信息
|
||||
// static Future<BaseStructureResult<UserInfo>> getUserInfo() async {
|
||||
// var response = await RestDio.instanime.get('/auth/info/cur-user');
|
||||
// return BaseStructureResult.fromJson(response, (response) => UserInfo.fromJson(response));
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* @Author: wangyang 1147192855@qq.com
|
||||
* @Date: 2022-07-13 11:28:23
|
||||
* @LastEditors: wangyang 1147192855@qq.com
|
||||
* @LastEditTime: 2022-09-14 11:17:20
|
||||
* @FilePath: \marking_app\lib\config\RequestConfig.dart
|
||||
* @Description: 请求工具类
|
||||
*/
|
||||
import 'package:school_asignment_app/common/job/common/base_page.dart';
|
||||
|
||||
class RequestConfig {
|
||||
static const _devBaseUrl = "https://dpc-teacher-api.23544.com"; // 开发
|
||||
static const _proBaseUrl = "https://dpc-teacher-api.23544.com"; // 生产
|
||||
|
||||
static RequestConfig? _instance;
|
||||
String baseUrl;
|
||||
|
||||
static const connectTimeout = 8000; // 连接超时
|
||||
static const receiveTimeout = 8000; // 接收超时
|
||||
static const bool requestDataPrinting = true; // 打印返回数据
|
||||
static const bool printSwitch = true; // 打印返回数据
|
||||
static const successCode = [204, 200]; // 返回成功code
|
||||
static final BasePage basePage = BasePage(1, 10); // 分页参数
|
||||
|
||||
// 私有化构造函数,防止外部直接实例化
|
||||
// 私有化构造函数,防止外部直接实例化
|
||||
RequestConfig._({required this.baseUrl});
|
||||
|
||||
factory RequestConfig() {
|
||||
if (_instance == null) {
|
||||
late String newBaseUrl;
|
||||
late String newBaseUrlOfReport;
|
||||
late String newLoginBaseUrl;
|
||||
|
||||
if (const bool.fromEnvironment('dart.vm.product'))
|
||||
newBaseUrl = _proBaseUrl; // 生产环境
|
||||
else
|
||||
newBaseUrl = _devBaseUrl; // 开发环境
|
||||
_instance = RequestConfig._(baseUrl: newBaseUrl);
|
||||
}
|
||||
return _instance!;
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:school_asignment_app/common/request/request_config.dart';
|
||||
import 'package:school_asignment_app/common/config/request_config.dart';
|
||||
|
||||
part 'base_structure_result.g.dart';
|
||||
|
||||
|
|
@ -33,6 +33,7 @@ class BaseStructureResult<T> extends Object {
|
|||
}) {
|
||||
success = (code == RequestConfig.successCode);
|
||||
}
|
||||
factory BaseStructureResult.fromJson(Map<String, dynamic> json, T Function(dynamic json) fromJsonT) => _$BaseStructureResultFromJson(json, fromJsonT);
|
||||
factory BaseStructureResult.fromJson(Map<String, dynamic> json, T Function(dynamic json) fromJsonT) =>
|
||||
_$BaseStructureResultFromJson(json, fromJsonT);
|
||||
Map<String, dynamic> toJson(Object Function(T value) toJsonT) => _$BaseStructureResultToJson(this, toJsonT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* @Author: wangyang 1147192855@qq.com
|
||||
* @Date: 2022-07-13 18:30:11
|
||||
* @LastEditors: wangyang 1147192855@qq.com
|
||||
* @LastEditTime: 2022-07-14 10:20:21
|
||||
* @FilePath: \marking_app\lib\common\model\common\base_structure_result.dart
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:school_asignment_app/common/request/request_config.dart';
|
||||
|
||||
part 'base_structure_result_report.g.dart';
|
||||
|
||||
@JsonSerializable(genericArgumentFactories: true, fieldRename: FieldRename.snake)
|
||||
class BaseStructureResultReport<T> extends Object {
|
||||
@JsonKey(name: 'success')
|
||||
bool success;
|
||||
|
||||
@JsonKey(name: 'Code')
|
||||
int code;
|
||||
|
||||
@JsonKey(name: 'Message')
|
||||
String? message;
|
||||
|
||||
@JsonKey(name: 'Data')
|
||||
T? data;
|
||||
|
||||
BaseStructureResultReport(
|
||||
this.code,
|
||||
this.message,
|
||||
this.data, {
|
||||
this.success = false,
|
||||
}) {
|
||||
success = (code == RequestConfig.successCode);
|
||||
}
|
||||
factory BaseStructureResultReport.fromJson(Map<String, dynamic> json, T Function(dynamic json) fromJsonT) => _$BaseStructureResultReportFromJson(json, fromJsonT);
|
||||
Map<String, dynamic> toJson(Object Function(T value) toJsonT) => _$BaseStructureResultReportToJson(this, toJsonT);
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'base_structure_result_report.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
BaseStructureResultReport<T> _$BaseStructureResultReportFromJson<T>(
|
||||
Map<String, dynamic> json,
|
||||
T Function(Object? json) fromJsonT,
|
||||
) =>
|
||||
BaseStructureResultReport<T>(
|
||||
json['Code'] as int,
|
||||
json['Message'] as String?,
|
||||
_$nullableGenericFromJson(json['Data'], fromJsonT),
|
||||
success: json['success'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BaseStructureResultReportToJson<T>(
|
||||
BaseStructureResultReport<T> instance,
|
||||
Object? Function(T value) toJsonT,
|
||||
) =>
|
||||
<String, dynamic>{
|
||||
'success': instance.success,
|
||||
'Code': instance.code,
|
||||
'Message': instance.message,
|
||||
'Data': _$nullableGenericToJson(instance.data, toJsonT),
|
||||
};
|
||||
|
||||
T? _$nullableGenericFromJson<T>(
|
||||
Object? input,
|
||||
T Function(Object? json) fromJson,
|
||||
) =>
|
||||
input == null ? null : fromJson(input);
|
||||
|
||||
Object? _$nullableGenericToJson<T>(
|
||||
T? input,
|
||||
Object? Function(T value) toJson,
|
||||
) =>
|
||||
input == null ? null : toJson(input);
|
||||
|
|
@ -1,53 +1,50 @@
|
|||
/*
|
||||
* @Author: wangyang 1147192855@qq.com
|
||||
* @Date: 2022-07-14 10:44:46
|
||||
* @LastEditors: wangyang 1147192855@qq.com
|
||||
* @LastEditTime: 2022-07-19 20:17:48
|
||||
* @FilePath: \marking_app\lib\common\model\user\user_info.dart
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'user_info.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class UserInfo extends Object {
|
||||
@JsonKey(name: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier')
|
||||
String nameidentifier;
|
||||
|
||||
@JsonSerializable(checked: true)
|
||||
class UserInfo extends Object {
|
||||
@JsonKey(name: 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname')
|
||||
String givenname;
|
||||
|
||||
@JsonKey(name: 'id')
|
||||
String id ='';
|
||||
@JsonKey(name: 'is_admin')
|
||||
String isAdmin;
|
||||
|
||||
@JsonKey(name: 'userName')
|
||||
String userName = '';
|
||||
@JsonKey(name: 'admit_year')
|
||||
String admitYear;
|
||||
|
||||
@JsonKey(name: 'loginName')
|
||||
String loginName = '';
|
||||
@JsonKey(name: 'nbf')
|
||||
int nbf;
|
||||
|
||||
@JsonKey(name: 'subjectIds')
|
||||
List<int> subjectIds = [];
|
||||
@JsonKey(name: 'exp')
|
||||
int exp;
|
||||
|
||||
@JsonKey(name: 'schoolId')
|
||||
int schoolId = 0;
|
||||
@JsonKey(name: 'iss')
|
||||
String iss;
|
||||
|
||||
@JsonKey(name: 'schoolName')
|
||||
String schoolName = '';
|
||||
@JsonKey(name: 'aud')
|
||||
String aud;
|
||||
|
||||
|
||||
@JsonKey(name: 'avatar')
|
||||
String avatar ='';
|
||||
|
||||
@JsonKey(name: 'positionNames')
|
||||
List<String> positionNames=[];
|
||||
|
||||
|
||||
UserInfo();
|
||||
UserInfo(
|
||||
this.nameidentifier,
|
||||
this.givenname,
|
||||
this.isAdmin,
|
||||
this.admitYear,
|
||||
this.nbf,
|
||||
this.exp,
|
||||
this.iss,
|
||||
this.aud,
|
||||
);
|
||||
|
||||
factory UserInfo.fromJson(Map<String, dynamic> srcJson) => _$UserInfoFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$UserInfoToJson(this);
|
||||
|
||||
bool isExpired() {
|
||||
int millisecondsSinceEpoch = DateTime.now().millisecondsSinceEpoch;
|
||||
return millisecondsSinceEpoch >= exp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'user_info.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
UserInfo _$UserInfoFromJson(Map<String, dynamic> json) => $checkedCreate(
|
||||
'UserInfo',
|
||||
json,
|
||||
($checkedConvert) {
|
||||
final val = UserInfo();
|
||||
$checkedConvert('id', (v) => val.id = v as String);
|
||||
$checkedConvert('userName', (v) => val.userName = v as String);
|
||||
$checkedConvert('loginName', (v) => val.loginName = v as String);
|
||||
$checkedConvert(
|
||||
'subjectIds',
|
||||
(v) => val.subjectIds =
|
||||
(v as List<dynamic>).map((e) => e as int).toList());
|
||||
$checkedConvert('schoolId', (v) => val.schoolId = v as int);
|
||||
$checkedConvert('schoolName', (v) => val.schoolName = v as String);
|
||||
$checkedConvert('avatar', (v) => val.avatar = v as String);
|
||||
$checkedConvert(
|
||||
'positionNames',
|
||||
(v) => val.positionNames =
|
||||
(v as List<dynamic>).map((e) => e as String).toList());
|
||||
return val;
|
||||
},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserInfoToJson(UserInfo instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'userName': instance.userName,
|
||||
'loginName': instance.loginName,
|
||||
'subjectIds': instance.subjectIds,
|
||||
'schoolId': instance.schoolId,
|
||||
'schoolName': instance.schoolName,
|
||||
'avatar': instance.avatar,
|
||||
'positionNames': instance.positionNames,
|
||||
};
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
import 'package:school_asignment_app/common/request/rest_dio.dart';
|
||||
import 'package:school_asignment_app/common/api/retrofit_client.dart';
|
||||
|
||||
mixin RequestToolMixin {
|
||||
RetrofitClient getClient() => RequestTool.instance.getClient();
|
||||
}
|
||||
|
|
@ -1,123 +1,47 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:dio/adapter.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
import 'package:school_asignment_app/common/request/request_config.dart';
|
||||
import 'package:school_asignment_app/common/store/app_storage_key.dart';
|
||||
import 'package:school_asignment_app/common/the_global.dart';
|
||||
import 'package:school_asignment_app/common/utils/storage.dart';
|
||||
import 'package:school_asignment_app/common/config/request_config.dart';
|
||||
import 'package:school_asignment_app/common/api/retrofit_client.dart';
|
||||
import 'package:school_asignment_app/common/job/user_info.dart';
|
||||
import 'package:school_asignment_app/common/store/user_store.dart';
|
||||
import 'package:school_asignment_app/common/utils/toast_utils.dart';
|
||||
|
||||
class RestDio {
|
||||
late Dio _dio;
|
||||
// 单例模式
|
||||
static final RestDio instance = RestDio._internal();
|
||||
factory RestDio() => instance;
|
||||
RestDio._internal() {
|
||||
init();
|
||||
}
|
||||
|
||||
class RequestTool {
|
||||
// 初始化请求配置
|
||||
init() {
|
||||
static _init() {
|
||||
BaseOptions options = BaseOptions(
|
||||
baseUrl: RequestConfig().baseUrl,
|
||||
connectTimeout: RequestConfig.connectTimeout,
|
||||
receiveTimeout: RequestConfig.receiveTimeout,
|
||||
connectTimeout: const Duration(milliseconds: RequestConfig.connectTimeout),
|
||||
receiveTimeout: const Duration(milliseconds: RequestConfig.receiveTimeout),
|
||||
);
|
||||
_dio = Dio(options);
|
||||
_dio.interceptors.add(AuthInterceptor()); // 添加 token
|
||||
_dio.interceptors.add(ResponseHandle()); // 添加 数据返回拦截
|
||||
_dio.interceptors.add(TheError()); // 添加 数据返回拦截
|
||||
Dio dio = Dio(options);
|
||||
dio.interceptors.add(AuthInterceptor()); // 添加 token
|
||||
dio.interceptors.add(ResponseHandle()); // 添加 数据返回拦截
|
||||
dio.interceptors.add(TheError()); // 添加 数据返回拦截
|
||||
const isProd = bool.fromEnvironment('dart.vm.product');
|
||||
if (!isProd && RequestConfig.requestDataPrinting) {
|
||||
_dio.interceptors.add(LogInterceptor(responseBody: true, requestBody: true)); //添加日志
|
||||
dio.interceptors.add(LogInterceptor(responseBody: true, requestBody: true)); //添加日志
|
||||
}
|
||||
// 添加https证书
|
||||
setHttpsPEM();
|
||||
// setHttpsPKCS12();
|
||||
|
||||
// 使用代理
|
||||
// setFindProxy();
|
||||
}
|
||||
/// restful post 表单提交操作
|
||||
Future get(String path, {Map<String, dynamic>? queryParameters, Options? options}) async {
|
||||
Options requestOptions = options ?? Options();
|
||||
var response = await _dio.get(
|
||||
path,
|
||||
queryParameters: queryParameters,
|
||||
options: requestOptions,
|
||||
cancelToken: CancelToken(),
|
||||
);
|
||||
return response.data;
|
||||
return RetrofitClient(dio, baseUrl: RequestConfig().baseUrl);
|
||||
}
|
||||
|
||||
final RetrofitClient _client;
|
||||
static RequestTool? _instance;
|
||||
|
||||
/// restful post 表单提交操作
|
||||
Future post(String path, {Map<String, dynamic>? data, Options? options}) async {
|
||||
Options requestOptions = options ?? Options();
|
||||
var response = await _dio.post(
|
||||
path,
|
||||
data: data,
|
||||
options: requestOptions,
|
||||
cancelToken: CancelToken(),
|
||||
);
|
||||
return response.data;
|
||||
RequestTool._internal(this._client);
|
||||
|
||||
static get instance {
|
||||
if (_instance == null) {
|
||||
RetrofitClient client = _init();
|
||||
_instance = RequestTool._internal(client);
|
||||
}
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
String PEM = "XXXXX"; // certificate content
|
||||
String PKCS12File = "XXXXX"; // certificate content
|
||||
|
||||
//dio 基本方法
|
||||
Future<Dio> getDio() async {
|
||||
return _dio;
|
||||
}
|
||||
|
||||
//添加证书
|
||||
setHttpsPEM() async {
|
||||
(_dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
|
||||
client.badCertificateCallback = (X509Certificate cert, String host, int port) {
|
||||
// if (cert.pem == PEM) {
|
||||
// // Verify the certificate
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
return true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
setHttpsPKCS12() async {
|
||||
(_dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
|
||||
SecurityContext sc = new SecurityContext();
|
||||
//file is the path of certificate
|
||||
sc.setTrustedCertificates(PKCS12File);
|
||||
HttpClient httpClient = new HttpClient(context: sc);
|
||||
return httpClient;
|
||||
};
|
||||
}
|
||||
|
||||
//设置代理
|
||||
setFindProxy() async {
|
||||
// 设置请求拦截器
|
||||
_dio.interceptors.add(InterceptorsWrapper(onRequest: (options, handler) {
|
||||
// 判断 URI 的路径是否包含指定字符串
|
||||
if (options.uri.path.contains(RequestConfig.hwProxyKeywords)) {
|
||||
// 设置代理地址
|
||||
_dio.httpClientAdapter = DefaultHttpClientAdapter();
|
||||
(_dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
|
||||
client.findProxy = (uri) {
|
||||
print('进入开始代理...............');
|
||||
return RequestConfig.proBaseUrlOfHomework;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
return handler.next(options); // 继续发送请求
|
||||
}));
|
||||
}
|
||||
RetrofitClient getClient() => _client;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -126,14 +50,14 @@ class RestDio {
|
|||
*添加header认证
|
||||
* */
|
||||
class AuthInterceptor extends Interceptor {
|
||||
String PLATFORM = "android"; //可根据代码进行判断
|
||||
|
||||
@override
|
||||
onRequest(RequestOptions options, RequestInterceptorHandler handler) async {
|
||||
//获取app版本
|
||||
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||
|
||||
String version = packageInfo.version;
|
||||
// ignore: non_constant_identifier_names
|
||||
String PLATFORM = "android"; //可根据代码进行判断
|
||||
if (Platform.isIOS) {
|
||||
PLATFORM = "ios";
|
||||
} else if (Platform.isAndroid) {
|
||||
|
|
@ -153,26 +77,20 @@ class AuthInterceptor extends Interceptor {
|
|||
headers["x-version"] = version; //自己更改配置
|
||||
headers["x-platform"] = PLATFORM;
|
||||
//获取存储数据 保存header token
|
||||
String? token = StorageService.to.read(AppStorageKey.STORAGE_USER_TOKEN);
|
||||
String? token = UserStore.to.token;
|
||||
String? xToken = UserStore.to.xToken;
|
||||
UserInfo? userInfo = UserStore.to.userInfo.value;
|
||||
|
||||
if (null != token && token.isNotEmpty) {
|
||||
headers["Authorization"] = 'Bearer $token'; //添加自己项目中的请求头 进行保存
|
||||
headers["Authorization"] = token; //添加自己项目中的请求头 进行保存
|
||||
headers["x-Authorization"] = token; //添加自己项目中的请求头 进行保存
|
||||
}
|
||||
|
||||
if ((userInfo?.isExpired() ?? false) && (xToken?.isNotEmpty ?? false)) {
|
||||
headers["x-Authorization"] = xToken!;
|
||||
}
|
||||
|
||||
options.headers = headers;
|
||||
Uri uri = options.uri;
|
||||
print(uri.toString());
|
||||
// 判断请求的 URL 是否包含指定字符串
|
||||
if (uri.toString().contains(RequestConfig.hwProxyKeywords)) {
|
||||
String newPath = options.path.replaceFirst(RegExp('^${RequestConfig.hwProxyKeywords}'), '');
|
||||
options.path = newPath;
|
||||
// 修改请求的 URL
|
||||
options.baseUrl = RequestConfig.proBaseUrlOfHomework;
|
||||
}
|
||||
|
||||
// print('请求参数query:' + jsonEncode(options.queryParameters));
|
||||
// print('请求参数data:' + jsonEncode(options.data));
|
||||
|
||||
return super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
|
|
@ -184,244 +102,60 @@ class AuthInterceptor extends Interceptor {
|
|||
class ResponseHandle extends Interceptor {
|
||||
@override
|
||||
void onResponse(Response response, ResponseInterceptorHandler handler) {
|
||||
const isProd = bool.fromEnvironment('dart.vm.product');
|
||||
if (!isProd && RequestConfig.requestDataPrinting) {
|
||||
// printJson(response.data);
|
||||
if (RequestConfig.successCode.contains(response.statusCode)) {
|
||||
//
|
||||
String? token = response.headers.value('access-token');
|
||||
String? xtoken = response.headers.value('x-access-token');
|
||||
if (token?.isNotEmpty ?? false) {
|
||||
UserStore.to.setToken(token!);
|
||||
var payloadBase64 = token.split('.')[1];
|
||||
final normalizedPayload = base64.normalize(payloadBase64);
|
||||
final payloadString = utf8.decode(base64.decode(normalizedPayload));
|
||||
UserStore.to.setUserInfo(UserInfo.fromJson(jsonDecode(payloadString)));
|
||||
}
|
||||
if (xtoken?.isNotEmpty ?? false) UserStore.to.setXToken(xtoken!);
|
||||
}
|
||||
|
||||
super.onResponse(response, handler);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ResponseHandle
|
||||
* 监听返回响应
|
||||
**/
|
||||
class TheError extends Interceptor {
|
||||
// 是否有网
|
||||
Future<bool> isConnected() async {
|
||||
var connectivityResult = await (Connectivity().checkConnectivity());
|
||||
return connectivityResult != ConnectivityResult.none;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onError(DioError err, ErrorInterceptorHandler handler) async {
|
||||
// 自定义一个socket实例,因为dio原生的实例,message属于是只读的
|
||||
// 这里是我单独加的,因为默认的dio err实例,的几种类型,缺少无网络情况下的错误提示信息
|
||||
if (err.error is SocketException) {
|
||||
err.error = MyDioSocketException(
|
||||
err.message.contains('111') ? "服务器拒绝连接,请重试" : err.message,
|
||||
osError: err.error?.osError,
|
||||
address: err.error?.address,
|
||||
port: err.error?.port,
|
||||
);
|
||||
}
|
||||
// dio默认的错误实例,如果是没有网络,只能得到一个未知错误,无法精准的得知是否是无网络的情况
|
||||
if (err.type == DioErrorType.other) {
|
||||
bool isConnectNetWork = await isConnected();
|
||||
if (!isConnectNetWork && err.error is MyDioSocketException) {
|
||||
err.error.message = "当前网络不可用,请检查您的网络";
|
||||
}
|
||||
}
|
||||
|
||||
// error统一处理
|
||||
AppException appException = AppException.create(err);
|
||||
|
||||
// 错误提示
|
||||
// debugPrint('DioError===: ${appException.toString()}');
|
||||
err = appException;
|
||||
|
||||
return super.onError(err, handler);
|
||||
}
|
||||
}
|
||||
|
||||
String getDioErrorTypeStr(DioError err) {
|
||||
DioErrorType errorType = err.type;
|
||||
String str;
|
||||
switch (errorType) {
|
||||
case DioErrorType.connectTimeout:
|
||||
str = '连接超时,请检查网络再重试';
|
||||
break;
|
||||
case DioErrorType.sendTimeout:
|
||||
str = '发送时间超时,请重试';
|
||||
break;
|
||||
case DioErrorType.receiveTimeout:
|
||||
str = '接收数据超时,请重试';
|
||||
break;
|
||||
case DioErrorType.response:
|
||||
str = '请求返回失败';
|
||||
break;
|
||||
case DioErrorType.cancel:
|
||||
str = '请求取消';
|
||||
break;
|
||||
case DioErrorType.other:
|
||||
str = '请求其他错误';
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/// 自定义异常
|
||||
class AppException extends DioError {
|
||||
final String _message;
|
||||
final int _code;
|
||||
AppException(this._code, this._message, StackTrace? theStackTrace,
|
||||
{required super.requestOptions, super.type, super.error}) {
|
||||
super.stackTrace = theStackTrace;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return "$_code$_message" + super.toString();
|
||||
}
|
||||
|
||||
String getMessage() {
|
||||
return _message;
|
||||
}
|
||||
|
||||
factory AppException.create(DioError error) {
|
||||
void onError(DioException error, ErrorInterceptorHandler handler) {
|
||||
print('----------------');
|
||||
print(error);
|
||||
print('*************');
|
||||
switch (error.type) {
|
||||
case DioErrorType.cancel:
|
||||
{
|
||||
return AppException(-1, "请求取消", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case DioErrorType.connectTimeout:
|
||||
{
|
||||
return AppException(-1, "连接超时", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case DioErrorType.sendTimeout:
|
||||
{
|
||||
return AppException(-1, "请求超时", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case DioErrorType.receiveTimeout:
|
||||
{
|
||||
return AppException(-1, "响应超时", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case DioErrorType.response:
|
||||
{
|
||||
try {
|
||||
int? errCode = error.response!.statusCode;
|
||||
// String errMsg = error.response.statusMessage;
|
||||
// return ErrorEntity(code: errCode, message: errMsg);
|
||||
switch (errCode) {
|
||||
case 400:
|
||||
{
|
||||
return AppException(errCode!, "请求语法错误", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case 401:
|
||||
{
|
||||
var currentContext = TheGlobal.navigatorKey.currentState?.overlay?.context;
|
||||
if (currentContext != null) {
|
||||
var routePath = ModalRoute.of(currentContext)?.settings;
|
||||
if (routePath != null) {
|
||||
} else {
|
||||
if (TheGlobal.navigatorKey.currentContext != null) {
|
||||
ExceptionHandle.toLogin(TheGlobal.navigatorKey.currentContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
return AppException(errCode!, "登录信息过期,请重新登录", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case 403:
|
||||
{
|
||||
return AppException(errCode!, "服务器拒绝执行", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case 404:
|
||||
{
|
||||
return AppException(errCode!, "无法连接服务器", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case 405:
|
||||
{
|
||||
return AppException(errCode!, "请求方法被禁止", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case 500:
|
||||
{
|
||||
return AppException(errCode!, "服务器内部错误", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case 502:
|
||||
{
|
||||
return AppException(errCode!, "无效的请求", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case 503:
|
||||
{
|
||||
return AppException(errCode!, "服务器挂了", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
case 505:
|
||||
{
|
||||
return AppException(errCode!, "不支持HTTP协议请求", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
default:
|
||||
{
|
||||
// return ErrorEntity(code: errCode, message: "未知错误");
|
||||
return AppException(errCode!, error.response!.statusMessage!, error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
}
|
||||
} on Exception catch (_) {
|
||||
return AppException(-1, "未知错误", error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
case DioExceptionType.connectionTimeout:
|
||||
break;
|
||||
case DioExceptionType.badCertificate:
|
||||
break;
|
||||
case DioExceptionType.sendTimeout:
|
||||
break;
|
||||
case DioExceptionType.receiveTimeout:
|
||||
break;
|
||||
case DioExceptionType.badResponse:
|
||||
if (error.response == null) {
|
||||
print('1111111111111');
|
||||
} else {
|
||||
var errorMap = error.response!.data;
|
||||
if (errorMap['error'] != null) {
|
||||
var message = errorMap['error']?['message'] ?? '请求错误,请重试';
|
||||
print(message);
|
||||
ToastUtils.showError(message);
|
||||
}
|
||||
if (error.response!.statusCode == 401) {}
|
||||
}
|
||||
default:
|
||||
{
|
||||
return AppException(-1, error.error.message, error.stackTrace,
|
||||
requestOptions: error.requestOptions, type: error.type, error: error.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ExceptionHandle {
|
||||
// 异常处理信息
|
||||
static void exceptionPrompt(BuildContext context, AppException err, {bool logicHandle = true}) {
|
||||
ToastUtils.getFluttertoast(
|
||||
context: context,
|
||||
msg: err._message,
|
||||
backgroundColor: Colors.grey[350],
|
||||
toastLength: Toast.LENGTH_LONG,
|
||||
);
|
||||
if (!logicHandle) return;
|
||||
switch (err._code) {
|
||||
case 401:
|
||||
toLogin(context); // 重新前往登录
|
||||
break;
|
||||
case DioExceptionType.cancel:
|
||||
break;
|
||||
case DioExceptionType.connectionError:
|
||||
break;
|
||||
default:
|
||||
print('这里是错误的东西');
|
||||
}
|
||||
}
|
||||
|
||||
static void toLogin(context, {int timeer = 800}) {
|
||||
/* setTimeOut(
|
||||
timeer,
|
||||
() => RouterManager.router.navigateTo(context, RouterManager.loginPath, clearStack: true),
|
||||
);*/
|
||||
return handler.next(error);
|
||||
}
|
||||
}
|
||||
|
||||
// 这里是一个我单独写得soket错误实例,因为dio默认生成的是不允许修改message内容的,我只能自定义一个使用
|
||||
class MyDioSocketException extends SocketException {
|
||||
String message;
|
||||
|
||||
MyDioSocketException(
|
||||
this.message, {
|
||||
osError,
|
||||
address,
|
||||
port,
|
||||
}) : super(
|
||||
message,
|
||||
osError: osError,
|
||||
address: address,
|
||||
port: port,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ class AppStorageKey {
|
|||
/// 登录用户的token
|
||||
static const String STORAGE_USER_TOKEN = 'APP:TOKEN';
|
||||
|
||||
/// 登录用户的Xtoken
|
||||
static const String STORAGE_X_TOKEN = 'APP:XTOKEN';
|
||||
|
||||
/// 用户输入过的手机号码
|
||||
static const String STORAGE_USER_MOBILE = 'user_mobile';
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,38 +1,33 @@
|
|||
import 'package:get/get.dart';
|
||||
import 'package:school_asignment_app/common/job/user_info.dart';
|
||||
import 'package:school_asignment_app/common/store/app_storage_key.dart';
|
||||
import 'package:school_asignment_app/common/utils/storage.dart';
|
||||
import 'package:school_asignment_app/common/store/app_storage_key.dart';
|
||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
||||
|
||||
class UserStore extends GetxController {
|
||||
static UserStore get to => Get.find();
|
||||
|
||||
/// 是否登录
|
||||
final isLogin = false.obs;
|
||||
String token = '';
|
||||
String? token;
|
||||
String? xToken;
|
||||
|
||||
/// 用户信息
|
||||
Rx<UserInfo> userInfo = Rx(UserInfo());
|
||||
Rx<UserInfo?> userInfo = Rx(null);
|
||||
|
||||
void init() {
|
||||
/*token = StorageService.to.read(AppStorageKey.STORAGE_USER_TOKEN) ?? '';
|
||||
token = StorageService.to.read(AppStorageKey.STORAGE_USER_TOKEN) ?? '';
|
||||
try {
|
||||
var userInfoJson = StorageService.to.read(AppStorageKey.STORAGE_USER_INFO);
|
||||
if (userInfoJson != null) {
|
||||
userInfo.value = UserInfo.fromJson(userInfoJson);
|
||||
} else {
|
||||
userInfo.value = UserInfo();
|
||||
}
|
||||
} catch (err, t) {
|
||||
userInfo.value = UserInfo();
|
||||
userInfo.value = StorageService.to.read(AppStorageKey.STORAGE_USER_INFO);
|
||||
} catch (err) {
|
||||
StorageService.to.remove(AppStorageKey.STORAGE_USER_INFO);
|
||||
}
|
||||
if (token.isNotEmpty && userInfo.value.loginName.isNotEmpty) {
|
||||
if ((token?.isNotEmpty ?? false) && userInfo.value != null) {
|
||||
isLogin.value = true;
|
||||
}else{
|
||||
} else {
|
||||
isLogin.value = false;
|
||||
Get.toNamed(Routes.login);
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// 保存 token
|
||||
|
|
@ -40,6 +35,12 @@ class UserStore extends GetxController {
|
|||
token = token;
|
||||
StorageService.to.write(AppStorageKey.STORAGE_USER_TOKEN, token);
|
||||
}
|
||||
|
||||
void setXToken(String xtoken) {
|
||||
xtoken = xtoken;
|
||||
StorageService.to.write(AppStorageKey.STORAGE_X_TOKEN, xtoken);
|
||||
}
|
||||
|
||||
/// 保存 token
|
||||
void setUserInfo(UserInfo info) {
|
||||
userInfo.value = info;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:school_asignment_app/common/config/app_config.dart';
|
||||
|
|
@ -9,10 +10,10 @@ import 'package:school_asignment_app/common/utils/utils.dart';
|
|||
import 'package:school_asignment_app/routes/app_pages.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
|
||||
|
||||
void main() async{
|
||||
void main() async {
|
||||
// 在测试模式下运行Get
|
||||
Get.testMode = true;
|
||||
|
||||
/// 初始化本地存储
|
||||
StorageService storageService = StorageService();
|
||||
await storageService.init();
|
||||
|
|
@ -23,6 +24,10 @@ void main() async{
|
|||
userStore.init();
|
||||
Get.put<UserStore>(userStore);
|
||||
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // 屏幕强制竖屏
|
||||
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
|
|
@ -51,8 +56,9 @@ class MyApp extends StatelessWidget {
|
|||
},
|
||||
//默认专场动画
|
||||
defaultTransition: Transition.fade,
|
||||
//初始化路由页面
|
||||
//初始化路由页面
|
||||
initialRoute: Routes.startPage,
|
||||
|
||||
/// 路由表
|
||||
getPages: AppPages.pages,
|
||||
builder: EasyLoading.init(
|
||||
|
|
@ -61,10 +67,7 @@ class MyApp extends StatelessWidget {
|
|||
//Setting font does not change with system font size
|
||||
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
|
||||
child: Scaffold(
|
||||
body: GestureDetector(
|
||||
onTap: () => Utils.hideKeyboard(),
|
||||
child: child,
|
||||
),
|
||||
body: GestureDetector(onTap: () => Utils.hideKeyboard(), child: child),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,45 +14,40 @@ class StartPage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _StartPageState extends State<StartPage> {
|
||||
|
||||
@override
|
||||
void initState(){
|
||||
void initState() {
|
||||
super.initState();
|
||||
var token = StorageService.to.read(AppStorageKey.STORAGE_USER_TOKEN) ?? '';
|
||||
UserInfo userInfo = UserInfo();
|
||||
try {
|
||||
var userInfoJson = StorageService.to.read(AppStorageKey.STORAGE_USER_INFO);
|
||||
if (userInfoJson != null) {
|
||||
userInfo = UserInfo.fromJson(userInfoJson);
|
||||
} else {
|
||||
userInfo = UserInfo();
|
||||
String? token = StorageService.to.read(AppStorageKey.STORAGE_USER_TOKEN);
|
||||
UserInfo? userInfo;
|
||||
try {
|
||||
var userInfoJson = StorageService.to.read(AppStorageKey.STORAGE_USER_INFO);
|
||||
if (userInfoJson != null) {
|
||||
userInfo = UserInfo.fromJson(userInfoJson);
|
||||
}
|
||||
} catch (err) {
|
||||
StorageService.to.remove(AppStorageKey.STORAGE_USER_INFO);
|
||||
}
|
||||
} catch (err, t) {
|
||||
userInfo = UserInfo();
|
||||
StorageService.to.remove(AppStorageKey.STORAGE_USER_INFO);
|
||||
}
|
||||
|
||||
|
||||
if (token.isNotEmpty && userInfo.loginName.isNotEmpty) {
|
||||
if ((token?.isNotEmpty ?? false) && userInfo != null) {
|
||||
Future.delayed(const Duration(milliseconds: 200)).then((e) {
|
||||
Get.toNamed(Routes.home);
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
Future.delayed(const Duration(milliseconds: 200)).then((e) {
|
||||
Get.toNamed(Routes.login);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 40.r,
|
||||
child: Text('启动中...',style: TextStyle(fontSize: 16.r,color: const Color(0xFF6888FD)),))
|
||||
]
|
||||
);
|
||||
return Stack(children: [
|
||||
Positioned(
|
||||
bottom: 40.r,
|
||||
child: Text(
|
||||
'启动中...',
|
||||
style: TextStyle(fontSize: 16.r, color: const Color(0xFF6888FD)),
|
||||
))
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import 'package:school_asignment_app/common/api/user_api.dart';
|
|||
import 'package:school_asignment_app/common/job/common/base_structure_result.dart';
|
||||
import 'package:school_asignment_app/common/job/user_info.dart';
|
||||
import 'package:school_asignment_app/common/job/user_login.dart';
|
||||
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
|
||||
import 'package:school_asignment_app/common/store/user_store.dart';
|
||||
import 'package:school_asignment_app/common/utils/common_utils.dart';
|
||||
import 'package:school_asignment_app/common/utils/toast_utils.dart';
|
||||
|
|
@ -14,7 +15,7 @@ import 'package:school_asignment_app/routes/app_pages.dart';
|
|||
|
||||
import 'login_state.dart';
|
||||
|
||||
class LoginLogic extends GetxController {
|
||||
class LoginLogic extends GetxController with RequestToolMixin {
|
||||
final LoginState state = LoginState();
|
||||
|
||||
@override
|
||||
|
|
@ -22,13 +23,15 @@ class LoginLogic extends GetxController {
|
|||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
}
|
||||
void onInit(){
|
||||
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
state.userNameController = TextEditingController()..addListener(userNameListener);
|
||||
state.passwordController = TextEditingController();
|
||||
state.userNameController = TextEditingController(text: 'wangyang')..addListener(userNameListener);
|
||||
state.passwordController = TextEditingController(text: '123@abc');
|
||||
state.pwdFocus = FocusNode();
|
||||
state.theFocus = FocusNode();
|
||||
}
|
||||
|
||||
void userNameListener() {
|
||||
String userName = state.userNameController.text;
|
||||
int useNameLength = userName.length;
|
||||
|
|
@ -39,9 +42,11 @@ class LoginLogic extends GetxController {
|
|||
state.passwordController.text = userName.substring(useNameLength - 6);
|
||||
}
|
||||
}
|
||||
|
||||
void showPassword() {
|
||||
state.isShowPwd.value = !state.isShowPwd.value;
|
||||
}
|
||||
|
||||
// 前往登录
|
||||
void toLogin() async {
|
||||
if (!state.canLogin.value) return;
|
||||
|
|
@ -61,36 +66,29 @@ class LoginLogic extends GetxController {
|
|||
if (userPwd == '') return toMsg('请填写密码再试');
|
||||
if (!state.readAgreement.value) return toMsg('请阅读用户协议');
|
||||
|
||||
String userPwdMd5 = CommonUtils.generateMD5(userPwd);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
try {
|
||||
BaseStructureResult<dynamic> resultData = await UserApi.toLogin(loginName:userName,password:userPwdMd5);
|
||||
await getClient().toLogin(userName, userPwd);
|
||||
EasyLoading.dismiss();
|
||||
Get.offAllNamed(Routes.home);
|
||||
// if (resultData.code != 200 || userData?.accessToken == null || userData?.accessToken == '') {
|
||||
// return toMsg(resultData.message ?? '登录失败,请重试');
|
||||
// }
|
||||
|
||||
// UserStore.to.setToken(userData!.accessToken);
|
||||
// state.canLogin.value = true;
|
||||
|
||||
// BaseStructureResult<dynamic> resultData = await client.toLogin(UserLoginParams(userName, userPwdMd5));
|
||||
UserLogin? userData =
|
||||
resultData.code == 200 && resultData.data != null ? UserLogin.fromJson(resultData.data) : null;
|
||||
// BaseStructureResult<UserInfo> userRes = await UserApi.getUserInfo();
|
||||
// print('99999999999');
|
||||
// print(userRes.data!.userName);
|
||||
// if (userRes.code != 200 || userRes.data == null) {
|
||||
// throw Exception('登录失败,请重试');
|
||||
// } else {
|
||||
// UserStore.to.setUserInfo(userRes.data!);
|
||||
// Get.offAllNamed(Routes.home);
|
||||
// }
|
||||
|
||||
print(resultData.code);
|
||||
if (resultData.code != 200 || userData?.accessToken == null || userData?.accessToken == '') {
|
||||
return toMsg(resultData.message ?? '登录失败,请重试');
|
||||
}
|
||||
|
||||
UserStore.to.setToken(userData!.accessToken);
|
||||
state.canLogin.value = true;
|
||||
|
||||
BaseStructureResult<UserInfo> userRes = await UserApi.getUserInfo();
|
||||
print('99999999999');
|
||||
print(userRes.data!.userName);
|
||||
if (userRes.code != 200 || userRes.data == null) {
|
||||
throw Exception('登录失败,请重试');
|
||||
}else{
|
||||
UserStore.to.setUserInfo(userRes.data!);
|
||||
Get.offAllNamed(Routes.home);
|
||||
}
|
||||
|
||||
|
||||
/* fastData.setUser(userRes.data!).then((value) {
|
||||
/* fastData.setUser(userRes.data!).then((value) {
|
||||
// 记住密码
|
||||
if (keepPwd) {
|
||||
fastData.setUserPwdAndAccount({'pwd': userPwd, 'account': userName});
|
||||
|
|
@ -104,37 +102,13 @@ class LoginLogic extends GetxController {
|
|||
// RouterManager.router.navigateTo(context, RouterManager.root, clearStack: true, transition: getTransition());
|
||||
});*/
|
||||
} catch (e) {
|
||||
// toPrint(val: e.toString());
|
||||
String? msg;
|
||||
if (e is DioError) {
|
||||
DioErrorType errorType = e.type;
|
||||
switch (errorType) {
|
||||
case DioErrorType.connectTimeout:
|
||||
msg = '连接超时,请检查网络再重试';
|
||||
break;
|
||||
case DioErrorType.sendTimeout:
|
||||
msg = '发送时间超时,请重试';
|
||||
break;
|
||||
case DioErrorType.receiveTimeout:
|
||||
msg = '接收数据超时,请重试';
|
||||
break;
|
||||
case DioErrorType.response:
|
||||
// TODO: Handle this case.
|
||||
break;
|
||||
case DioErrorType.cancel:
|
||||
// TODO: Handle this case.
|
||||
break;
|
||||
case DioErrorType.other:
|
||||
// TODO: Handle this case.
|
||||
break;
|
||||
}
|
||||
}
|
||||
// FastData.getInstance().cleanShared();
|
||||
return toMsg(msg ?? '登录失败,请重试');
|
||||
// return toMsg(msg ?? '登录失败,请重试');
|
||||
} finally {
|
||||
EasyLoading.dismiss();
|
||||
// EasyLoading.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
|
|
|
|||
254
pubspec.lock
254
pubspec.lock
|
|
@ -6,7 +6,7 @@ packages:
|
|||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "64.0.0"
|
||||
analyzer:
|
||||
|
|
@ -14,7 +14,7 @@ packages:
|
|||
description:
|
||||
name: analyzer
|
||||
sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "6.2.0"
|
||||
args:
|
||||
|
|
@ -22,7 +22,7 @@ packages:
|
|||
description:
|
||||
name: args
|
||||
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
async:
|
||||
|
|
@ -30,7 +30,7 @@ packages:
|
|||
description:
|
||||
name: async
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.11.0"
|
||||
boolean_selector:
|
||||
|
|
@ -38,7 +38,7 @@ packages:
|
|||
description:
|
||||
name: boolean_selector
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
build:
|
||||
|
|
@ -46,7 +46,7 @@ packages:
|
|||
description:
|
||||
name: build
|
||||
sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
build_config:
|
||||
|
|
@ -54,7 +54,7 @@ packages:
|
|||
description:
|
||||
name: build_config
|
||||
sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
build_daemon:
|
||||
|
|
@ -62,7 +62,7 @@ packages:
|
|||
description:
|
||||
name: build_daemon
|
||||
sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
build_resolvers:
|
||||
|
|
@ -70,23 +70,23 @@ packages:
|
|||
description:
|
||||
name: build_resolvers
|
||||
sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
build_runner:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: build_runner
|
||||
sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21"
|
||||
url: "https://pub.dev"
|
||||
sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.4.8"
|
||||
version: "2.4.9"
|
||||
build_runner_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build_runner_core
|
||||
sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "7.3.0"
|
||||
built_collection:
|
||||
|
|
@ -94,7 +94,7 @@ packages:
|
|||
description:
|
||||
name: built_collection
|
||||
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "5.1.1"
|
||||
built_value:
|
||||
|
|
@ -102,7 +102,7 @@ packages:
|
|||
description:
|
||||
name: built_value
|
||||
sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "8.9.1"
|
||||
cached_network_image:
|
||||
|
|
@ -110,7 +110,7 @@ packages:
|
|||
description:
|
||||
name: cached_network_image
|
||||
sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.3.1"
|
||||
cached_network_image_platform_interface:
|
||||
|
|
@ -118,7 +118,7 @@ packages:
|
|||
description:
|
||||
name: cached_network_image_platform_interface
|
||||
sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
cached_network_image_web:
|
||||
|
|
@ -126,7 +126,7 @@ packages:
|
|||
description:
|
||||
name: cached_network_image_web
|
||||
sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
characters:
|
||||
|
|
@ -134,7 +134,7 @@ packages:
|
|||
description:
|
||||
name: characters
|
||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
checked_yaml:
|
||||
|
|
@ -142,7 +142,7 @@ packages:
|
|||
description:
|
||||
name: checked_yaml
|
||||
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
clock:
|
||||
|
|
@ -150,7 +150,7 @@ packages:
|
|||
description:
|
||||
name: clock
|
||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
code_builder:
|
||||
|
|
@ -158,7 +158,7 @@ packages:
|
|||
description:
|
||||
name: code_builder
|
||||
sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.10.0"
|
||||
collection:
|
||||
|
|
@ -166,7 +166,7 @@ packages:
|
|||
description:
|
||||
name: collection
|
||||
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.17.1"
|
||||
connectivity_plus:
|
||||
|
|
@ -174,7 +174,7 @@ packages:
|
|||
description:
|
||||
name: connectivity_plus
|
||||
sha256: b74247fad72c171381dbe700ca17da24deac637ab6d43c343b42867acb95c991
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.0.6"
|
||||
connectivity_plus_platform_interface:
|
||||
|
|
@ -182,7 +182,7 @@ packages:
|
|||
description:
|
||||
name: connectivity_plus_platform_interface
|
||||
sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.4"
|
||||
convert:
|
||||
|
|
@ -190,7 +190,7 @@ packages:
|
|||
description:
|
||||
name: convert
|
||||
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
crypto:
|
||||
|
|
@ -198,7 +198,7 @@ packages:
|
|||
description:
|
||||
name: crypto
|
||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
csslib:
|
||||
|
|
@ -206,7 +206,7 @@ packages:
|
|||
description:
|
||||
name: csslib
|
||||
sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
cupertino_icons:
|
||||
|
|
@ -214,7 +214,7 @@ packages:
|
|||
description:
|
||||
name: cupertino_icons
|
||||
sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.6"
|
||||
dart_style:
|
||||
|
|
@ -222,7 +222,7 @@ packages:
|
|||
description:
|
||||
name: dart_style
|
||||
sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.3.6"
|
||||
dbus:
|
||||
|
|
@ -230,23 +230,23 @@ packages:
|
|||
description:
|
||||
name: dbus
|
||||
sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.7.10"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dio
|
||||
sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
|
||||
url: "https://pub.dev"
|
||||
sha256: "0978e9a3e45305a80a7210dbeaf79d6ee8bee33f70c8e542dc654c952070217f"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.0.6"
|
||||
version: "5.4.2+1"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
ffi:
|
||||
|
|
@ -254,7 +254,7 @@ packages:
|
|||
description:
|
||||
name: ffi
|
||||
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
file:
|
||||
|
|
@ -262,7 +262,7 @@ packages:
|
|||
description:
|
||||
name: file
|
||||
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
fixnum:
|
||||
|
|
@ -270,7 +270,7 @@ packages:
|
|||
description:
|
||||
name: fixnum
|
||||
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
flutter:
|
||||
|
|
@ -283,7 +283,7 @@ packages:
|
|||
description:
|
||||
name: flutter_cache_manager
|
||||
sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.3.1"
|
||||
flutter_easyloading:
|
||||
|
|
@ -291,7 +291,7 @@ packages:
|
|||
description:
|
||||
name: flutter_easyloading
|
||||
sha256: ba21a3c883544e582f9cc455a4a0907556714e1e9cf0eababfcb600da191d17c
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.0.5"
|
||||
flutter_easyrefresh:
|
||||
|
|
@ -299,7 +299,7 @@ packages:
|
|||
description:
|
||||
name: flutter_easyrefresh
|
||||
sha256: "5d161ee5dcac34da9065116568147d742dd25fb9bff3b10024d9054b195087ad"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
flutter_lints:
|
||||
|
|
@ -307,7 +307,7 @@ packages:
|
|||
description:
|
||||
name: flutter_lints
|
||||
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
flutter_screenutil:
|
||||
|
|
@ -315,17 +315,17 @@ packages:
|
|||
description:
|
||||
name: flutter_screenutil
|
||||
sha256: "0a122936b450324cbdfd51be0819cc6fcebb093eb65585e9cd92263f7a1a8a39"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "5.7.0"
|
||||
flutter_spinkit:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_spinkit
|
||||
sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e
|
||||
url: "https://pub.dev"
|
||||
sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "5.2.0"
|
||||
version: "5.2.1"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
|
@ -341,7 +341,7 @@ packages:
|
|||
description:
|
||||
name: flutter_widget_from_html_core
|
||||
sha256: "22140caa191cb4bba0fe4d5e4ad875c7e8a9ba47d61517f56d733019cf76396d"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.10.6"
|
||||
fluttertoast:
|
||||
|
|
@ -349,23 +349,23 @@ packages:
|
|||
description:
|
||||
name: fluttertoast
|
||||
sha256: dfdde255317af381bfc1c486ed968d5a43a2ded9c931e87cbecd88767d6a71c1
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "8.2.4"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: frontend_server_client
|
||||
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
|
||||
url: "https://pub.dev"
|
||||
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
version: "4.0.0"
|
||||
functional_widget_annotation:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: functional_widget_annotation
|
||||
sha256: f0612079cb7e226b7be32b473bdaf85fe680370886c0c13ea69a102ccc17a0c7
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.10.0"
|
||||
get:
|
||||
|
|
@ -373,7 +373,7 @@ packages:
|
|||
description:
|
||||
name: get
|
||||
sha256: "2ba20a47c8f1f233bed775ba2dd0d3ac97b4cf32fc17731b3dfc672b06b0e92a"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.6.5"
|
||||
get_storage:
|
||||
|
|
@ -381,7 +381,7 @@ packages:
|
|||
description:
|
||||
name: get_storage
|
||||
sha256: "39db1fffe779d0c22b3a744376e86febe4ade43bf65e06eab5af707dc84185a2"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
glob:
|
||||
|
|
@ -389,7 +389,7 @@ packages:
|
|||
description:
|
||||
name: glob
|
||||
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
graphs:
|
||||
|
|
@ -397,7 +397,7 @@ packages:
|
|||
description:
|
||||
name: graphs
|
||||
sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
html:
|
||||
|
|
@ -405,7 +405,7 @@ packages:
|
|||
description:
|
||||
name: html
|
||||
sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.15.4"
|
||||
http:
|
||||
|
|
@ -413,7 +413,7 @@ packages:
|
|||
description:
|
||||
name: http
|
||||
sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
http_multi_server:
|
||||
|
|
@ -421,7 +421,7 @@ packages:
|
|||
description:
|
||||
name: http_multi_server
|
||||
sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.2.1"
|
||||
http_parser:
|
||||
|
|
@ -429,7 +429,7 @@ packages:
|
|||
description:
|
||||
name: http_parser
|
||||
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
io:
|
||||
|
|
@ -437,7 +437,7 @@ packages:
|
|||
description:
|
||||
name: io
|
||||
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
js:
|
||||
|
|
@ -445,7 +445,7 @@ packages:
|
|||
description:
|
||||
name: js
|
||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
json_annotation:
|
||||
|
|
@ -453,7 +453,7 @@ packages:
|
|||
description:
|
||||
name: json_annotation
|
||||
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.8.1"
|
||||
json_serializable:
|
||||
|
|
@ -461,7 +461,7 @@ packages:
|
|||
description:
|
||||
name: json_serializable
|
||||
sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "6.7.1"
|
||||
lints:
|
||||
|
|
@ -469,7 +469,7 @@ packages:
|
|||
description:
|
||||
name: lints
|
||||
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
logger:
|
||||
|
|
@ -477,7 +477,7 @@ packages:
|
|||
description:
|
||||
name: logger
|
||||
sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
logging:
|
||||
|
|
@ -485,7 +485,7 @@ packages:
|
|||
description:
|
||||
name: logging
|
||||
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
matcher:
|
||||
|
|
@ -493,7 +493,7 @@ packages:
|
|||
description:
|
||||
name: matcher
|
||||
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.12.15"
|
||||
material_color_utilities:
|
||||
|
|
@ -501,7 +501,7 @@ packages:
|
|||
description:
|
||||
name: material_color_utilities
|
||||
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
meta:
|
||||
|
|
@ -509,7 +509,7 @@ packages:
|
|||
description:
|
||||
name: meta
|
||||
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
mime:
|
||||
|
|
@ -517,7 +517,7 @@ packages:
|
|||
description:
|
||||
name: mime
|
||||
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
nm:
|
||||
|
|
@ -525,7 +525,7 @@ packages:
|
|||
description:
|
||||
name: nm
|
||||
sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.5.0"
|
||||
octo_image:
|
||||
|
|
@ -533,7 +533,7 @@ packages:
|
|||
description:
|
||||
name: octo_image
|
||||
sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
package_config:
|
||||
|
|
@ -541,7 +541,7 @@ packages:
|
|||
description:
|
||||
name: package_config
|
||||
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
package_info:
|
||||
|
|
@ -549,7 +549,7 @@ packages:
|
|||
description:
|
||||
name: package_info
|
||||
sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
path:
|
||||
|
|
@ -557,7 +557,7 @@ packages:
|
|||
description:
|
||||
name: path
|
||||
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.8.3"
|
||||
path_provider:
|
||||
|
|
@ -565,7 +565,7 @@ packages:
|
|||
description:
|
||||
name: path_provider
|
||||
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
path_provider_android:
|
||||
|
|
@ -573,7 +573,7 @@ packages:
|
|||
description:
|
||||
name: path_provider_android
|
||||
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
path_provider_foundation:
|
||||
|
|
@ -581,7 +581,7 @@ packages:
|
|||
description:
|
||||
name: path_provider_foundation
|
||||
sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
path_provider_linux:
|
||||
|
|
@ -589,7 +589,7 @@ packages:
|
|||
description:
|
||||
name: path_provider_linux
|
||||
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
path_provider_platform_interface:
|
||||
|
|
@ -597,7 +597,7 @@ packages:
|
|||
description:
|
||||
name: path_provider_platform_interface
|
||||
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
path_provider_windows:
|
||||
|
|
@ -605,7 +605,7 @@ packages:
|
|||
description:
|
||||
name: path_provider_windows
|
||||
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
petitparser:
|
||||
|
|
@ -613,7 +613,7 @@ packages:
|
|||
description:
|
||||
name: petitparser
|
||||
sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "5.4.0"
|
||||
photo_view:
|
||||
|
|
@ -621,7 +621,7 @@ packages:
|
|||
description:
|
||||
name: photo_view
|
||||
sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.14.0"
|
||||
platform:
|
||||
|
|
@ -629,7 +629,7 @@ packages:
|
|||
description:
|
||||
name: platform
|
||||
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.1.4"
|
||||
plugin_platform_interface:
|
||||
|
|
@ -637,7 +637,7 @@ packages:
|
|||
description:
|
||||
name: plugin_platform_interface
|
||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
pool:
|
||||
|
|
@ -645,7 +645,7 @@ packages:
|
|||
description:
|
||||
name: pool
|
||||
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
pub_semver:
|
||||
|
|
@ -653,7 +653,7 @@ packages:
|
|||
description:
|
||||
name: pub_semver
|
||||
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
pubspec_parse:
|
||||
|
|
@ -661,15 +661,31 @@ packages:
|
|||
description:
|
||||
name: pubspec_parse
|
||||
sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.3"
|
||||
retrofit:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: retrofit
|
||||
sha256: "13a2865c0d97da580ea4e3c64d412d81f365fd5b26be2a18fca9582e021da37a"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
retrofit_generator:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: retrofit_generator
|
||||
sha256: "9499eb46b3657a62192ddbc208ff7e6c6b768b19e83c1ee6f6b119c864b99690"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "7.0.8"
|
||||
rxdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: rxdart
|
||||
sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.27.7"
|
||||
shelf:
|
||||
|
|
@ -677,7 +693,7 @@ packages:
|
|||
description:
|
||||
name: shelf
|
||||
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.4.1"
|
||||
shelf_web_socket:
|
||||
|
|
@ -685,7 +701,7 @@ packages:
|
|||
description:
|
||||
name: shelf_web_socket
|
||||
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
sky_engine:
|
||||
|
|
@ -698,7 +714,7 @@ packages:
|
|||
description:
|
||||
name: source_gen
|
||||
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
source_helper:
|
||||
|
|
@ -706,7 +722,7 @@ packages:
|
|||
description:
|
||||
name: source_helper
|
||||
sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.4"
|
||||
source_span:
|
||||
|
|
@ -714,7 +730,7 @@ packages:
|
|||
description:
|
||||
name: source_span
|
||||
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.9.1"
|
||||
sprintf:
|
||||
|
|
@ -722,7 +738,7 @@ packages:
|
|||
description:
|
||||
name: sprintf
|
||||
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
sqflite:
|
||||
|
|
@ -730,7 +746,7 @@ packages:
|
|||
description:
|
||||
name: sqflite
|
||||
sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.3.2"
|
||||
sqflite_common:
|
||||
|
|
@ -738,7 +754,7 @@ packages:
|
|||
description:
|
||||
name: sqflite_common
|
||||
sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.5.3"
|
||||
stack_trace:
|
||||
|
|
@ -746,7 +762,7 @@ packages:
|
|||
description:
|
||||
name: stack_trace
|
||||
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.11.0"
|
||||
stream_channel:
|
||||
|
|
@ -754,7 +770,7 @@ packages:
|
|||
description:
|
||||
name: stream_channel
|
||||
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
stream_transform:
|
||||
|
|
@ -762,7 +778,7 @@ packages:
|
|||
description:
|
||||
name: stream_transform
|
||||
sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
string_scanner:
|
||||
|
|
@ -770,7 +786,7 @@ packages:
|
|||
description:
|
||||
name: string_scanner
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
synchronized:
|
||||
|
|
@ -778,7 +794,7 @@ packages:
|
|||
description:
|
||||
name: synchronized
|
||||
sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.1.0+1"
|
||||
term_glyph:
|
||||
|
|
@ -786,7 +802,7 @@ packages:
|
|||
description:
|
||||
name: term_glyph
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
test_api:
|
||||
|
|
@ -794,7 +810,7 @@ packages:
|
|||
description:
|
||||
name: test_api
|
||||
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.5.1"
|
||||
timing:
|
||||
|
|
@ -802,15 +818,23 @@ packages:
|
|||
description:
|
||||
name: timing
|
||||
sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
tuple:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: tuple
|
||||
sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.2"
|
||||
uuid:
|
||||
|
|
@ -818,7 +842,7 @@ packages:
|
|||
description:
|
||||
name: uuid
|
||||
sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.2.2"
|
||||
vector_math:
|
||||
|
|
@ -826,7 +850,7 @@ packages:
|
|||
description:
|
||||
name: vector_math
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
watcher:
|
||||
|
|
@ -834,7 +858,7 @@ packages:
|
|||
description:
|
||||
name: watcher
|
||||
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
web_socket_channel:
|
||||
|
|
@ -842,7 +866,7 @@ packages:
|
|||
description:
|
||||
name: web_socket_channel
|
||||
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
win32:
|
||||
|
|
@ -850,7 +874,7 @@ packages:
|
|||
description:
|
||||
name: win32
|
||||
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "5.0.9"
|
||||
xdg_directories:
|
||||
|
|
@ -858,7 +882,7 @@ packages:
|
|||
description:
|
||||
name: xdg_directories
|
||||
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
xml:
|
||||
|
|
@ -866,7 +890,7 @@ packages:
|
|||
description:
|
||||
name: xml
|
||||
sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "6.3.0"
|
||||
yaml:
|
||||
|
|
@ -874,7 +898,7 @@ packages:
|
|||
description:
|
||||
name: yaml
|
||||
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||
url: "https://pub.dev"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
sdks:
|
||||
|
|
|
|||
11
pubspec.yaml
11
pubspec.yaml
|
|
@ -44,7 +44,7 @@ dependencies:
|
|||
# 屏幕尺寸计算插件
|
||||
flutter_screenutil: 5.7.0
|
||||
# http请求插件
|
||||
dio: ^4.0.6
|
||||
dio: ^5.4.2+1
|
||||
# 网络缓存图片
|
||||
cached_network_image: ^3.2.1
|
||||
# 上拉加载和下拉刷新的组件
|
||||
|
|
@ -52,7 +52,6 @@ dependencies:
|
|||
photo_view: ^0.14.0
|
||||
# 加密验签插件,支持SHA MD5 HMAC
|
||||
crypto: ^3.0.2
|
||||
json_annotation: ^4.8.1
|
||||
# 获取app版本号
|
||||
package_info: ^2.0.2
|
||||
# 网络监控
|
||||
|
|
@ -65,12 +64,18 @@ dependencies:
|
|||
# APP内存及本地存储插件
|
||||
get_storage: ^2.0.3
|
||||
|
||||
# start retrofit请求封装
|
||||
json_annotation: ^4.8.1
|
||||
retrofit: ^4.1.0
|
||||
# end retrofit请求封装
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
retrofit_generator: ^7.0.8
|
||||
build_runner: ^2.4.9
|
||||
json_serializable: ^6.3.1
|
||||
build_runner: ^2.4.8
|
||||
|
||||
# The "flutter_lints" package below contains a set of recommended lints to
|
||||
# encourage good coding practices. The lint set provided by the package is
|
||||
|
|
|
|||
Loading…
Reference in New Issue