初始化项目

This commit is contained in:
wyf
2025-04-11 08:47:46 +08:00
parent e0e1055d65
commit 9396f18d09
199 changed files with 6516 additions and 216 deletions

View File

@@ -0,0 +1,17 @@
class ApiResponse<T> {
int? code;
T? data;
String? msg;
ApiResponse({required this.code, this.data, this.msg});
factory ApiResponse.fromJson(
Map<String, dynamic> json, T Function(Object?) fromJsonT) {
return ApiResponse<T>(
code: json['code'] as int,
data: json['data'] != null ? fromJsonT(json['data']) : null,
msg: json['msg'] as String?,
);
}
}