AGREEMENT_MAP = {
+ AGREEMENT_KEY.PRIVACY_GREEMENT: AgreementClass(
+ title: '隐私协议',
+ richText: '''本软件尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、
+ 更有个性化的服务,本软件会按照本隐私权政策的规定使用和披露您的个人信息。但本软件将以高度的勤勉、审慎义务对待这些信息。
+ 除本隐私权政策另有规定外,在未征得您事先许可的情况下,本软件不会将这些信息对外披露或向第三方提供。本软件会不时更新本隐私权政策。
+ 您在同意本软件服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于本软件服务使用协议不可分割的一部分。
+
1.适用范围
a)在您使用本软件网络服务,本软件自动接收并记录的您的手机上的信息,包括但不限于您的健康数据、使用的语言、
+ 访问日期和时间、软硬件特征信息及您需求的网页记录等数据;
2.信息的使用
a)在获得您的数据之后,本软件会将其上传至服务器,
+ 以生成您的排行榜数据,以便您能够更好地使用服务。
3.信息披露
a)本软件不会将您的信息披露给不受信任的第三方。
+
b)根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露;
c)如您出现违反中国有关法律、
+ 法规或者相关规则的情况,需要向第三方披露;
4.信息存储和交换
本软件收集的有关您的信息和资料将保存在本软件及(或)其关联公司的服务器上,
+ 这些信息和资料可能传送至您所在国家、地区或本软件收集信息和资料所在地的境外并在境外被访问、存储和展示。
+
5.信息安全
a)在使用本软件网络服务进行网上交易时,您不可避免的要向交易对方或潜在的交易对方披露自己的个人信息,如联络方式或者邮政地址。
+ 请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,请您立即联络本软件客服,以便本软件采取相应措施。
+
''',
+ ),
+ AGREEMENT_KEY.USER_AGREEMENT: AgreementClass(
+ title: '用户协议',
+ richText:
+ '''用户在使用技术开发方(即,以下统称“技术开发方”)提供的各项服务之前,应仔细阅读本《用户协议》(以下简称“本协议”)。用户一旦登录或使用技术开发方的服务,即视为用户已了解并明示同意本协议各项内容,本协议立即在用户与本技术开发方之间产生法律效力。用户登录、使用本产品服务的全部活动将受到本协议的约束并承担相应的责任和义务。如用户不同意本协议任何内容的,请用户立即停止使用技术开发方所提供的全部服务。 根据《中华人民共和国网络安全法》、《电信和互联网用户个人信息保护规定》及相关法律法规的规定,同时依据技术开发方与其合作伙伴之间的相关协议,用户必须已明示授权技术开发方合作伙伴(以下简称“合作伙伴”)、在此明示授权并委托技术开发方及其关联公司通过官方或相关实名认证平台、信用信息平台(包括但不限于:征信机构、银行信用信息平台、网络借贷平台、消费金融平台、第三方支付平台、公积金平台、投资理财平台等)及其它相关平台查询、验证、存储用户的个人信用信息,并输出给合作伙伴对用户的个人信用进行评估与参考使用。用户理解并同意,具体的授权查询、验证、存储及输出的内容以合作伙伴要求查询、验证、存储、输出以及技术开发方及其关联公司实际查询、验证、存储、输出的信息为准。技术开发方及其关联公司会在授权范围内对相关个人信息予以处理(包括但不限于为保护用户个人信息而加密处理、掩码处理等一切为实现相关协议目的而进行的所有必要处理)并仅提供给合作伙伴使用,但用户与合作伙伴之间因授权的有效性、授权内容、授权范围、授权期限等发生的争议纠纷与技术开发方无关。如用户对合作伙伴的上述授权事项有任何异议或争议的,应立即停止使用技术开发方所提供的全部服务。用户使用本服务的,即表明用户已明示对合作伙伴、技术开发方及其关联公司授权查询、验证、处理、存储、在约定范围内使用其个人信息,并对授权的效力、查询验证的内容、查询验证平台、处理方式、使用范围等相关事项无任何事实或法律上的异议或争议。 鉴于用户须授权合作伙伴并由该合作伙伴告知本服务后方能进入、登录并使用本服务,用户登录或使用本服务时起即视为用户与技术开发方的合作伙伴之间已存在合法的、充分的、必要的、不可撤销的授权,且用户已清楚知晓其授权提供相关信息可能对其造成的相关不利影响,如负面的信用评价等。为保护用户个人信息,技术开发方会采取合理措施对用户信息进行严格保密,同时督促并要求该特定合作伙伴进行严格保密。未经用户授权,技术开发方及其关联公司不会将用户信息提供给任何其他方。
一、协议主体
本协议是用户与技术开发方关于用户使用本服务所订立的协议。
二、关于本服务
本服务内容是指技术开发方通过本应用程序向其合作伙伴及用户提供的相关服务(简称“本服务”)。
对用户使用的本服务,技术开发方会不断丰富用户使用本服务的终端、形式等。
许可的范围:
-(1)技术开发方授予用户一项个人的、不可转让及非排他性的许可,以使用本应用程序。
-(2)本条及本协议其他条款未明示授权的其他一切知识产权权利仍由技术开发方保留。技术开发方如果未行使前述任何权利,并不构成对该权利的放弃。
三、账号登录
为使用本应用程序用户可能需要输入个人信息进行登录与使用。 用户清楚知晓,其向技术开发方提供的账户仅限本人使用,否则,用户可能会对用户或他人造成侵权。用户承诺并同意,使用同一设备、同一身份证号或账号使用本协议项下服务的,均视为用户本人的行为。用户应妥善保管自身设备、身份证件及账号密码信息,审慎交由他人使用或使用他人设备、身份证件或账户信息,如用户违反本约定给用户或他人造成损失的,技术开发方不应也不会承担任何法律责任。用户若因此给技术开发方造成损失的,应承担技术开发方所遭受的全部损失。
四、应用程序的使用
如果用户从非技术开发方合作伙伴的应用程序或非技术开发方合作伙伴处获取本应用程序或与本应用程序名称相同的安装程序,技术开发方无法保证该应用程序能够正常使用,并对因此给用户造成的损失不予负责。
五、应用程序的更新
为了增进用户体验、完善服务内容,技术开发方将不断努力为用户时时提供应用程序更新(这些更新可能会采取应用程序替换、修改、功能强化、版本升级等形式)。
为了改善用户体验,并保证服务的安全性和功能的一致性,技术开发方有权不经向用户特别通知而对应用程序进行更新,或者对应用程序的部分功能效果进行改变或限制。
六、用户个人信息保护
保护用户个人信息是技术开发方的一项基本原则,技术开发方将会采取合理的措施保护用户的个人信息。除法律法规规定及用户授权的情形外,未经用户许可技术开发方不会向任何第三方公开、透露用户个人信息。
用户在登录账号或使用本服务的过程中,可能需要填写一些必要的信息。若用户填写的信息不真实或不完整,则可能无法正常使用本服务。
一般情况下,用户可随时浏览、修改自己提交的信息,但出于安全性和身份识别的考虑,用户可能无法修改注册时提供的初始注册信息及其他验证信息。
技术开发方将运用各种安全技术和程序建立完善的管理制度来保护用户的个人信息,以免遭受未经授权的访问、使用或披露。
七、授权事项及行为规范
授权事项
-(1)用户充分理解并同意:用户在使用本服务时,可能需要使用用户终端设备的相关权限、接口及相关设备信息等才能实现相应的功能。
-(2)用户可以选择不向技术开发方提供用户的某些信息,但因此可能会导致相关服务功能无法实现。
-(3)为实现本协议目的为合作伙伴及用户提供更加优质、安全的服务,用户同意并明示授权技术开发方及其关联公司对用户的相关个人信息进行查询、验证、存储、处理并在约定范围内使用(提供给用户已授权的合作伙伴对用户进行信用评估及参考使用)。技术开发方及其关联公司对用户的个人信息进行严格保密。本协议项下的授权为不可撤销的授权。
-(4)用户知晓并明示授权同意技术开发方及其关联公司依据相关法律法规的规定,受合作伙伴委托向第三方征信机构或数据机构等合法查询、验证、审核用户信息,上述信息包括但不限于个人基本信息、特征信息(包括但不限于用户的法院失信信息、网络失信信息、是否为羊毛党信息、是否曾使用通讯小号及可疑设备信息等)、关联信息(即用户的身份证信息、手机号、手机设备及银行卡之间的关联关系,以判断用户信息是否有异常,该关联关系不涉及具体的个人敏感信息)、借贷交易信息、网络投资理财信息、公积金信息、公用事业信息、央行征信报告、个人网络数据信息等合作伙伴需要验证或参考使用的相关用户信息。技术开发方具体查询、验证及审核的信息最终以合作伙伴需要验证、需要参考使用及实际验证与使用的信息为准。技术开发方对所获取的信息,仅在用户与合作伙伴之间有关个人信用信息评估等合作伙伴业务相关工作中使用。技术开发方及其关联公司将对所获取的信息向该合作伙伴进行提供,除此之外,未经用户授权,技术开发方及其关联公司不得也不会向其他机构或个人泄露、披露或提供用户的信息
用户禁止行为除非法律允许或技术开发方书面许可,用户不得从事下列行为:
-(1)删除本应用程序及其副本上关于著作权的信息。
-(2)对本应用程序进行反向工程、反向汇编、反向编译,或者以其他方式尝试发现本应用程序的源代码。
-(3)对技术开发方拥有知识产权的内容进行使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版等。
-(4)通过修改或伪造应用程序运行中的指令、数据,增加、删减、变动应用程序的功能或运行效果,或者将用于上述用途的应用程序、方法进行运营或向公众传播,无论这些行为是否为商业目的。
-(5)自行、授权他人或利用第三方应用程序对本应用程序及其组件、模块、数据等进行干扰。
-(6)其他未经技术开发方明示授权的行为。
对自己行为负责用户充分了解并同意,用户必须为自己对合作伙伴的授权(包括但不限于授权方式、授权内容及授权期限等)以及其账户下的相关行为负责。技术开发方会督促合作伙伴获取用户的授权后方能对相关信息进行查询、验证或使用并要求合作伙伴对用户的信息进行严格保密,但用户应对使用本服务时接触到的内容自行加以判断,如对授权相关事项及信息安全有任何异议或争议的,应立即停止使用本服务。技术开发方无法且不会对用户与合作伙伴之间的任何争议或纠纷而承担责任,用户未按约定要求立即停止使用本服务的,技术开发方对非因技术开发方的原因而产生的任何风险或损失将不承担任何责任。
八、知识产权声明
技术开发方是本应用程序的知识产权权利人。本应用程序的著作权、商标权、专利权、商业秘密等知识产权,以及与本应用程序相关的所有信息内容(包括但不限于文字、图片、音频、视频、图表、界面设计、版面框架、有关数据或电子文档等)均受中华人民共和国法律法规和相应的国际条约保护,技术开发方依法享有上述相关知识产权,但相关权利人依照法律规定应享有的权利除外。
未经技术开发方或相关权利人书面同意,用户不得为任何商业或非商业目的自行或许可任何第三方实施、利用、转让上述知识产权。
九、终端安全责任
用户理解并同意,本应用程序或本服务同大多数互联网应用程序、服务一样,可能会受多种因素影响(包括但不限于用户原因、网络服务质量、社会环境等);也可能会受各种安全问题的侵扰(包括但不限于他人非法利用用户资料,进行现实中的骚扰;用户下载安装的其他应用程序或访问的其他网站中可能含有病毒、木马程序或其他恶意程序,威胁用户终端的信息和数据的安全,继而影响本应用程序、本服务的正常使用等)。因此,用户应加强信息安全及个人信息的保护意识,注意密码保护,以免遭受损失。出现上述情况时技术开发方将努力在第一时间与相关方配合,及时进行修复,但是由此给用户造成的损失技术开发方在法律允许的范围内免责。
用户不得制作、发布、使用、传播用于窃取技术开发方账号及他人个人信息、财产的恶意程序。
维护应用程序安全与正常使用是技术开发方和用户的共同责任,技术开发方将按照行业标准合理审慎地采取必要技术措施保护用户的终端信息和数据安全。
在法律允许的范围内,技术开发方对以下情形导致的服务中断或受阻不承担责任:
-(1)受到计算机病毒、木马或其他恶意程序、黑客攻击的破坏。
-(2)用户或技术开发方的电脑软件、系统、硬件和通信线路出现故障。
-(3)用户操作不当。
-(4)用户通过非技术开发方授权的方式使用本服务。
-(5)其他技术开发方无法控制或合理预见的情形。
十、不可抗力及合理免责
“不可抗力”是指在本协议签订后发生的、受影响一方无法预见、无法避免并无法克服的客观情况。此等事件包括但不限于水灾、火灾、旱灾、台风、地震及其它自然灾害、罢工、骚动、暴乱及战争以及政府部门的作为或不作为、法律法规或政策调整、数据来源变更(包括但不限于其服务内容及形式的变更)、国内数据渠道瘫痪、黑客攻击、计算机病毒侵入、新型病毒爆发、因电信运营商问题导致网络中断服务器不可访问、停电、系统故障、传输线路、通信故障等技术开发方无法控制的因素。因受不可抗力影响而不能履行或不能完全履行本协议的不视为违约,不应承担相应违约责任 。
十一、其他
用户使用本应用程序或本服务即视为用户已阅读并同意受本协议的约束。技术开发方有权在必要时修改本协议条款。用户可以在本应用程序、本服务的最新版本中查阅相关协议条款。本协议条款变更后,如果用户继续登录、使用本应用程序、本服务,即视为用户已接受修改后的协议。如果用户不接受修改后的协议,应当停止使用本应用程序。
本协议的成立、生效、履行、解释及纠纷解决,适用中华人民共和国大陆地区法律(不包括冲突法)。
若用户和技术开发方之间发生任何纠纷或争议,首先应友好协商解决;协商不成的,用户同意将纠纷或争议提交被告方所在地人民法院管辖。
本协议所有条款的标题仅为阅读方便,本身并无实际涵义,不能作为本协议涵义解释的依据。5. 本协议条款无论因何种原因部分无效或不可执行,其余条款仍有效,对双方具有约束力。
''',
+ )
+};
+
+/* TYPE */
+class AgreementClass {
+ String title;
+ String richText;
+ AgreementClass({required this.title, required this.richText});
+}
diff --git a/lib/common/job/common/base_page.dart b/lib/common/job/common/base_page.dart
new file mode 100644
index 0000000..375cd1a
--- /dev/null
+++ b/lib/common/job/common/base_page.dart
@@ -0,0 +1,31 @@
+/*
+ * @Author: wangyang 1147192855@qq.com
+ * @Date: 2022-07-19 16:17:38
+ * @LastEditors: wangyang 1147192855@qq.com
+ * @LastEditTime: 2022-07-19 16:22:41
+ * @FilePath: \marking_app\lib\common\model\common\base_page.dart
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+import 'package:json_annotation/json_annotation.dart';
+
+part 'base_page.g.dart';
+
+
+@JsonSerializable()
+ class BasePage extends Object {
+
+ @JsonKey(name: 'Page')
+ int page;
+
+ @JsonKey(name: 'Limit')
+ int limit;
+
+ BasePage(this.page,this.limit,);
+
+ factory BasePage.fromJson(Map srcJson) => _$BasePageFromJson(srcJson);
+
+ Map toJson() => _$BasePageToJson(this);
+
+}
+
+
diff --git a/lib/common/job/common/base_page.g.dart b/lib/common/job/common/base_page.g.dart
new file mode 100644
index 0000000..7169c8d
--- /dev/null
+++ b/lib/common/job/common/base_page.g.dart
@@ -0,0 +1,17 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'base_page.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+BasePage _$BasePageFromJson(Map json) => BasePage(
+ json['Page'] as int,
+ json['Limit'] as int,
+ );
+
+Map _$BasePageToJson(BasePage instance) => {
+ 'Page': instance.page,
+ 'Limit': instance.limit,
+ };
diff --git a/lib/common/job/common/base_page_data.dart b/lib/common/job/common/base_page_data.dart
new file mode 100644
index 0000000..3fde8be
--- /dev/null
+++ b/lib/common/job/common/base_page_data.dart
@@ -0,0 +1,29 @@
+/*
+ * @Author: wangyang 1147192855@qq.com
+ * @Date: 2022-07-18 17:44:15
+ * @LastEditors: wangyang 1147192855@qq.com
+ * @LastEditTime: 2022-07-19 16:19:15
+ * @FilePath: \marking_app\lib\common\model\common\base_page.dart
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+import 'package:json_annotation/json_annotation.dart';
+
+part 'base_page_data.g.dart';
+
+@JsonSerializable(genericArgumentFactories: true, fieldRename: FieldRename.snake)
+ class BasePageData extends Object {
+
+ @JsonKey(name: 'items')
+ List items;
+
+ @JsonKey(name: 'total')
+ int total;
+
+ BasePageData(this.items,this.total,);
+
+
+ factory BasePageData.fromJson( Map json, T Function(dynamic json) fromJsonT) => _$BasePageDataFromJson(json, fromJsonT);
+ Map toJson(Object Function(T value) toJsonT) => _$BasePageDataToJson(this, toJsonT);
+}
+
+
diff --git a/lib/common/job/common/base_page_data.g.dart b/lib/common/job/common/base_page_data.g.dart
new file mode 100644
index 0000000..6f6a5c6
--- /dev/null
+++ b/lib/common/job/common/base_page_data.g.dart
@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'base_page_data.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+BasePageData _$BasePageDataFromJson(
+ Map json,
+ T Function(Object? json) fromJsonT,
+) =>
+ BasePageData(
+ (json['items'] as List).map(fromJsonT).toList(),
+ json['total'] as int,
+ );
+
+Map _$BasePageDataToJson(
+ BasePageData instance,
+ Object? Function(T value) toJsonT,
+) =>
+ {
+ 'items': instance.items.map(toJsonT).toList(),
+ 'total': instance.total,
+ };
diff --git a/lib/common/job/common/base_page_data_report.dart b/lib/common/job/common/base_page_data_report.dart
new file mode 100644
index 0000000..69177b6
--- /dev/null
+++ b/lib/common/job/common/base_page_data_report.dart
@@ -0,0 +1,19 @@
+import 'package:json_annotation/json_annotation.dart';
+
+part 'base_page_data_report.g.dart';
+
+
+@JsonSerializable(genericArgumentFactories: true, fieldRename: FieldRename.snake)
+ class BasePageDataReport extends Object {
+
+ @JsonKey(name: 'Data')
+ List items;
+
+ @JsonKey(name: 'Total')
+ int total;
+
+ BasePageDataReport(this.items,this.total,);
+
+ factory BasePageDataReport.fromJson( Map json, T Function(dynamic json) fromJsonT) => _$BasePageDataReportFromJson(json, fromJsonT);
+ Map toJson(Object Function(T value) toJsonT) => _$BasePageDataReportToJson(this, toJsonT);
+}
\ No newline at end of file
diff --git a/lib/common/job/common/base_page_data_report.g.dart b/lib/common/job/common/base_page_data_report.g.dart
new file mode 100644
index 0000000..74206d4
--- /dev/null
+++ b/lib/common/job/common/base_page_data_report.g.dart
@@ -0,0 +1,25 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'base_page_data_report.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+BasePageDataReport _$BasePageDataReportFromJson(
+ Map json,
+ T Function(Object? json) fromJsonT,
+) =>
+ BasePageDataReport(
+ (json['Data'] as List).map(fromJsonT).toList(),
+ json['Total'] as int,
+ );
+
+Map _$BasePageDataReportToJson(
+ BasePageDataReport instance,
+ Object? Function(T value) toJsonT,
+) =>
+ {
+ 'Data': instance.items.map(toJsonT).toList(),
+ 'Total': instance.total,
+ };
diff --git a/lib/common/job/common/base_page_report.dart b/lib/common/job/common/base_page_report.dart
new file mode 100644
index 0000000..ca139cf
--- /dev/null
+++ b/lib/common/job/common/base_page_report.dart
@@ -0,0 +1,31 @@
+/*
+ * @Author: wangyang 1147192855@qq.com
+ * @Date: 2022-07-19 16:17:38
+ * @LastEditors: wangyang 1147192855@qq.com
+ * @LastEditTime: 2022-07-19 16:22:41
+ * @FilePath: \marking_app\lib\common\model\common\base_page.dart
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+import 'package:json_annotation/json_annotation.dart';
+
+part 'base_page_report.g.dart';
+
+
+@JsonSerializable()
+ class BasePageReport extends Object {
+
+ @JsonKey(name: 'PageIndex')
+ int page;
+
+ @JsonKey(name: 'PageSize')
+ int limit;
+
+ BasePageReport(this.page,this.limit,);
+
+ factory BasePageReport.fromJson(Map srcJson) => _$BasePageReportFromJson(srcJson);
+
+ Map toJson() => _$BasePageReportToJson(this);
+
+}
+
+
diff --git a/lib/common/job/common/base_page_report.g.dart b/lib/common/job/common/base_page_report.g.dart
new file mode 100644
index 0000000..524ffcd
--- /dev/null
+++ b/lib/common/job/common/base_page_report.g.dart
@@ -0,0 +1,19 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'base_page_report.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+BasePageReport _$BasePageReportFromJson(Map json) =>
+ BasePageReport(
+ json['PageIndex'] as int,
+ json['PageSize'] as int,
+ );
+
+Map _$BasePageReportToJson(BasePageReport instance) =>
+ {
+ 'PageIndex': instance.page,
+ 'PageSize': instance.limit,
+ };
diff --git a/lib/common/job/common/base_structure_result.dart b/lib/common/job/common/base_structure_result.dart
new file mode 100644
index 0000000..0518311
--- /dev/null
+++ b/lib/common/job/common/base_structure_result.dart
@@ -0,0 +1,38 @@
+/*
+ * @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.g.dart';
+
+@JsonSerializable(genericArgumentFactories: true, fieldRename: FieldRename.snake)
+class BaseStructureResult extends Object {
+ @JsonKey(name: 'success')
+ bool success;
+
+ @JsonKey(name: 'code')
+ int code;
+
+ @JsonKey(name: 'message')
+ String? message;
+
+ @JsonKey(name: 'data')
+ T? data;
+
+ BaseStructureResult(
+ this.code,
+ this.message,
+ this.data, {
+ this.success = false,
+ }) {
+ success = (code == RequestConfig.successCode);
+ }
+ factory BaseStructureResult.fromJson(Map json, T Function(dynamic json) fromJsonT) => _$BaseStructureResultFromJson(json, fromJsonT);
+ Map toJson(Object Function(T value) toJsonT) => _$BaseStructureResultToJson(this, toJsonT);
+}
diff --git a/lib/common/job/common/base_structure_result.g.dart b/lib/common/job/common/base_structure_result.g.dart
new file mode 100644
index 0000000..0398e4c
--- /dev/null
+++ b/lib/common/job/common/base_structure_result.g.dart
@@ -0,0 +1,41 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'base_structure_result.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+BaseStructureResult _$BaseStructureResultFromJson(
+ Map json,
+ T Function(Object? json) fromJsonT,
+) =>
+ BaseStructureResult(
+ json['code'] as int,
+ json['message'] as String?,
+ _$nullableGenericFromJson(json['data'], fromJsonT),
+ success: json['success'] as bool? ?? false,
+ );
+
+Map _$BaseStructureResultToJson(
+ BaseStructureResult instance,
+ Object? Function(T value) toJsonT,
+) =>
+ {
+ 'success': instance.success,
+ 'code': instance.code,
+ 'message': instance.message,
+ 'data': _$nullableGenericToJson(instance.data, toJsonT),
+ };
+
+T? _$nullableGenericFromJson(
+ Object? input,
+ T Function(Object? json) fromJson,
+) =>
+ input == null ? null : fromJson(input);
+
+Object? _$nullableGenericToJson(
+ T? input,
+ Object? Function(T value) toJson,
+) =>
+ input == null ? null : toJson(input);
diff --git a/lib/common/job/common/base_structure_result_report.dart b/lib/common/job/common/base_structure_result_report.dart
new file mode 100644
index 0000000..008eac6
--- /dev/null
+++ b/lib/common/job/common/base_structure_result_report.dart
@@ -0,0 +1,38 @@
+/*
+ * @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 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 json, T Function(dynamic json) fromJsonT) => _$BaseStructureResultReportFromJson(json, fromJsonT);
+ Map toJson(Object Function(T value) toJsonT) => _$BaseStructureResultReportToJson(this, toJsonT);
+}
diff --git a/lib/common/job/common/base_structure_result_report.g.dart b/lib/common/job/common/base_structure_result_report.g.dart
new file mode 100644
index 0000000..00e7b5b
--- /dev/null
+++ b/lib/common/job/common/base_structure_result_report.g.dart
@@ -0,0 +1,41 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'base_structure_result_report.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+BaseStructureResultReport _$BaseStructureResultReportFromJson(
+ Map json,
+ T Function(Object? json) fromJsonT,
+) =>
+ BaseStructureResultReport(
+ json['Code'] as int,
+ json['Message'] as String?,
+ _$nullableGenericFromJson(json['Data'], fromJsonT),
+ success: json['success'] as bool? ?? false,
+ );
+
+Map _$BaseStructureResultReportToJson(
+ BaseStructureResultReport instance,
+ Object? Function(T value) toJsonT,
+) =>
+ {
+ 'success': instance.success,
+ 'Code': instance.code,
+ 'Message': instance.message,
+ 'Data': _$nullableGenericToJson(instance.data, toJsonT),
+ };
+
+T? _$nullableGenericFromJson(
+ Object? input,
+ T Function(Object? json) fromJson,
+) =>
+ input == null ? null : fromJson(input);
+
+Object? _$nullableGenericToJson(
+ T? input,
+ Object? Function(T value) toJson,
+) =>
+ input == null ? null : toJson(input);
diff --git a/lib/common/job/common/upload_img_secret_key.dart b/lib/common/job/common/upload_img_secret_key.dart
new file mode 100644
index 0000000..19465ec
--- /dev/null
+++ b/lib/common/job/common/upload_img_secret_key.dart
@@ -0,0 +1,57 @@
+import 'package:json_annotation/json_annotation.dart';
+
+part 'upload_img_secret_key.g.dart';
+
+
+@JsonSerializable()
+ class UploadImgSecretKey extends Object {
+
+ @JsonKey(name: 'account')
+ String? account;
+
+ @JsonKey(name: 'bucketName')
+ String? bucketName;
+
+ @JsonKey(name: 'endPoint')
+ int? endPoint;
+
+ @JsonKey(name: 'ip')
+ String? ip;
+
+ @JsonKey(name: 'password')
+ String? password;
+
+ @JsonKey(name: 'imgSecretKey')
+ bool? imgSecretKey;
+
+ // 是否打开工具
+ bool annotationSwitch;
+
+ UploadImgSecretKey({this.account,this.bucketName,this.endPoint,this.ip,this.password,this.imgSecretKey,this.annotationSwitch = false});
+
+ factory UploadImgSecretKey.fromJson(Map srcJson) => _$UploadImgSecretKeyFromJson(srcJson);
+
+ Map toJson() => _$UploadImgSecretKeyToJson(this);
+
+}
+
+
+/// 返回结果文件实体类
+@JsonSerializable()
+class FileResult extends Object{
+ String? path; // 本地相对地址
+ String? url; // 图片上传返回url地址
+ dynamic? otherParam;
+ String myObject; // 我的项目名称
+ bool success; // 是否成功
+
+
+ FileResult({required this.myObject, this.url, this.success = false,this.otherParam});
+
+
+
+ factory FileResult.fromJson(Map srcJson) => _$FileResultFromJson(srcJson);
+
+ Map toJson() => _$FileResultToJson(this);
+}
+
diff --git a/lib/common/job/common/upload_img_secret_key.g.dart b/lib/common/job/common/upload_img_secret_key.g.dart
new file mode 100644
index 0000000..04211a5
--- /dev/null
+++ b/lib/common/job/common/upload_img_secret_key.g.dart
@@ -0,0 +1,45 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'upload_img_secret_key.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+UploadImgSecretKey _$UploadImgSecretKeyFromJson(Map json) =>
+ UploadImgSecretKey(
+ account: json['account'] as String?,
+ bucketName: json['bucketName'] as String?,
+ endPoint: json['endPoint'] as int?,
+ ip: json['ip'] as String?,
+ password: json['password'] as String?,
+ imgSecretKey: json['imgSecretKey'] as bool?,
+ annotationSwitch: json['annotationSwitch'] as bool? ?? false,
+ );
+
+Map _$UploadImgSecretKeyToJson(UploadImgSecretKey instance) =>
+ {
+ 'account': instance.account,
+ 'bucketName': instance.bucketName,
+ 'endPoint': instance.endPoint,
+ 'ip': instance.ip,
+ 'password': instance.password,
+ 'imgSecretKey': instance.imgSecretKey,
+ 'annotationSwitch': instance.annotationSwitch,
+ };
+
+FileResult _$FileResultFromJson(Map json) => FileResult(
+ myObject: json['myObject'] as String,
+ url: json['url'] as String?,
+ success: json['success'] as bool? ?? false,
+ otherParam: json['otherParam'],
+ )..path = json['path'] as String?;
+
+Map _$FileResultToJson(FileResult instance) =>
+ {
+ 'path': instance.path,
+ 'url': instance.url,
+ 'otherParam': instance.otherParam,
+ 'myObject': instance.myObject,
+ 'success': instance.success,
+ };
diff --git a/lib/common/job/user_info.dart b/lib/common/job/user_info.dart
new file mode 100644
index 0000000..db345cd
--- /dev/null
+++ b/lib/common/job/user_info.dart
@@ -0,0 +1,53 @@
+/*
+ * @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(checked: true)
+ class UserInfo extends Object {
+
+ @JsonKey(name: 'id')
+ String id ='';
+
+ @JsonKey(name: 'userName')
+ String userName = '';
+
+ @JsonKey(name: 'loginName')
+ String loginName = '';
+
+ @JsonKey(name: 'subjectIds')
+ List subjectIds = [];
+
+ @JsonKey(name: 'schoolId')
+ int schoolId = 0;
+
+ @JsonKey(name: 'schoolName')
+ String schoolName = '';
+
+
+ @JsonKey(name: 'avatar')
+ String avatar ='';
+
+ @JsonKey(name: 'positionNames')
+ List positionNames=[];
+
+
+ UserInfo();
+
+ factory UserInfo.fromJson(Map srcJson) => _$UserInfoFromJson(srcJson);
+
+ Map toJson() => _$UserInfoToJson(this);
+
+}
+
+
diff --git a/lib/common/job/user_info.g.dart b/lib/common/job/user_info.g.dart
new file mode 100644
index 0000000..a0a5342
--- /dev/null
+++ b/lib/common/job/user_info.g.dart
@@ -0,0 +1,41 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'user_info.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+UserInfo _$UserInfoFromJson(Map 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).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).map((e) => e as String).toList());
+ return val;
+ },
+ );
+
+Map _$UserInfoToJson(UserInfo instance) => {
+ 'id': instance.id,
+ 'userName': instance.userName,
+ 'loginName': instance.loginName,
+ 'subjectIds': instance.subjectIds,
+ 'schoolId': instance.schoolId,
+ 'schoolName': instance.schoolName,
+ 'avatar': instance.avatar,
+ 'positionNames': instance.positionNames,
+ };
diff --git a/lib/common/job/user_login.dart b/lib/common/job/user_login.dart
new file mode 100644
index 0000000..7e60083
--- /dev/null
+++ b/lib/common/job/user_login.dart
@@ -0,0 +1,32 @@
+/*
+ * @Author: wangyang 1147192855@qq.com
+ * @Date: 2022-07-13 14:50:51
+ * @LastEditors: wangyang 1147192855@qq.com
+ * @LastEditTime: 2022-07-13 17:22:16
+ * @FilePath: \marking_app\lib\common\model\UserLogin.dart
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+import 'package:json_annotation/json_annotation.dart';
+
+part 'user_login.g.dart';
+
+
+@JsonSerializable(checked: true)
+ class UserLogin extends Object {
+
+ @JsonKey(name: 'access_token')
+ String accessToken;
+
+ @JsonKey(name: 'expires_in')
+ int expiresIn;
+
+ @JsonKey(name: 'token_type')
+ String tokenType;
+
+ UserLogin(this.accessToken,this.expiresIn,this.tokenType,);
+
+ factory UserLogin.fromJson(Map srcJson) => _$UserLoginFromJson(srcJson);
+
+ Map toJson() => _$UserLoginToJson(this);
+
+}
\ No newline at end of file
diff --git a/lib/common/job/user_login.g.dart b/lib/common/job/user_login.g.dart
new file mode 100644
index 0000000..b0b137a
--- /dev/null
+++ b/lib/common/job/user_login.g.dart
@@ -0,0 +1,31 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'user_login.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+UserLogin _$UserLoginFromJson(Map json) => $checkedCreate(
+ 'UserLogin',
+ json,
+ ($checkedConvert) {
+ final val = UserLogin(
+ $checkedConvert('access_token', (v) => v as String),
+ $checkedConvert('expires_in', (v) => v as int),
+ $checkedConvert('token_type', (v) => v as String),
+ );
+ return val;
+ },
+ fieldKeyMap: const {
+ 'accessToken': 'access_token',
+ 'expiresIn': 'expires_in',
+ 'tokenType': 'token_type'
+ },
+ );
+
+Map _$UserLoginToJson(UserLogin instance) => {
+ 'access_token': instance.accessToken,
+ 'expires_in': instance.expiresIn,
+ 'token_type': instance.tokenType,
+ };
diff --git a/lib/common/request/request_config.dart b/lib/common/request/request_config.dart
new file mode 100644
index 0000000..748c652
--- /dev/null
+++ b/lib/common/request/request_config.dart
@@ -0,0 +1,80 @@
+/*
+ * @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 = "http://192.168.2.9:6600"; // 测试环境 ==> 基本请求接口
+ // static const devBaseUrl = "http://192.168.2.8:6700"; // 测试环境 ==> 基本请求接口
+ static const devLoginBaseUrl = "http://192.168.2.9:6400"; // 基本请求接口
+ static const devBaseUrlOfReport = "http://192.168.2.9:4000"; // 获取报告接口*/
+
+ static const devBaseUrl = "https://mk-hw.23544.com"; // 基本请求
+ static const devLoginBaseUrl = "https://mk-hw.23544.com"; // 登录接口
+ static const devBaseUrlOfReport = "https://mhw.qwit.top"; // 获取报告接口
+ static const proBaseUrlOfHomework = "https://mk-hw.23544.com/hw"; // 获取作业接口
+
+ /* 正式地址 */
+ static const proBaseUrl = "https://mk-hw.23544.com"; // 基本请求
+ static const proLoginBaseUrl = "https://mk-hw.23544.com"; // 登录接口
+ static const proBaseUrlOfReport = "https://dc-api.23544.com"; // 获取报告接口
+ // static const proBaseUrlOfHomework = "https://mk-hw.23544.com/hw"; // 获取作业接口
+
+ static const hwProxyKeywords = "/hw"; // 作业代理条件关键字
+
+ // https://mk-api.23544.com/hw/hw/api/Task/answer
+ // http://192.168.2.9:6400/hw/api/Task/answer
+
+ static RequestConfig? _instance;
+ String baseUrl;
+ String loginBaseUrl;
+ String baseUrlOfReport;
+
+ static const connectTimeout = 8000; // 连接超时
+ static const receiveTimeout = 8000; // 接收超时
+
+ static const bool requestDataPrinting = true; // 打印返回数据
+ static const bool printSwitch = true; // 打印返回数据
+
+ static const successCode = 200; // 返回成功code
+ static final BasePage basePage = BasePage(1, 10); // 分页参数
+
+ // 私有化构造函数,防止外部直接实例化
+// 私有化构造函数,防止外部直接实例化
+ RequestConfig._(
+ {required this.baseUrl,
+ required this.baseUrlOfReport,
+ required this.loginBaseUrl});
+
+ factory RequestConfig() {
+ if (_instance == null) {
+ late String newBaseUrl;
+ late String newBaseUrlOfReport;
+ late String newLoginBaseUrl;
+
+ if (bool.fromEnvironment('dart.vm.product')) {
+ // 正式环境下的代码
+
+ newLoginBaseUrl = proLoginBaseUrl;
+ newBaseUrl = proBaseUrl;
+ newBaseUrlOfReport = proBaseUrlOfReport;
+ } else {
+ // 在生产环境下执行的代码
+ newBaseUrl = devBaseUrl;
+ newBaseUrlOfReport = devBaseUrlOfReport;
+ newLoginBaseUrl = devLoginBaseUrl;
+ }
+ _instance = RequestConfig._(
+ baseUrl: newBaseUrl,
+ baseUrlOfReport: newBaseUrlOfReport,
+ loginBaseUrl: newLoginBaseUrl);
+ }
+ return _instance!;
+ }
+}
diff --git a/lib/common/request/rest_dio.dart b/lib/common/request/rest_dio.dart
new file mode 100644
index 0000000..c8fceb0
--- /dev/null
+++ b/lib/common/request/rest_dio.dart
@@ -0,0 +1,427 @@
+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/utils/toast_utils.dart';
+
+class RestDio {
+ late Dio _dio;
+ // 单例模式
+ static final RestDio instance = RestDio._internal();
+ factory RestDio() => instance;
+ RestDio._internal() {
+ init();
+ }
+
+ // 初始化请求配置
+ init() {
+ BaseOptions options = BaseOptions(
+ baseUrl: RequestConfig().baseUrl,
+ connectTimeout: RequestConfig.connectTimeout,
+ receiveTimeout: RequestConfig.receiveTimeout,
+ );
+ _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)); //添加日志
+ }
+ // 添加https证书
+ setHttpsPEM();
+ // setHttpsPKCS12();
+
+ // 使用代理
+ // setFindProxy();
+ }
+ /// restful post 表单提交操作
+ Future get(String path, {Map? queryParameters, Options? options}) async {
+ Options requestOptions = options ?? Options();
+ var response = await _dio.get(
+ path,
+ queryParameters: queryParameters,
+ options: requestOptions,
+ cancelToken: CancelToken(),
+ );
+ return response.data;
+ }
+
+
+ /// restful post 表单提交操作
+ Future post(String path, {Map? data, Options? options}) async {
+ Options requestOptions = options ?? Options();
+ var response = await _dio.post(
+ path,
+ data: data,
+ options: requestOptions,
+ cancelToken: CancelToken(),
+ );
+ return response.data;
+ }
+
+ String PEM = "XXXXX"; // certificate content
+ String PKCS12File = "XXXXX"; // certificate content
+
+ //dio 基本方法
+ Future 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); // 继续发送请求
+ }));
+ }
+}
+
+/*
+*
+*AuthInterceptor
+*添加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;
+ if (Platform.isIOS) {
+ PLATFORM = "ios";
+ } else if (Platform.isAndroid) {
+ PLATFORM = "android";
+ } else if (Platform.isWindows) {
+ PLATFORM = "Windows";
+ } else if (Platform.isMacOS) {
+ PLATFORM = "macos";
+ } else if (Platform.isLinux) {
+ PLATFORM = "Linux";
+ }
+
+ Map headers = {};
+ headers["Accept-Charset"] = "utf-8";
+ headers["Connection"] = "keep-alive";
+ headers["Accept"] = "*/*";
+ headers["x-version"] = version; //自己更改配置
+ headers["x-platform"] = PLATFORM;
+ //获取存储数据 保存header token
+ String? token = StorageService.to.read(AppStorageKey.STORAGE_USER_TOKEN);
+
+ if (null != token && token.isNotEmpty) {
+ headers["Authorization"] = 'Bearer $token'; //添加自己项目中的请求头 进行保存
+ }
+
+ 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);
+ }
+}
+
+/*
+ * ResponseHandle
+ * 监听返回响应
+ **/
+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);
+ }
+ super.onResponse(response, handler);
+ }
+}
+
+/*
+ * ResponseHandle
+ * 监听返回响应
+ **/
+class TheError extends Interceptor {
+ // 是否有网
+ Future isConnected() async {
+ var connectivityResult = await (Connectivity().checkConnectivity());
+ return connectivityResult != ConnectivityResult.none;
+ }
+
+ @override
+ Future 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) {
+ 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);
+ }
+ }
+ 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;
+ default:
+ }
+ }
+
+ static void toLogin(context, {int timeer = 800}) {
+ /* setTimeOut(
+ timeer,
+ () => RouterManager.router.navigateTo(context, RouterManager.loginPath, clearStack: true),
+ );*/
+ }
+}
+
+// 这里是一个我单独写得soket错误实例,因为dio默认生成的是不允许修改message内容的,我只能自定义一个使用
+class MyDioSocketException extends SocketException {
+ String message;
+
+ MyDioSocketException(
+ this.message, {
+ osError,
+ address,
+ port,
+ }) : super(
+ message,
+ osError: osError,
+ address: address,
+ port: port,
+ );
+}
diff --git a/lib/common/store/app_storage_key.dart b/lib/common/store/app_storage_key.dart
new file mode 100644
index 0000000..00f4975
--- /dev/null
+++ b/lib/common/store/app_storage_key.dart
@@ -0,0 +1,15 @@
+/// 用户 - 配置信息
+
+// ignore_for_file: constant_identifier_names
+class AppStorageKey {
+ /// 登录用户的基本信息
+ static const String STORAGE_USER_INFO = 'user_info';
+
+ /// 登录用户的token
+ static const String STORAGE_USER_TOKEN = 'APP:TOKEN';
+
+ /// 用户输入过的手机号码
+ static const String STORAGE_USER_MOBILE = 'user_mobile';
+
+
+}
diff --git a/lib/common/store/user_store.dart b/lib/common/store/user_store.dart
new file mode 100644
index 0000000..1a39ecf
--- /dev/null
+++ b/lib/common/store/user_store.dart
@@ -0,0 +1,48 @@
+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/routes/app_pages.dart';
+
+class UserStore extends GetxController {
+ static UserStore get to => Get.find();
+ /// 是否登录
+ final isLogin = false.obs;
+ String token = '';
+ /// 用户信息
+ Rx userInfo = Rx(UserInfo());
+
+ void init() {
+ /*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();
+ StorageService.to.remove(AppStorageKey.STORAGE_USER_INFO);
+ }
+ if (token.isNotEmpty && userInfo.value.loginName.isNotEmpty) {
+ isLogin.value = true;
+ }else{
+ isLogin.value = false;
+ Get.toNamed(Routes.login);
+ }*/
+
+
+ }
+
+ /// 保存 token
+ void setToken(String token) {
+ token = token;
+ StorageService.to.write(AppStorageKey.STORAGE_USER_TOKEN, token);
+ }
+ /// 保存 token
+ void setUserInfo(UserInfo info) {
+ userInfo.value = info;
+ StorageService.to.write(AppStorageKey.STORAGE_USER_INFO, info);
+ }
+}
diff --git a/lib/common/the_global.dart b/lib/common/the_global.dart
new file mode 100644
index 0000000..63cb902
--- /dev/null
+++ b/lib/common/the_global.dart
@@ -0,0 +1,6 @@
+import 'package:flutter/material.dart';
+
+// 全局 GlobalKey
+class TheGlobal {
+ static GlobalKey navigatorKey = GlobalKey();
+}
\ No newline at end of file
diff --git a/lib/common/utils/common_utils.dart b/lib/common/utils/common_utils.dart
new file mode 100644
index 0000000..e7bb2a8
--- /dev/null
+++ b/lib/common/utils/common_utils.dart
@@ -0,0 +1,21 @@
+/*
+ * @Author: wangyang 1147192855@qq.com
+ * @Date: 2022-07-13 16:59:53
+ * @LastEditors: wangyang 1147192855@qq.com
+ * @LastEditTime: 2022-07-13 17:00:56
+ * @FilePath: \marking_app\lib\utils\common_utils.dart
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+import 'dart:convert';
+import 'package:convert/convert.dart';
+import 'package:crypto/crypto.dart';
+
+class CommonUtils {
+ // md5 加密
+ static String generateMD5(String data) {
+ var content = new Utf8Encoder().convert(data);
+ var digest = md5.convert(content);
+ // 这里其实就是 digest.toString()
+ return hex.encode(digest.bytes);
+ }
+}
diff --git a/lib/common/utils/storage.dart b/lib/common/utils/storage.dart
new file mode 100644
index 0000000..dd4d5f8
--- /dev/null
+++ b/lib/common/utils/storage.dart
@@ -0,0 +1,30 @@
+import 'package:get/get.dart';
+import 'package:get_storage/get_storage.dart';
+
+class StorageService extends GetxService {
+ static StorageService get to => Get.find();
+ late final GetStorage _getStorage;
+
+ get storage => _getStorage;
+
+ Future init() async {
+ await GetStorage.init();
+ _getStorage = GetStorage();
+ }
+
+ T? read(String key) {
+ return _getStorage.read(key);
+ }
+
+ Future write(String key, dynamic value) async {
+ return await _getStorage.write(key, value);
+ }
+
+ Future remove(String key) async {
+ return await _getStorage.remove(key);
+ }
+
+ bool hasData(String key) {
+ return _getStorage.hasData(key);
+ }
+}
diff --git a/lib/common/utils/toast_utils.dart b/lib/common/utils/toast_utils.dart
new file mode 100644
index 0000000..73b7373
--- /dev/null
+++ b/lib/common/utils/toast_utils.dart
@@ -0,0 +1,82 @@
+/*
+ * @Author: wangyang 1147192855@qq.com
+ * @Date: 2022-07-13 16:31:05
+ * @LastEditors: wangyang 1147192855@qq.com
+ * @LastEditTime: 2022-07-28 11:56:13
+ * @FilePath: \marking_app\lib\utils\toast_utils.dart
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:flutter_easyloading/flutter_easyloading.dart';
+
+class ToastUtils {
+ static void getFluttertoast({
+ required BuildContext context,
+ required String msg,
+ Toast? toastLength,
+ int timeInSecForIosWeb = 1,
+ double? fontSize,
+ ToastGravity? gravity,
+ Color? backgroundColor,
+ Color? textColor,
+ }) {
+ Fluttertoast.showToast(
+ msg: msg,
+ toastLength: toastLength ?? Toast.LENGTH_SHORT,
+ gravity: gravity ?? ToastGravity.CENTER,
+ timeInSecForIosWeb: timeInSecForIosWeb,
+ backgroundColor: backgroundColor ?? Theme.of(context).primaryColor,
+ textColor: textColor ?? Colors.white,
+ fontSize: fontSize ?? 16.sp,
+ );
+ }
+
+ static void getErrFluttertoast({
+ required BuildContext context,
+ required String msg,
+ ToastGravity gravity = ToastGravity.BOTTOM,
+ Color backgroundColor = Colors.grey,
+ Toast? toastLength,
+ int timeInSecForIosWeb = 1,
+ double? fontSize,
+ Color? textColor,
+ }) {
+ ToastUtils.getFluttertoast(
+ context: context,
+ msg: msg,
+ toastLength: toastLength ?? Toast.LENGTH_SHORT,
+ gravity: gravity,
+ timeInSecForIosWeb: timeInSecForIosWeb,
+ backgroundColor: backgroundColor,
+ textColor: textColor ?? Colors.white,
+ fontSize: fontSize ?? 16.sp,
+ );
+ }
+
+ static showError(String showMsg) {
+ EasyLoading.showError(showMsg);
+ }
+
+ static showLoading() {
+ EasyLoading.show(status: 'loading...');
+ }
+
+ static showInfo(String showMsg, {Duration? duration}) {
+ EasyLoading.showInfo(showMsg, duration: duration);
+ }
+
+ static showInfoSimple(String showMsg, int microseconds) {
+ EasyLoading.showInfo(showMsg, duration: Duration(microseconds: microseconds));
+ }
+
+ static showSuccess(String showMsg, {Duration? duration}) {
+ EasyLoading.showSuccess(showMsg, duration: duration);
+ }
+
+ static dismiss() {
+ EasyLoading.dismiss();
+ }
+}
diff --git a/lib/common/utils/utils.dart b/lib/common/utils/utils.dart
new file mode 100644
index 0000000..101e553
--- /dev/null
+++ b/lib/common/utils/utils.dart
@@ -0,0 +1,17 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+class Utils{
+ Utils._internal();
+
+ /// 关闭键盘
+ static void hideKeyboard() {
+ FocusScopeNode? currentFocus = Get.focusScope?.nearestScope;
+ if (currentFocus == null) {
+ return;
+ }
+ if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) {
+ FocusManager.instance.primaryFocus?.unfocus();
+ }
+ }
+}
\ No newline at end of file
diff --git a/lib/main.dart b/lib/main.dart
new file mode 100644
index 0000000..dda52c2
--- /dev/null
+++ b/lib/main.dart
@@ -0,0 +1,164 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import 'package:school_asignment_app/common/config/app_config.dart';
+import 'package:school_asignment_app/common/config/colorUtils.dart';
+import 'package:school_asignment_app/common/store/user_store.dart';
+import 'package:school_asignment_app/common/utils/storage.dart';
+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{
+// 在测试模式下运行Get
+ Get.testMode = true;
+ /// 初始化本地存储
+ StorageService storageService = StorageService();
+ await storageService.init();
+ Get.put(storageService);
+
+ /// 初始化UserStore
+ UserStore userStore = UserStore();
+ userStore.init();
+ Get.put(userStore);
+
+ runApp(const MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ // This widget is the root of your application.
+ @override
+ Widget build(BuildContext context) {
+ return ScreenUtilInit(
+ designSize: const Size(AppConfig.UI_WIDTH, AppConfig.UI_HEIGHT),
+ builder: (BuildContext context, Widget? child) => GetMaterialApp(
+ title: '作业',
+ theme: ThemeData(
+ brightness: Brightness.light,
+ primarySwatch: createMaterialColor(const Color.fromRGBO(46, 91, 255, 1)),
+ // textTheme: Typography.englishLike2018.apply(fontSizeFactor: 1.sp,),
+ primaryTextTheme: TextTheme(
+ bodyLarge: TextStyle(fontSize: 14.sp, color: Colors.black87),
+ ),
+ useMaterial3: true,
+ ),
+ enableLog: true,
+ logWriterCallback: (text, {bool isError = false}) {
+ // isError ? LoggerUtils.e(text) : LoggerUtils.i(text);
+ },
+ //默认专场动画
+ defaultTransition: Transition.fade,
+ //初始化路由页面
+ initialRoute: Routes.startPage,
+ /// 路由表
+ getPages: AppPages.pages,
+ builder: EasyLoading.init(
+ builder: (context, child) {
+ return MediaQuery(
+ //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,
+ ),
+ ),
+ );
+ },
+ ),
+ // home: const MyHomePage(title: 'Flutter Demo Home Page'),
+ ),
+ );
+ }
+}
+
+class MyHomePage extends StatefulWidget {
+ const MyHomePage({super.key, required this.title});
+
+ // This widget is the home page of your application. It is stateful, meaning
+ // that it has a State object (defined below) that contains fields that affect
+ // how it looks.
+
+ // This class is the configuration for the state. It holds the values (in this
+ // case the title) provided by the parent (in this case the App widget) and
+ // used by the build method of the State. Fields in a Widget subclass are
+ // always marked "final".
+
+ final String title;
+
+ @override
+ State createState() => _MyHomePageState();
+}
+
+class _MyHomePageState extends State {
+ int _counter = 0;
+
+ void _incrementCounter() {
+ setState(() {
+ // This call to setState tells the Flutter framework that something has
+ // changed in this State, which causes it to rerun the build method below
+ // so that the display can reflect the updated values. If we changed
+ // _counter without calling setState(), then the build method would not be
+ // called again, and so nothing would appear to happen.
+ _counter++;
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ // This method is rerun every time setState is called, for instance as done
+ // by the _incrementCounter method above.
+ //
+ // The Flutter framework has been optimized to make rerunning build methods
+ // fast, so that you can just rebuild anything that needs updating rather
+ // than having to individually change instances of widgets.
+ return Scaffold(
+ appBar: AppBar(
+ // TRY THIS: Try changing the color here to a specific color (to
+ // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
+ // change color while the other colors stay the same.
+ backgroundColor: Theme.of(context).colorScheme.inversePrimary,
+ // Here we take the value from the MyHomePage object that was created by
+ // the App.build method, and use it to set our appbar title.
+ title: Text(widget.title),
+ ),
+ body: Center(
+ // Center is a layout widget. It takes a single child and positions it
+ // in the middle of the parent.
+ child: Column(
+ // Column is also a layout widget. It takes a list of children and
+ // arranges them vertically. By default, it sizes itself to fit its
+ // children horizontally, and tries to be as tall as its parent.
+ //
+ // Column has various properties to control how it sizes itself and
+ // how it positions its children. Here we use mainAxisAlignment to
+ // center the children vertically; the main axis here is the vertical
+ // axis because Columns are vertical (the cross axis would be
+ // horizontal).
+ //
+ // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
+ // action in the IDE, or press "p" in the console), to see the
+ // wireframe for each widget.
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ const Text(
+ 'You have pushed the button this many times:',
+ ),
+ Text(
+ '$_counter',
+ style: Theme.of(context).textTheme.headlineMedium,
+ ),
+ ],
+ ),
+ ),
+ floatingActionButton: FloatingActionButton(
+ onPressed: _incrementCounter,
+ tooltip: 'Increment',
+ child: const Icon(Icons.add),
+ ), // This trailing comma makes auto-formatting nicer for build methods.
+ );
+ }
+}
diff --git a/lib/page/global_widget/my_text.dart b/lib/page/global_widget/my_text.dart
new file mode 100644
index 0000000..dd62894
--- /dev/null
+++ b/lib/page/global_widget/my_text.dart
@@ -0,0 +1,33 @@
+/*
+ * @Author: wangyang 1147192855@qq.com
+ * @Date: 2022-08-01 14:11:37
+ * @LastEditors: wangyang 1147192855@qq.com
+ * @LastEditTime: 2022-08-02 15:34:34
+ * @FilePath: \marking_app\lib\utils\my_text.dart
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+import 'package:flutter/cupertino.dart';
+import 'package:school_asignment_app/common/config/colorUtils.dart';
+
+// 快捷Text使用
+Text quickText(text,
+ {double? size,
+ Color color = CommonColors.defaultColor,
+ TextAlign? align,
+ FontWeight? fontWeight,
+ TextOverflow overflow = TextOverflow.ellipsis,
+ int maxLines = 1,
+ TextDecoration decoration = TextDecoration.none}) {
+ return Text(
+ text.toString(),
+ textAlign: align,
+ maxLines: maxLines,
+ overflow: overflow,
+ style: TextStyle(
+ decoration: decoration,
+ fontSize: size,
+ color: color,
+ fontWeight: fontWeight,
+ ),
+ );
+}
diff --git a/lib/page/global_widget/start_page.dart b/lib/page/global_widget/start_page.dart
new file mode 100644
index 0000000..647d502
--- /dev/null
+++ b/lib/page/global_widget/start_page.dart
@@ -0,0 +1,58 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+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/routes/app_pages.dart';
+
+class StartPage extends StatefulWidget {
+ const StartPage({Key? key}) : super(key: key);
+
+ @override
+ State createState() => _StartPageState();
+}
+
+class _StartPageState extends State {
+
+ @override
+ 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();
+ }
+ } catch (err, t) {
+ userInfo = UserInfo();
+ StorageService.to.remove(AppStorageKey.STORAGE_USER_INFO);
+ }
+
+
+ if (token.isNotEmpty && userInfo.loginName.isNotEmpty) {
+ Future.delayed(const Duration(milliseconds: 200)).then((e) {
+ Get.toNamed(Routes.home);
+ });
+ }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)),))
+ ]
+ );
+ }
+}
diff --git a/lib/page/home_page/home_binding.dart b/lib/page/home_page/home_binding.dart
new file mode 100644
index 0000000..f5529e7
--- /dev/null
+++ b/lib/page/home_page/home_binding.dart
@@ -0,0 +1,10 @@
+import 'package:get/get.dart';
+
+import 'home_logic.dart';
+
+class HomeBinding extends Bindings {
+ @override
+ void dependencies() {
+ Get.lazyPut(() => HomeLogic());
+ }
+}
diff --git a/lib/page/home_page/home_logic.dart b/lib/page/home_page/home_logic.dart
new file mode 100644
index 0000000..749bfab
--- /dev/null
+++ b/lib/page/home_page/home_logic.dart
@@ -0,0 +1,7 @@
+import 'package:get/get.dart';
+
+import 'home_state.dart';
+
+class HomeLogic extends GetxController {
+ final HomeState state = HomeState();
+}
diff --git a/lib/page/home_page/home_state.dart b/lib/page/home_page/home_state.dart
new file mode 100644
index 0000000..6953451
--- /dev/null
+++ b/lib/page/home_page/home_state.dart
@@ -0,0 +1,5 @@
+class HomeState {
+ HomeState() {
+ ///Initialize variables
+ }
+}
diff --git a/lib/page/home_page/home_view.dart b/lib/page/home_page/home_view.dart
new file mode 100644
index 0000000..25dedd1
--- /dev/null
+++ b/lib/page/home_page/home_view.dart
@@ -0,0 +1,45 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.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/routes/app_pages.dart';
+
+import 'home_logic.dart';
+
+class HomePage extends StatefulWidget {
+ const HomePage({Key? key}) : super(key: key);
+
+ @override
+ State createState() => _HomePageState();
+}
+
+class _HomePageState extends State {
+ final logic = Get.find();
+ final state = Get.find().state;
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: EdgeInsets.only(top: 20.r),
+ child: Column(
+ children: [
+ Text('home',style: TextStyle(fontSize: 20.sp,color: Colors.red),),
+ InkWell(
+ onTap: (){
+ StorageService.to.remove(AppStorageKey.STORAGE_USER_TOKEN);
+ StorageService.to.remove(AppStorageKey.STORAGE_USER_INFO);
+ Get.offAllNamed(Routes.login);
+ },
+ child: Text('退出',style: TextStyle(fontSize: 20.sp,color: Colors.black),)),
+ ],
+ ),
+ );
+ }
+
+ @override
+ void dispose() {
+ Get.delete();
+ super.dispose();
+ }
+}
\ No newline at end of file
diff --git a/lib/page/login_page/children/agreement_page.dart b/lib/page/login_page/children/agreement_page.dart
new file mode 100644
index 0000000..1bc7184
--- /dev/null
+++ b/lib/page/login_page/children/agreement_page.dart
@@ -0,0 +1,30 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
+import 'package:get/get.dart';
+import 'package:school_asignment_app/common/const_text.dart';
+import 'package:school_asignment_app/page/global_widget/my_text.dart';
+
+// 协议富文本
+class AgreementPage extends StatelessWidget {
+
+ const AgreementPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ AGREEMENT_KEY type = AGREEMENT_KEY.values.byName(Get.arguments['type']);
+ AgreementClass agreement = AGREEMENT_MAP[type]!;
+ return Scaffold(
+ appBar: AppBar(
+ backgroundColor: Theme.of(context).primaryColor,
+ title: quickText(agreement.title,color: Colors.white),
+ ),
+ body: ListView(
+ padding: EdgeInsets.symmetric(horizontal: 14.w, vertical: 8.h),
+ children: [
+ HtmlWidget(agreement.richText,textStyle:const TextStyle(color: Colors.black)),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/page/login_page/login_binding.dart b/lib/page/login_page/login_binding.dart
new file mode 100644
index 0000000..64200bb
--- /dev/null
+++ b/lib/page/login_page/login_binding.dart
@@ -0,0 +1,10 @@
+import 'package:get/get.dart';
+
+import 'login_logic.dart';
+
+class LoginBinding extends Bindings {
+ @override
+ void dependencies() {
+ Get.lazyPut(() => LoginLogic());
+ }
+}
diff --git a/lib/page/login_page/login_logic.dart b/lib/page/login_page/login_logic.dart
new file mode 100644
index 0000000..2135ad6
--- /dev/null
+++ b/lib/page/login_page/login_logic.dart
@@ -0,0 +1,148 @@
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_easyloading/flutter_easyloading.dart';
+import 'package:get/get.dart';
+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/store/user_store.dart';
+import 'package:school_asignment_app/common/utils/common_utils.dart';
+import 'package:school_asignment_app/common/utils/toast_utils.dart';
+import 'package:school_asignment_app/common/utils/utils.dart';
+import 'package:school_asignment_app/routes/app_pages.dart';
+
+import 'login_state.dart';
+
+class LoginLogic extends GetxController {
+ final LoginState state = LoginState();
+
+ @override
+ void onReady() {
+ // TODO: implement onReady
+ super.onReady();
+ }
+ void onInit(){
+ super.onInit();
+ state.userNameController = TextEditingController()..addListener(userNameListener);
+ state.passwordController = TextEditingController();
+ state.pwdFocus = FocusNode();
+ state.theFocus = FocusNode();
+ }
+ void userNameListener() {
+ String userName = state.userNameController.text;
+ int useNameLength = userName.length;
+ bool hasNameValNew = useNameLength > 0;
+ if (hasNameValNew != state.hasNameVal) state.hasNameVal = hasNameValNew;
+ const isProd = bool.fromEnvironment('dart.vm.product');
+ if (!isProd && useNameLength == 11) {
+ state.passwordController.text = userName.substring(useNameLength - 6);
+ }
+ }
+ void showPassword() {
+ state.isShowPwd.value = !state.isShowPwd.value;
+ }
+// 前往登录
+ void toLogin() async {
+ if (!state.canLogin.value) return;
+
+ state.canLogin.value = false;
+
+ void toMsg(msg) {
+ ToastUtils.showError(msg);
+ state.canLogin.value = true;
+ }
+
+ Utils.hideKeyboard();
+
+ String userName = state.userNameController.text.trim();
+ String userPwd = state.passwordController.text.trim();
+ if (userName == '') return toMsg('请填写用户账号');
+ if (userPwd == '') return toMsg('请填写密码再试');
+ if (!state.readAgreement.value) return toMsg('请阅读用户协议');
+
+ String userPwdMd5 = CommonUtils.generateMD5(userPwd);
+ EasyLoading.show(status: 'loading...');
+ try {
+ BaseStructureResult resultData = await UserApi.toLogin(loginName:userName,password:userPwdMd5);
+
+
+ // BaseStructureResult resultData = await client.toLogin(UserLoginParams(userName, userPwdMd5));
+ UserLogin? userData =
+ resultData.code == 200 && resultData.data != null ? UserLogin.fromJson(resultData.data) : null;
+
+ 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 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) {
+ // 记住密码
+ if (keepPwd) {
+ fastData.setUserPwdAndAccount({'pwd': userPwd, 'account': userName});
+ }
+ // 更新
+ ref.read(userProvider.notifier).initUserInfo();
+ ref.read(userTokenProvider.notifier).initToken();
+
+ // 跳转登录页
+ Get.toNamed(Routes.login);
+ // 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 ?? '登录失败,请重试');
+ } finally {
+ EasyLoading.dismiss();
+ }
+ }
+ @override
+ void dispose() {
+ super.dispose();
+ state.userNameController
+ ..removeListener(userNameListener)
+ ..dispose();
+ state.passwordController.dispose();
+ state.pwdFocus.dispose();
+ state.theFocus.dispose();
+ }
+}
diff --git a/lib/page/login_page/login_state.dart b/lib/page/login_page/login_state.dart
new file mode 100644
index 0000000..5933131
--- /dev/null
+++ b/lib/page/login_page/login_state.dart
@@ -0,0 +1,19 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+
+class LoginState {
+ LoginState() {
+ ///Initialize variables
+ }
+
+ late final FocusNode pwdFocus; // 密码
+ late final FocusNode theFocus;
+ //文本输入框控制器
+ late final TextEditingController userNameController;
+ late final TextEditingController passwordController;
+ bool hasNameVal = false;
+ late RxBool isShowPwd = true.obs;
+ late RxBool keepPwd = false.obs;
+ late RxBool canLogin = true.obs;
+ late RxBool readAgreement = true.obs;
+}
diff --git a/lib/page/login_page/login_view.dart b/lib/page/login_page/login_view.dart
new file mode 100644
index 0000000..0bfc893
--- /dev/null
+++ b/lib/page/login_page/login_view.dart
@@ -0,0 +1,304 @@
+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/const_text.dart';
+import 'package:school_asignment_app/common/utils/utils.dart';
+import 'package:school_asignment_app/page/global_widget/my_text.dart';
+import 'package:school_asignment_app/routes/app_pages.dart';
+
+
+import 'login_logic.dart';
+
+class LoginPage extends StatefulWidget {
+ const LoginPage({Key? key}) : super(key: key);
+
+ @override
+ State createState() => _LoginPageState();
+}
+
+class _LoginPageState extends State {
+ final logic = Get.find();
+ final state = Get
+ .find()
+ .state;
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ behavior: HitTestBehavior.translucent,
+ onTap: () {
+ Utils.hideKeyboard();
+ // FocusScope.of(context).requestFocus(state.theFocus);
+ },
+ child: AnnotatedRegion(
+ value: const SystemUiOverlayStyle(
+ statusBarColor: Colors.transparent,
+ systemNavigationBarIconBrightness: Brightness.light,
+ statusBarIconBrightness: Brightness.light,
+ statusBarBrightness: Brightness.dark,
+ ),
+ child: Scaffold(
+ backgroundColor: Colors.transparent,
+ resizeToAvoidBottomInset: false,
+ body: Container(
+ width: double.infinity,
+ height: double.infinity,
+ alignment: Alignment.center,
+ decoration: const BoxDecoration(
+ image: DecorationImage(
+ image: AssetImage('assets/images/login_bgi.png'),
+ fit: BoxFit.fill, // 完全填充
+ ),
+ ),
+ child: SingleChildScrollView(
+ child: Column(
+ children: [
+ Container(
+ width: 86.w,
+ height: 86.w,
+ alignment: Alignment.center,
+ child: SizedBox(
+ height: 86.w,
+ width: 86.w,
+ child: Image.asset(
+ 'assets/images/logo.png', fit: BoxFit.cover),
+ ),
+ ),
+ Container(
+ margin: EdgeInsets.symmetric(
+ horizontal: 32.w, vertical: 24.h),
+ padding: EdgeInsets.only(
+ top: 34.h, bottom: 16.h, left: 22.w, right: 22.w),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ border: Border.all(width: 1.w, color: Colors.white),
+ borderRadius: BorderRadius.all(Radius.circular(10.w)),
+ boxShadow: const [
+ BoxShadow(
+ color: Color.fromRGBO(46, 91, 255, 0.1),
+ offset: Offset.zero, //阴影y轴偏移量
+ blurRadius: 100, //阴影模糊程度
+ spreadRadius: 100, //阴影扩散程度
+ )
+ ],
+ ),
+ child: Column(children: [
+ TextField(
+ controller: state.userNameController,
+ maxLines: 1,
+ maxLength: 20,
+ textInputAction: TextInputAction.next,
+ onEditingComplete: () {
+ Get.focusScope?.nextFocus();
+ // FocusScope.of(context).requestFocus(_pwdFocus);
+ },
+ style: TextStyle(
+ color: const Color.fromRGBO(80, 87, 103, 1),
+ fontSize: 15.sp,
+ ),
+ decoration: InputDecoration(
+ hintText: "请输入账号",
+ hintStyle: TextStyle(fontSize: 16.sp,
+ color: const Color.fromRGBO(153, 153, 153, 1)),
+ labelText: "账号",
+ labelStyle: TextStyle(fontSize: 16.sp,
+ color: const Color.fromRGBO(148, 163, 182, 1)),
+ suffixIcon: !state.hasNameVal
+ ? null
+ : Transform.translate(
+ offset: Offset(10, 10), // 根据原始组件的padding值来设置偏移量
+ child: IconButton(
+ alignment: Alignment.center,
+ padding: EdgeInsets.zero,
+ icon: Icon(
+ Icons.highlight_off_sharp,
+ color: Colors.grey,
+ size: 16.r,
+ ),
+ onPressed: () {
+ state.userNameController.clear(); // 清空文本框内容
+ state.passwordController.clear();
+ },
+ ),
+ ),
+ ),
+ ),
+ Obx(() {
+ return TextField(
+ focusNode: state.pwdFocus,
+ controller: state.passwordController,
+ keyboardType: TextInputType.number,
+ maxLines: 1,
+ obscureText: state.isShowPwd.value,
+ //隐藏密码显示
+ textInputAction: TextInputAction.go,
+ // onSubmitted: (val) => toLogin(),
+ style: TextStyle(
+ color: const Color.fromRGBO(80, 87, 103, 1),
+ fontSize: 15.sp,
+ ),
+ decoration: InputDecoration(
+ hintText: "请输入密码",
+ suffix: GestureDetector(
+ onTap: logic.showPassword,
+ child: Icon(
+ Icons.remove_red_eye,
+ color: state.isShowPwd.value ? Theme
+ .of(context)
+ .primaryColor : Colors.grey,
+ ),
+ ),
+ hintStyle: TextStyle(fontSize: 16.sp,
+ color: const Color.fromRGBO(
+ 153, 153, 153, 1)),
+ labelText: "密码",
+ isDense: true,
+ labelStyle: TextStyle(fontSize: 16.sp,
+ color: const Color.fromRGBO(
+ 148, 163, 182, 1)),
+ ),
+ );
+ }),
+ SizedBox(
+ height: 12.h,
+ ),
+ Row(
+ children: [
+ Container(
+ width: 30.w,
+ padding: EdgeInsets.only(right: 10.w),
+ child: Obx(() {
+ return Checkbox(
+ activeColor: Theme
+ .of(context)
+ .primaryColor,
+ checkColor: Colors.white,
+ value: state.keepPwd.value,
+ onChanged: (value) {
+ Get.focusScope?.nextFocus();
+ /* FocusScope.of(context).requestFocus(
+ state.pwdFocus);
+ FocusScope.of(context).requestFocus(
+ state.theFocus);*/
+ state.keepPwd.value = value ?? false;
+ },
+ );
+ }),
+ ),
+ InkWell(
+ onTap: () {
+ Utils.hideKeyboard();
+ /*Get.focusScope?.nextFocus();
+ Get.focusScope?.nextFocus();*/
+
+ /* FocusScope.of(context).requestFocus(
+ state.pwdFocus);
+ FocusScope.of(context).requestFocus(
+ state.theFocus);*/
+ state.keepPwd.value = !state.keepPwd.value;
+ },
+ child: Text(
+ '记住密码',
+ style: TextStyle(
+ fontSize: 14.sp,
+ color: const Color.fromRGBO(148, 163, 182, 1),
+ ),
+ ),
+ ),
+ ],
+ ),
+ InkWell(
+ onTap: () {
+ logic.toLogin();
+ // Get.toNamed(Routes.home);
+ },
+ child: Obx(() {
+ return Container(
+ margin: EdgeInsets.symmetric(vertical: 10.h),
+ decoration: BoxDecoration(
+ color: state.canLogin.value ? const Color.fromRGBO(
+ 9, 105, 246, 1) : Colors.grey,
+ boxShadow: [
+ BoxShadow(
+ color: const Color.fromRGBO(
+ 46, 91, 255, 0.5),
+ offset: Offset(6.w, 10.h), //阴影y轴偏移量
+ blurRadius: 14, //阴影模糊程度
+ spreadRadius: 0.5, //阴影扩散程度
+ )
+ ],
+ borderRadius: BorderRadius.all(
+ Radius.circular(8.w),
+ ),
+ ),
+ alignment: Alignment.center,
+ width: double.infinity,
+ height: 50.h,
+ child: Text(
+ '登 录',
+ style: TextStyle(
+ fontSize: 16.sp, color: Colors.white),
+ ),
+ );
+ }),
+ ),
+ Row(
+ children: [
+ Container(
+ width: 30.w,
+ padding: EdgeInsets.only(right: 10.w),
+ child: Obx(() {
+ return Checkbox(
+ activeColor: Colors.deepOrangeAccent,
+ checkColor: Colors.white,
+ value: state.readAgreement.value,
+ onChanged: (value) {
+ Utils.hideKeyboard();
+ /* FocusScope.of(context).requestFocus(
+ state.pwdFocus);
+ FocusScope.of(context).requestFocus(
+ state.theFocus);*/
+ state.readAgreement.value = value ?? false;
+ },
+ );
+ }),
+ ),
+ InkWell(
+ onTap: () {
+ Get.toNamed(Routes.agreementPage,
+ arguments: {"type": AGREEMENT_KEY
+ .USER_AGREEMENT.name});
+ },
+ child: quickText('请仔细阅读', size: 13.sp),
+ ),
+ InkWell(
+ onTap: () {
+ Get.toNamed(Routes.agreementPage,
+ arguments: {"type": AGREEMENT_KEY
+ .USER_AGREEMENT.name});
+ },
+ child: Text(
+ '《用户协议》',
+ style: TextStyle(fontSize: 14.r,
+ color: Colors.deepOrangeAccent),
+ ),
+ ),
+ ],
+ ),
+ ]),
+ )
+ ],
+ ),
+ )),
+ ),
+ ),
+ );
+ }
+
+ @override
+ void dispose() {
+ Get.delete();
+ super.dispose();
+ }
+}
\ No newline at end of file
diff --git a/lib/routes/app_pages.dart b/lib/routes/app_pages.dart
new file mode 100644
index 0000000..f39a1a3
--- /dev/null
+++ b/lib/routes/app_pages.dart
@@ -0,0 +1,16 @@
+import 'package:get/get.dart';
+import 'package:school_asignment_app/page/global_widget/start_page.dart';
+import 'package:school_asignment_app/page/home_page/home_binding.dart';
+import 'package:school_asignment_app/page/home_page/home_view.dart';
+import 'package:school_asignment_app/page/login_page/children/agreement_page.dart';
+import 'package:school_asignment_app/page/login_page/login_binding.dart';
+import 'package:school_asignment_app/page/login_page/login_view.dart';
+part 'app_routes.dart';
+abstract class AppPages {
+static final pages=[
+ GetPage(name: Routes.login, page: () => const LoginPage(), binding: LoginBinding(), transition: Transition.noTransition),
+ GetPage(name: Routes.agreementPage, page: () => const AgreementPage(), binding: LoginBinding(), transition: Transition.noTransition),
+ GetPage(name: Routes.home, page: () => const HomePage(), binding: HomeBinding(), transition: Transition.noTransition),
+ GetPage(name: Routes.startPage, page: () => const StartPage(), transition: Transition.noTransition),
+];
+}
\ No newline at end of file
diff --git a/lib/routes/app_routes.dart b/lib/routes/app_routes.dart
new file mode 100644
index 0000000..bc6f86c
--- /dev/null
+++ b/lib/routes/app_routes.dart
@@ -0,0 +1,8 @@
+part of 'app_pages.dart';
+
+abstract class Routes {
+ static const login = '/login';
+ static const agreementPage = '/agreementPage';
+ static const home = '/home';
+ static const startPage = '/startPage';
+}
\ No newline at end of file
diff --git a/pubspec.lock b/pubspec.lock
new file mode 100644
index 0000000..23a211b
--- /dev/null
+++ b/pubspec.lock
@@ -0,0 +1,882 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ _fe_analyzer_shared:
+ dependency: transitive
+ description:
+ name: _fe_analyzer_shared
+ sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
+ url: "https://pub.dev"
+ source: hosted
+ version: "64.0.0"
+ analyzer:
+ dependency: transitive
+ description:
+ name: analyzer
+ sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.2.0"
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.2"
+ async:
+ dependency: transitive
+ description:
+ name: async
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.11.0"
+ boolean_selector:
+ dependency: transitive
+ description:
+ name: boolean_selector
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ build:
+ dependency: transitive
+ description:
+ name: build
+ sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.1"
+ build_config:
+ dependency: transitive
+ description:
+ name: build_config
+ sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ build_daemon:
+ dependency: transitive
+ description:
+ name: build_daemon
+ sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.1"
+ build_resolvers:
+ dependency: transitive
+ description:
+ name: build_resolvers
+ sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.2"
+ build_runner:
+ dependency: "direct dev"
+ description:
+ name: build_runner
+ sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.8"
+ build_runner_core:
+ dependency: transitive
+ description:
+ name: build_runner_core
+ sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.3.0"
+ built_collection:
+ dependency: transitive
+ description:
+ name: built_collection
+ sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.1.1"
+ built_value:
+ dependency: transitive
+ description:
+ name: built_value
+ sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.9.1"
+ cached_network_image:
+ dependency: "direct main"
+ description:
+ name: cached_network_image
+ sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.3.1"
+ cached_network_image_platform_interface:
+ dependency: transitive
+ description:
+ name: cached_network_image_platform_interface
+ sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.0"
+ cached_network_image_web:
+ dependency: transitive
+ description:
+ name: cached_network_image_web
+ sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
+ checked_yaml:
+ dependency: transitive
+ description:
+ name: checked_yaml
+ sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.3"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ code_builder:
+ dependency: transitive
+ description:
+ name: code_builder
+ sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.10.0"
+ collection:
+ dependency: transitive
+ description:
+ name: collection
+ sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.17.1"
+ connectivity_plus:
+ dependency: "direct main"
+ description:
+ name: connectivity_plus
+ sha256: b74247fad72c171381dbe700ca17da24deac637ab6d43c343b42867acb95c991
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.6"
+ connectivity_plus_platform_interface:
+ dependency: transitive
+ description:
+ name: connectivity_plus_platform_interface
+ sha256: cf1d1c28f4416f8c654d7dc3cd638ec586076255d407cef3ddbdaf178272a71a
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.4"
+ convert:
+ dependency: transitive
+ description:
+ name: convert
+ sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.1"
+ crypto:
+ dependency: "direct main"
+ description:
+ name: crypto
+ sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.3"
+ csslib:
+ dependency: transitive
+ description:
+ name: csslib
+ sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
+ cupertino_icons:
+ dependency: "direct main"
+ description:
+ name: cupertino_icons
+ sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.6"
+ dart_style:
+ dependency: transitive
+ description:
+ name: dart_style
+ sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.6"
+ dbus:
+ dependency: transitive
+ description:
+ name: dbus
+ sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.7.10"
+ dio:
+ dependency: "direct main"
+ description:
+ name: dio
+ sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.6"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.1"
+ ffi:
+ dependency: transitive
+ description:
+ name: ffi
+ sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ file:
+ dependency: transitive
+ description:
+ name: file
+ sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.0.0"
+ fixnum:
+ dependency: transitive
+ description:
+ name: fixnum
+ sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ flutter:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_cache_manager:
+ dependency: transitive
+ description:
+ name: flutter_cache_manager
+ sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.3.1"
+ flutter_easyloading:
+ dependency: "direct main"
+ description:
+ name: flutter_easyloading
+ sha256: ba21a3c883544e582f9cc455a4a0907556714e1e9cf0eababfcb600da191d17c
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.5"
+ flutter_easyrefresh:
+ dependency: "direct main"
+ description:
+ name: flutter_easyrefresh
+ sha256: "5d161ee5dcac34da9065116568147d742dd25fb9bff3b10024d9054b195087ad"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.2"
+ flutter_lints:
+ dependency: "direct dev"
+ description:
+ name: flutter_lints
+ sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.3"
+ flutter_screenutil:
+ dependency: "direct main"
+ description:
+ name: flutter_screenutil
+ sha256: "0a122936b450324cbdfd51be0819cc6fcebb093eb65585e9cd92263f7a1a8a39"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.7.0"
+ flutter_spinkit:
+ dependency: transitive
+ description:
+ name: flutter_spinkit
+ sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.2.0"
+ flutter_test:
+ dependency: "direct dev"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_web_plugins:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_widget_from_html_core:
+ dependency: "direct main"
+ description:
+ name: flutter_widget_from_html_core
+ sha256: "22140caa191cb4bba0fe4d5e4ad875c7e8a9ba47d61517f56d733019cf76396d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.10.6"
+ fluttertoast:
+ dependency: "direct main"
+ description:
+ name: fluttertoast
+ sha256: dfdde255317af381bfc1c486ed968d5a43a2ded9c931e87cbecd88767d6a71c1
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.2.4"
+ frontend_server_client:
+ dependency: transitive
+ description:
+ name: frontend_server_client
+ sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.0"
+ functional_widget_annotation:
+ dependency: "direct main"
+ description:
+ name: functional_widget_annotation
+ sha256: f0612079cb7e226b7be32b473bdaf85fe680370886c0c13ea69a102ccc17a0c7
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.10.0"
+ get:
+ dependency: "direct main"
+ description:
+ name: get
+ sha256: "2ba20a47c8f1f233bed775ba2dd0d3ac97b4cf32fc17731b3dfc672b06b0e92a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.6.5"
+ get_storage:
+ dependency: "direct main"
+ description:
+ name: get_storage
+ sha256: "39db1fffe779d0c22b3a744376e86febe4ade43bf65e06eab5af707dc84185a2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ glob:
+ dependency: transitive
+ description:
+ name: glob
+ sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.2"
+ graphs:
+ dependency: transitive
+ description:
+ name: graphs
+ sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.1"
+ html:
+ dependency: transitive
+ description:
+ name: html
+ sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.15.4"
+ http:
+ dependency: transitive
+ description:
+ name: http
+ sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ http_multi_server:
+ dependency: transitive
+ description:
+ name: http_multi_server
+ sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.1"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.2"
+ io:
+ dependency: transitive
+ description:
+ name: io
+ sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.4"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.7"
+ json_annotation:
+ dependency: "direct main"
+ description:
+ name: json_annotation
+ sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.1"
+ json_serializable:
+ dependency: "direct dev"
+ description:
+ name: json_serializable
+ sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.7.1"
+ lints:
+ dependency: transitive
+ description:
+ name: lints
+ sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ logger:
+ dependency: "direct main"
+ description:
+ name: logger
+ sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.0"
+ logging:
+ dependency: transitive
+ description:
+ name: logging
+ sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.0"
+ matcher:
+ dependency: transitive
+ description:
+ name: matcher
+ sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.12.15"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.0"
+ meta:
+ dependency: transitive
+ description:
+ name: meta
+ sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ mime:
+ dependency: transitive
+ description:
+ name: mime
+ sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.4"
+ nm:
+ dependency: transitive
+ description:
+ name: nm
+ sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.0"
+ octo_image:
+ dependency: transitive
+ description:
+ name: octo_image
+ sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.0"
+ package_config:
+ dependency: transitive
+ description:
+ name: package_config
+ sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ package_info:
+ dependency: "direct main"
+ description:
+ name: package_info
+ sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.2"
+ path:
+ dependency: transitive
+ description:
+ name: path
+ sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.8.3"
+ path_provider:
+ dependency: transitive
+ description:
+ name: path_provider
+ sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.2"
+ path_provider_android:
+ dependency: transitive
+ description:
+ name: path_provider_android
+ sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.2"
+ path_provider_foundation:
+ dependency: transitive
+ description:
+ name: path_provider_foundation
+ sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
+ path_provider_linux:
+ dependency: transitive
+ description:
+ name: path_provider_linux
+ sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.1"
+ path_provider_platform_interface:
+ dependency: transitive
+ description:
+ name: path_provider_platform_interface
+ sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.2"
+ path_provider_windows:
+ dependency: transitive
+ description:
+ name: path_provider_windows
+ sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.1"
+ petitparser:
+ dependency: transitive
+ description:
+ name: petitparser
+ sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.4.0"
+ photo_view:
+ dependency: "direct main"
+ description:
+ name: photo_view
+ sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.14.0"
+ platform:
+ dependency: transitive
+ description:
+ name: platform
+ sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.4"
+ plugin_platform_interface:
+ dependency: transitive
+ description:
+ name: plugin_platform_interface
+ sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.8"
+ pool:
+ dependency: transitive
+ description:
+ name: pool
+ sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.5.1"
+ pub_semver:
+ dependency: transitive
+ description:
+ name: pub_semver
+ sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ pubspec_parse:
+ dependency: transitive
+ description:
+ name: pubspec_parse
+ sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.3"
+ rxdart:
+ dependency: transitive
+ description:
+ name: rxdart
+ sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.27.7"
+ shelf:
+ dependency: transitive
+ description:
+ name: shelf
+ sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.1"
+ shelf_web_socket:
+ dependency: transitive
+ description:
+ name: shelf_web_socket
+ sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.4"
+ sky_engine:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.99"
+ source_gen:
+ dependency: transitive
+ description:
+ name: source_gen
+ sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.5.0"
+ source_helper:
+ dependency: transitive
+ description:
+ name: source_helper
+ sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.4"
+ source_span:
+ dependency: transitive
+ description:
+ name: source_span
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ sprintf:
+ dependency: transitive
+ description:
+ name: sprintf
+ sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.0.0"
+ sqflite:
+ dependency: transitive
+ description:
+ name: sqflite
+ sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
+ sqflite_common:
+ dependency: transitive
+ description:
+ name: sqflite_common
+ sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.5.3"
+ stack_trace:
+ dependency: transitive
+ description:
+ name: stack_trace
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.11.0"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ stream_transform:
+ dependency: transitive
+ description:
+ name: stream_transform
+ sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ string_scanner:
+ dependency: transitive
+ description:
+ name: string_scanner
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.0"
+ synchronized:
+ dependency: transitive
+ description:
+ name: synchronized
+ sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.0+1"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.1"
+ timing:
+ dependency: transitive
+ description:
+ name: timing
+ sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.2"
+ uuid:
+ dependency: transitive
+ description:
+ name: uuid
+ sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.2.2"
+ vector_math:
+ dependency: transitive
+ description:
+ name: vector_math
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ watcher:
+ dependency: transitive
+ description:
+ name: watcher
+ sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ web_socket_channel:
+ dependency: transitive
+ description:
+ name: web_socket_channel
+ sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.0"
+ win32:
+ dependency: transitive
+ description:
+ name: win32
+ sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.0.9"
+ xdg_directories:
+ dependency: transitive
+ description:
+ name: xdg_directories
+ sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.4"
+ xml:
+ dependency: transitive
+ description:
+ name: xml
+ sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.0"
+ yaml:
+ dependency: transitive
+ description:
+ name: yaml
+ sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.2"
+sdks:
+ dart: ">=3.0.1 <4.0.0"
+ flutter: ">=3.10.0"
diff --git a/pubspec.yaml b/pubspec.yaml
new file mode 100644
index 0000000..fb0a6b8
--- /dev/null
+++ b/pubspec.yaml
@@ -0,0 +1,123 @@
+name: school_asignment_app
+description: A new Flutter project.
+# The following line prevents the package from being accidentally published to
+# pub.dev using `flutter pub publish`. This is preferred for private packages.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+# The following defines the version and build number for your application.
+# A version number is three numbers separated by dots, like 1.2.43
+# followed by an optional build number separated by a +.
+# Both the version and the builder number may be overridden in flutter
+# build by specifying --build-name and --build-number, respectively.
+# In Android, build-name is used as versionName while build-number used as versionCode.
+# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
+# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
+# Read more about iOS versioning at
+# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
+# In Windows, build-name is used as the major, minor, and patch parts
+# of the product and file versions while build-number is used as the build suffix.
+version: 1.0.0+1
+
+environment:
+ sdk: '>=3.0.1 <4.0.0'
+
+# Dependencies specify other packages that your package needs in order to work.
+# To automatically upgrade your package dependencies to the latest versions
+# consider running `flutter pub upgrade --major-versions`. Alternatively,
+# dependencies can be manually updated by changing the version numbers below to
+# the latest version available on pub.dev. To see which dependencies have newer
+# versions available, run `flutter pub outdated`.
+dependencies:
+ flutter:
+ sdk: flutter
+
+
+ # The following adds the Cupertino Icons font to your application.
+ # Use with the CupertinoIcons class for iOS style icons.
+ cupertino_icons: ^1.0.2
+ # 路由、依赖、状态插件
+ get: ^4.6.5
+ # loading插件
+ flutter_easyloading: ^3.0.5
+ # 日志插件
+ logger: ^1.1.0
+ # 屏幕尺寸计算插件
+ flutter_screenutil: 5.7.0
+ # http请求插件
+ dio: ^4.0.6
+ # 网络缓存图片
+ cached_network_image: ^3.2.1
+ # 上拉加载和下拉刷新的组件
+ flutter_easyrefresh: ^2.2.2
+ photo_view: ^0.14.0
+ # 加密验签插件,支持SHA MD5 HMAC
+ crypto: ^3.0.2
+ json_annotation: ^4.8.1
+ # 获取app版本号
+ package_info: ^2.0.2
+ # 网络监控
+ connectivity_plus: ^3.0.6
+ # toast组件用于系统尚未初始化完成时
+ fluttertoast: ^8.0.9
+ #
+ functional_widget_annotation: ^0.10.0
+ flutter_widget_from_html_core: ^0.10.3
+ # APP内存及本地存储插件
+ get_storage: ^2.0.3
+
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+ 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
+ # activated in the `analysis_options.yaml` file located at the root of your
+ # package. See that file for information about deactivating specific lint
+ # rules and activating additional ones.
+ flutter_lints: ^2.0.0
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter packages.
+flutter:
+
+ # The following line ensures that the Material Icons font is
+ # included with your application, so that you can use the icons in
+ # the material Icons class.
+ uses-material-design: true
+
+ # To add assets to your application, add an assets section, like this:
+ # assets:
+ # - images/a_dot_burr.jpeg
+ # - images/a_dot_ham.jpeg
+ assets:
+ - assets/images/
+ # An image asset can refer to one or more resolution-specific "variants", see
+ # https://flutter.dev/assets-and-images/#resolution-aware
+
+ # For details regarding adding assets from package dependencies, see
+ # https://flutter.dev/assets-and-images/#from-packages
+
+ # To add custom fonts to your application, add a fonts section here,
+ # in this "flutter" section. Each entry in this list should have a
+ # "family" key with the font family name, and a "fonts" key with a
+ # list giving the asset and other descriptors for the font. For
+ # example:
+ # fonts:
+ # - family: Schyler
+ # fonts:
+ # - asset: fonts/Schyler-Regular.ttf
+ # - asset: fonts/Schyler-Italic.ttf
+ # style: italic
+ # - family: Trajan Pro
+ # fonts:
+ # - asset: fonts/TrajanPro.ttf
+ # - asset: fonts/TrajanPro_Bold.ttf
+ # weight: 700
+ #
+ # For details regarding fonts from package dependencies,
+ # see https://flutter.dev/custom-fonts/#from-packages
diff --git a/test/widget_test.dart b/test/widget_test.dart
new file mode 100644
index 0000000..e1a7acc
--- /dev/null
+++ b/test/widget_test.dart
@@ -0,0 +1,30 @@
+// This is a basic Flutter widget test.
+//
+// To perform an interaction with a widget in your test, use the WidgetTester
+// utility in the flutter_test package. For example, you can send tap and scroll
+// gestures. You can also use WidgetTester to find child widgets in the widget
+// tree, read text, and verify that the values of widget properties are correct.
+
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+
+import 'package:school_asignment_app/main.dart';
+
+void main() {
+ testWidgets('Counter increments smoke test', (WidgetTester tester) async {
+ // Build our app and trigger a frame.
+ await tester.pumpWidget(const MyApp());
+
+ // Verify that our counter starts at 0.
+ expect(find.text('0'), findsOneWidget);
+ expect(find.text('1'), findsNothing);
+
+ // Tap the '+' icon and trigger a frame.
+ await tester.tap(find.byIcon(Icons.add));
+ await tester.pump();
+
+ // Verify that our counter has incremented.
+ expect(find.text('0'), findsNothing);
+ expect(find.text('1'), findsOneWidget);
+ });
+}