From c5352625c6d0a93732eb4d86af1a718ce27f2428 Mon Sep 17 00:00:00 2001 From: hs <873121290@qq.com> Date: Wed, 16 Jul 2025 08:37:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=9B=AD=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/customWidget/custom_alert_dialog.dart | 102 ++++++ lib/http/ApiService.dart | 37 ++- lib/pages/home/danger_auto_scrollList.dart | 86 +++++ lib/pages/home/home_page.dart | 54 ++-- .../home/study/study_class_list_page.dart | 121 +++++++ lib/pages/home/study/study_detail_page.dart | 43 +++ lib/pages/home/study/study_garden_page.dart | 52 +++ lib/pages/home/study/study_my_task_page.dart | 296 ++++++++++++++++++ lib/pages/home/study/study_score_page.dart | 15 + lib/pages/my_appbar.dart | 2 +- lib/tools/tools.dart | 16 + pubspec.lock | 220 ++++++------- pubspec.yaml | 3 + 13 files changed, 913 insertions(+), 134 deletions(-) create mode 100644 lib/customWidget/custom_alert_dialog.dart create mode 100644 lib/pages/home/danger_auto_scrollList.dart create mode 100644 lib/pages/home/study/study_class_list_page.dart create mode 100644 lib/pages/home/study/study_detail_page.dart create mode 100644 lib/pages/home/study/study_garden_page.dart create mode 100644 lib/pages/home/study/study_my_task_page.dart create mode 100644 lib/pages/home/study/study_score_page.dart diff --git a/lib/customWidget/custom_alert_dialog.dart b/lib/customWidget/custom_alert_dialog.dart new file mode 100644 index 0000000..1ecff54 --- /dev/null +++ b/lib/customWidget/custom_alert_dialog.dart @@ -0,0 +1,102 @@ +import 'package:flutter/material.dart'; + +class CustomAlertDialog extends StatelessWidget { + final String title; + final String content; + final String cancelText; + final String confirmText; + final VoidCallback? onCancel; + final VoidCallback? onConfirm; + + const CustomAlertDialog({ + Key? key, + required this.title, + required this.content, + this.cancelText = "取消", + this.confirmText = "确定", + this.onCancel, + this.onConfirm, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Dialog( + backgroundColor: Colors.transparent, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(5), + ), + padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 20), + Text( + title, + style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + textAlign: TextAlign.center, + ), + const SizedBox(height: 20), + Padding( + padding: EdgeInsets.symmetric(horizontal: 30), + child: Text( + content, + style: const TextStyle(fontSize: 16, color: Colors.black45), + textAlign: TextAlign.center, + ), + ), + + const SizedBox(height: 20), + const Divider(height: 1), + Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + Navigator.of(context).pop(); + onCancel?.call(); + }, + child: Container( + padding: const EdgeInsets.symmetric(vertical: 12), + alignment: Alignment.center, + child: Text( + cancelText, + style: const TextStyle( + fontWeight: FontWeight.w500, + color: Colors.black, + fontSize: 18, + ), + ), + ), + ), + ), + Container(width: 1, height: 48, color: Colors.grey[300]), + Expanded( + child: InkWell( + onTap: () { + Navigator.of(context).pop(); + onConfirm?.call(); + }, + child: Container( + padding: const EdgeInsets.symmetric(vertical: 12), + alignment: Alignment.center, + child: Text( + confirmText, + style: const TextStyle( + color: Color(0xFF3874F6), + fontWeight: FontWeight.w500, + fontSize: 18, + ), + ), + ), + ), + ), + ], + ), + ], + ), + ), + ); + } +} diff --git a/lib/http/ApiService.dart b/lib/http/ApiService.dart index 3106bb6..11d5b59 100644 --- a/lib/http/ApiService.dart +++ b/lib/http/ApiService.dart @@ -57,7 +57,7 @@ U6Hzm1ninpWeE+awIDAQAB ); } - ///TODO -------------–-------------------- 首页 -------------–-------------------- + /// TODO -------------–-------------------- 首页 -------------–-------------------- /// 我的工作 static Future> getWork() { return HttpManager().request( @@ -75,7 +75,7 @@ U6Hzm1ninpWeE+awIDAQAB ); } - /// + /// 特殊作业红点数量 static Future> getRedPoint() { return HttpManager().request( basePath, @@ -101,7 +101,7 @@ U6Hzm1ninpWeE+awIDAQAB }, ); } - + /// 安全检查 static Future> getSafetyEnvironmentalInspectionCount() { return HttpManager().request( basePath, @@ -220,5 +220,36 @@ U6Hzm1ninpWeE+awIDAQAB }, ); } +/// TODO -------------–-------------------- 首页学习园地 -------------–-------------------- + /// 我的任务列表 + static Future> getStudyList(int page) { + return HttpManager().request( + basePath, + '/app/edu/stagestudentrelation/pageTaskByUser', + method: Method.post, + data: { + 'CORPINFO_ID': SessionService.instance.corpinfoId, + 'USER_ID': SessionService.instance.loginUserId, + 'showCount':10, + 'currentPage':page + }, + ); + } + /// 课程列表 + static Future> getClassList(String classId, String POST_ID) { + return HttpManager().request( + basePath, + '/app/edu/stagestudentrelation/getClassCurriculum', + method: Method.post, + data: { + 'CORPINFO_ID': SessionService.instance.corpinfoId, + 'USER_ID': SessionService.instance.loginUserId, + 'showCount':9999, + 'currentPage':1, + 'CLASS_ID' : classId, + 'POST_ID' : POST_ID + }, + ); + } } diff --git a/lib/pages/home/danger_auto_scrollList.dart b/lib/pages/home/danger_auto_scrollList.dart new file mode 100644 index 0000000..6fb0c48 --- /dev/null +++ b/lib/pages/home/danger_auto_scrollList.dart @@ -0,0 +1,86 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +/// 首页隐患播报 +class DangerAutoScrolllist extends StatefulWidget { + final List items; + final double height; + + const DangerAutoScrolllist({ + super.key, + required this.items, + this.height = 150, + }); + + @override + State createState() => _AutoScrollListState(); +} + +class _AutoScrollListState extends State { + final ScrollController _scrollController = ScrollController(); + Timer? _timer; + int _currentIndex = 0; + + @override + void initState() { + super.initState(); + _startAutoScroll(); + } + + void _startAutoScroll() { + _timer = Timer.periodic(const Duration(seconds: 3), (timer) { + if (!mounted || widget.items.isEmpty) return; + + final itemHeight = widget.height / 2; // 你可以根据实际内容高度调整 + _currentIndex++; + + if (_currentIndex * itemHeight >= _scrollController.position.maxScrollExtent) { + _currentIndex = 0; + _scrollController.jumpTo(0); + } else { + _scrollController.animateTo( + _currentIndex * itemHeight, + duration: const Duration(milliseconds: 500), + curve: Curves.easeInOut, + ); + } + }); + } + + @override + void dispose() { + _timer?.cancel(); + _scrollController.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final List dataList = widget.items; + + return SizedBox( + height: widget.height, + child: ListView.builder( + controller: _scrollController, + itemExtent: widget.height / 2, // 每行高度固定 + itemCount: dataList.length, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: (context, index) { + final item = dataList[index]; + return GestureDetector( + onTap: () { + print("点击了 ${item['HIDDENDESCR']}"); + // 可以在这里跳转或弹窗 + }, + child: Row( + children: [ + Expanded(child: Text(item['HIDDENDESCR'] ?? '-', maxLines: 1, overflow: TextOverflow.ellipsis)), + Expanded(child: Text(item['CREATORNAME'] ?? '-', maxLines: 1, overflow: TextOverflow.ellipsis)), + Expanded(child: Text(item['CREATTIME'] ?? '-', maxLines: 1, overflow: TextOverflow.ellipsis)), + ], + ), + ); + }, + ), + ); + } +} \ No newline at end of file diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 42b42b8..b51770e 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -3,8 +3,10 @@ import 'dart:convert'; import 'dart:ffi'; import 'package:flutter/material.dart'; import 'package:qhd_prevention/customWidget/ItemWidgetFactory.dart'; +import 'package:qhd_prevention/pages/home/danger_auto_scrollList.dart'; import 'package:qhd_prevention/pages/home/low_page.dart'; import 'package:qhd_prevention/pages/home/risk/riskControl_page.dart'; +import 'package:qhd_prevention/pages/home/study/study_garden_page.dart'; import 'package:qhd_prevention/pages/home/userInfo_page.dart'; import 'package:qhd_prevention/pages/home/work/danger_page.dart'; import 'package:qhd_prevention/pages/home/work/danger_wait_list_page.dart'; @@ -21,8 +23,8 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { - final int _eight_work_count = 0; - final int _safetyEnvironmentalInspection = 0; + late int _eight_work_count = 0; + late int _safetyEnvironmentalInspection = 0; late final List> buttonInfos; /// 我的工作 @@ -128,6 +130,7 @@ class _HomePageState extends State { ); } + Widget _buildPCDataSection() { return Container( decoration: BoxDecoration( @@ -173,13 +176,20 @@ class _HomePageState extends State { // 你的导航逻辑 if (index == 0) { pushPage(UserinfoPage(), context); - } else if (index == 1) { + } + else if (index == 1) { pushPage(WorkSetPage(), context); - } else if (index == 2) { + } + else if (index == 2) { pushPage(RiskControlPage(), context); - } else if (index == 3) { + } + else if (index == 3) { pushPage(LowPage(), context); } + else if (index == 7) { + pushPage(StudyGardenPage(), context); + } + }, ); }).toList(), @@ -445,7 +455,6 @@ class _HomePageState extends State { : raw; final hidCount = data['hidCount'] as Map; - print(hidCount); setState(() { workInfos = [ { @@ -481,22 +490,27 @@ class _HomePageState extends State { ]; }); + // 安全检查数 + final checkJson = + await ApiService.getSafetyEnvironmentalInspectionCount(); + setState(() { + int confirmCount = int.parse(checkJson['confirmCount']['confirmCount']); + int repulseCount = int.parse(checkJson['repulseCount']['repulseCount']); + int repulseAndCheckCount = int.parse(checkJson['repulseAndCheckCount']['repulseAndCheckCount']); + + _safetyEnvironmentalInspection = confirmCount + repulseCount + repulseAndCheckCount; + }); + + // 特殊作业红点 + final redPointJson = await ApiService.getRedPoint(); + setState(() { + final countMap = redPointJson['count'] as Map; + for (var item in countMap.values) { + _eight_work_count += (item ?? 0) as int; + } + }); - // // 特殊作业红点 - // final redPointJson = await ApiService.getRedPoint(); - // setState(() { - // eightWorkCount = - // int.parse(redPointJson['unreadCount'].toString()); - // }); - // - // // 安全检查数 - // final checkJson = - // await ApiService.getSafetyEnvironmentalInspectionCount(); - // setState(() { - // safetyCheckCount = - // int.parse(checkJson['count'].toString()); - // }); } catch (e) { // 出错时可以 Toast 或者在页面上显示错误状态 print('加载首页数据失败:$e'); diff --git a/lib/pages/home/study/study_class_list_page.dart b/lib/pages/home/study/study_class_list_page.dart new file mode 100644 index 0000000..569ab06 --- /dev/null +++ b/lib/pages/home/study/study_class_list_page.dart @@ -0,0 +1,121 @@ +import 'package:flutter/material.dart'; +import 'package:qhd_prevention/customWidget/custom_button.dart'; +import 'package:qhd_prevention/http/ApiService.dart'; +import 'package:qhd_prevention/pages/home/study/study_detail_page.dart'; +import 'package:qhd_prevention/pages/my_appbar.dart'; +import 'package:qhd_prevention/tools/tools.dart'; + +class StudyClassListPage extends StatefulWidget { + const StudyClassListPage(this.classId, this.POST_ID, {super.key}); + final String classId; + final String POST_ID; + @override + State createState() => _StudyClassListPageState(); +} + +class _StudyClassListPageState extends State { + late List _list = []; + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + _getData(); + }); + } + + Future _getData() async { + LoadingDialogHelper.show(context); + try { + final result = await ApiService.getClassList(widget.classId, widget.POST_ID); + if (result['result'] == 'success') { + final List newList = result['varList'] ?? []; + setState(() { + _list.addAll(newList); + }); + } + } catch (e) { + print('加载出错: $e'); + } finally { + LoadingDialogHelper.hide(context); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppbar(title: "课程列表"), + body: SafeArea( + child: _list.isEmpty + ? Center(child: Text('暂无数据')) + : ListView.builder( + itemCount: _list.length, + itemBuilder: (context, index) { + return _buildItem(_list[index]); + }, + ), + ), + ); + } + + Widget _buildItem(Map item) { + + return Container( + margin: const EdgeInsets.symmetric(horizontal: 15, vertical: 8), + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: Colors.grey.shade200, + blurRadius: 5, + offset: Offset(0, 2), + ), + ], + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.network( + ApiService.baseImgPath + item['COVERPATH'], + width: 100, + height: 80, + fit: BoxFit.cover, + ), + const SizedBox(width: 10), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + item['CURRICULUMNAME'] ?? '', + style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + ), + const SizedBox(height: 4), + Text( + item['CURRICULUMINTRODUCE'] ?? '', + softWrap: true, + overflow: TextOverflow.visible, + style: const TextStyle(color: Colors.black54), + ), + ], + ), + ), + const SizedBox(width: 10), + Container( + height: 80, // 确保与图片高度一致 + alignment: Alignment.bottomRight, + child: CustomButton( + text: "立即学习", + backgroundColor: Colors.blue, + height: 38, + onPressed: () { + pushPage(StudyDetailPage(item), context); + }, + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/home/study/study_detail_page.dart b/lib/pages/home/study/study_detail_page.dart new file mode 100644 index 0000000..5734eac --- /dev/null +++ b/lib/pages/home/study/study_detail_page.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; +import 'package:qhd_prevention/pages/my_appbar.dart'; + +import '../../../customWidget/custom_alert_dialog.dart'; + +class StudyDetailPage extends StatefulWidget { + const StudyDetailPage(this.detail, {super.key}); + + final Map detail; + + @override + State createState() => _StudyDetailPageState(); +} + +class _StudyDetailPageState extends State { + @override + void initState() { + // TODO: implement initState + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + showDialog( + context: context, + builder: + (context) => CustomAlertDialog( + title: "提示", + content: "重要提醒:尊敬的用户,根据规定我们会在您学习过程中多次进行人脸识别认证,为了保护您的隐私请您在摄像设备视野内确保衣冠整齐。", + cancelText: "取消", + confirmText: "同意并继续", + onCancel: () {}, + onConfirm: () {}, + ), + ); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppbar(title: "学习详情"), + body: Column(children: []), + ); + } +} diff --git a/lib/pages/home/study/study_garden_page.dart b/lib/pages/home/study/study_garden_page.dart new file mode 100644 index 0000000..fb6b59c --- /dev/null +++ b/lib/pages/home/study/study_garden_page.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:qhd_prevention/pages/home/study/study_my_task_page.dart'; +import 'package:qhd_prevention/pages/home/study/study_score_page.dart'; +import 'package:qhd_prevention/pages/my_appbar.dart'; +import 'package:qhd_prevention/tools/tools.dart'; + +class StudyGardenPage extends StatefulWidget { + const StudyGardenPage({super.key}); + + @override + State createState() => _StudyGardenPageState(); +} + +class _StudyGardenPageState extends State { + + @override + Widget build(BuildContext context) { + + return Scaffold( + appBar: MyAppbar(title: '学习园地'), + body: SafeArea(child: Column( + children: [ + Padding(padding: EdgeInsets.only(left: 0,top: 0,right: 0), + child: Image.asset('assets/images/study-banner.png')), + Container( + color: Colors.white, + padding: EdgeInsets.all(12), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + spacing: 15, + children: [ + GestureDetector( + child: Image.asset('assets/images/study-app01.png', width: (screenWidth(context) - 15-25)/2), + onTap: () { + pushPage(StudyMyTaskPage(), context); + }, + ), + GestureDetector( + child: Image.asset('assets/images/study-app02.png', width: (screenWidth(context) - 15-25)/2), + onTap: () { + pushPage(StudyScorePage(), context); + + }, + ) + ], + ), + ) + ], + )), + ); + } +} diff --git a/lib/pages/home/study/study_my_task_page.dart b/lib/pages/home/study/study_my_task_page.dart new file mode 100644 index 0000000..984001d --- /dev/null +++ b/lib/pages/home/study/study_my_task_page.dart @@ -0,0 +1,296 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:qhd_prevention/customWidget/custom_button.dart'; +import 'package:qhd_prevention/pages/home/study/study_class_list_page.dart'; +import 'package:qhd_prevention/tools/tools.dart'; +import '../../../http/ApiService.dart'; +import '../../my_appbar.dart'; + +class StudyMyTaskPage extends StatefulWidget { + const StudyMyTaskPage({super.key}); + + @override + State createState() => _StudyMyTaskPageState(); +} + +class _StudyMyTaskPageState extends State { + int _page = 1; + bool _isLoading = false; + bool _hasMore = true; + List _list = []; + Timer? _timer; + + @override + void initState() { + super.initState(); + WidgetsBinding.instance.addPostFrameCallback((_) { + _getStudyList(); + }); + _startCountdownTimer(); + } + + @override + void dispose() { + _timer?.cancel(); + super.dispose(); + } + + void _startCountdownTimer() { + _timer = Timer.periodic(Duration(seconds: 1), (_) { + setState(() { + for (var item in _list) { + if (item['remainingSeconds'] != null && + item['remainingSeconds'] > 0) { + item['remainingSeconds']--; + } else { + item['remainingSeconds'] = 0; + } + } + }); + }); + } + + Future _getStudyList({bool loadMore = false}) async { + if (_isLoading) return; + _isLoading = true; + if (!loadMore) LoadingDialogHelper.show(context); + + try { + final result = await ApiService.getStudyList(_page); + if (result['result'] == 'success') { + final List newList = result['varList'] ?? []; + + final totalResult = result['page']['totalResult'] ?? 10; + final now = DateTime.now(); + for (var item in newList) { + final endTimeStr = item['END_TIME'] ?? ''; + try { + final endTime = DateTime.parse(endTimeStr); + final seconds = endTime.difference(now).inSeconds; + item['remainingSeconds'] = seconds > 0 ? seconds : 0; + } catch (_) { + item['remainingSeconds'] = 0; + } + } + + setState(() { + if (loadMore) { + _list.addAll(newList); + } else { + _list = newList; + } + _hasMore = _list.length <= totalResult; + if (_hasMore) _page++; + }); + } + } catch (e) { + print('加载出错: $e'); + } finally { + if (!loadMore) LoadingDialogHelper.hide(context); + _isLoading = false; + } + } + + String formatSeconds(int seconds) { + if (seconds <= 0) return '00天 00:00:00'; + final d = Duration(seconds: seconds); + final days = d.inDays.toString().padLeft(2, '0'); + final hours = (d.inHours % 24).toString().padLeft(2, '0'); + final minutes = (d.inMinutes % 60).toString().padLeft(2, '0'); + final secs = (d.inSeconds % 60).toString().padLeft(2, '0'); + return "$days天 $hours:$minutes:$secs"; + } + + Widget _buildItem(Map item) { + Color stateColor(String code) { + switch (code) { + case '1': + return Colors.blue; + case '2': + return Colors.green; + default: + return Colors.grey; + } + } + + String stateText(String code) { + switch (code) { + case '0': + return '未学习'; + case '1': + return '学习中'; + case '2': + return '已学完'; + case '3': + return '已完成'; + case '4': + return '未完成'; + case '5': + return '待评估'; + case '6': + return '评估未合格'; + default: + return '未知'; + } + } + + final startTime = DateTime.tryParse(item['START_TIME'] ?? ''); + final endTime = DateTime.tryParse(item['END_TIME'] ?? ''); + final now = DateTime.now(); + return Container( + margin: const EdgeInsets.symmetric(horizontal: 15, vertical: 8), + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + boxShadow: [ + BoxShadow( + color: Colors.grey.shade200, + blurRadius: 5, + offset: Offset(0, 2), + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + spacing: 15, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + '培训任务名称: ${item['NAME'] ?? ''}', + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), + ), + ), + Text( + stateText(item['STUDYSTATE'] ?? ''), + style: TextStyle( + color: stateColor(item['STUDYSTATE'] ?? ''), + fontSize: 14, + ), + ), + ], + ), + Divider(height: 15), + Text( + '岗位类型:${item['POSTTYPE_NAME'] ?? ''}', + style: TextStyle(fontSize: 14), + ), + Text( + '培训时间:${item['START_TIME'] ?? ''} 至 ${item['END_TIME'] ?? ''}', + style: TextStyle(fontSize: 14), + ), + Divider(height: 15), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Icon(Icons.access_time, size: 18, color: Colors.grey), + SizedBox(width: 5), + Text( + formatSeconds(item['remainingSeconds'] ?? 0), + style: TextStyle(fontSize: 12,), + ), + ], + ), + Wrap( + spacing: 8, + children: [ + if ((item['STUDYSTATE'] ?? '') == '2' && + (item['STAGEEXAMSTATE'] ?? '') == '3') + CustomButton( + onPressed: () {}, + text: "考试详情", + backgroundColor: Colors.blue, + borderRadius: 18, + height: 36, + padding: EdgeInsets.symmetric(horizontal: 20), + ), + if ((item['STUDYSTATE'] ?? '') == '2' && + int.tryParse(item['STAGEEXAMSTATE'] ?? '0')! >= 2 && + (item['ISSTRENGTHEN'] == '1' || + item['ISSTRENGTHEN'] == '2') && + item['STRENGTHENEXAMSTATE'] == '0') + CustomButton( + onPressed: () {}, + text: "考试详情", + backgroundColor: Colors.blue, + borderRadius: 18, + height: 36, + padding: EdgeInsets.symmetric(horizontal: 20), + ), + if ((int.tryParse(item['STUDYSTATE'] ?? '0') ?? 0) <= 1 && + item['STATE'] == '5') + if (startTime != null && + endTime != null && + now.isAfter(startTime) && + now.isBefore(endTime)) + CustomButton( + onPressed: () { + pushPage(StudyClassListPage(item['CLASS_ID'] ?? '', item['POST_ID'] ?? ''), context); + }, + text: "立即学习", + backgroundColor: Colors.blue, + borderRadius: 18, + height: 36, + padding: EdgeInsets.symmetric(horizontal: 20), + ), + + if ((item['STUDYSTATE'] ?? '') == '2' && + item['STATE'] != '6' && + item['EXAMINATION'] == 1 && + item['STAGEEXAMSTATE'] == '1' && + (item['ksCount'] ?? 0) < (item['NUMBEROFEXAMS'] ?? 1)) + CustomButton( + onPressed: () {}, + text: "立即考试", + backgroundColor: Colors.green, + borderRadius: 18, + height: 36, + padding: EdgeInsets.symmetric(horizontal: 20), + ), + ], + ), + ], + ), + ], + ), + ); + } + + void _loadMoreIfNeeded(ScrollNotification notification) { + if (notification.metrics.pixels >= + notification.metrics.maxScrollExtent - 100) { + if (_hasMore && !_isLoading) { + _getStudyList(loadMore: true); + } + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: MyAppbar(title: '学习园地'), + body: SafeArea( + child: NotificationListener( + onNotification: (notification) { + _loadMoreIfNeeded(notification); + return false; + }, + child: + _list.isEmpty + ? Center(child: Text('暂无数据')) + : ListView.builder( + itemCount: _list.length, + itemBuilder: (context, index) { + return _buildItem(_list[index]); + }, + ), + ), + ), + ); + } +} diff --git a/lib/pages/home/study/study_score_page.dart b/lib/pages/home/study/study_score_page.dart new file mode 100644 index 0000000..354436d --- /dev/null +++ b/lib/pages/home/study/study_score_page.dart @@ -0,0 +1,15 @@ +import 'package:flutter/cupertino.dart'; + +class StudyScorePage extends StatefulWidget { + const StudyScorePage({super.key}); + + @override + State createState() => _StudyScorePageState(); +} + +class _StudyScorePageState extends State { + @override + Widget build(BuildContext context) { + return const Placeholder(); + } +} diff --git a/lib/pages/my_appbar.dart b/lib/pages/my_appbar.dart index 579e9d0..a2a4590 100644 --- a/lib/pages/my_appbar.dart +++ b/lib/pages/my_appbar.dart @@ -14,7 +14,7 @@ class MyAppbar extends StatelessWidget implements PreferredSizeWidget { Key? key, required this.title, this.onBackPressed, - this.backgroundColor = Colors.blue, + this.backgroundColor = const Color(0xFF3874F6), this.textColor = Colors.white, this.actions, this.isBack = true, diff --git a/lib/tools/tools.dart b/lib/tools/tools.dart index 88dc670..9d3c986 100644 --- a/lib/tools/tools.dart +++ b/lib/tools/tools.dart @@ -250,3 +250,19 @@ void presentPage(BuildContext context, Widget page) { MaterialPageRoute(fullscreenDialog: true, builder: (_) => page), ); } + +class LoadingDialogHelper { + static void show(BuildContext context) { + showDialog( + context: context, + barrierDismissible: false, + builder: (_) => const Center(child: CircularProgressIndicator()), + ); + } + + static void hide(BuildContext context) { + if (Navigator.canPop(context)) { + Navigator.of(context).pop(); + } + } +} diff --git a/pubspec.lock b/pubspec.lock index 1f1a7d9..466471a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -6,7 +6,7 @@ packages: description: name: args sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.7.0" asn1lib: @@ -21,16 +21,16 @@ packages: dependency: transitive description: name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.flutter-io.cn" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted - version: "2.13.0" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.1.2" characters: @@ -38,7 +38,7 @@ packages: description: name: characters sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.4.0" clock: @@ -46,7 +46,7 @@ packages: description: name: clock sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.1.2" collection: @@ -54,7 +54,7 @@ packages: description: name: collection sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.19.1" connectivity_plus: @@ -62,7 +62,7 @@ packages: description: name: connectivity_plus sha256: "051849e2bd7c7b3bc5844ea0d096609ddc3a859890ec3a9ac4a65a2620cc1f99" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "6.1.4" connectivity_plus_platform_interface: @@ -70,7 +70,7 @@ packages: description: name: connectivity_plus_platform_interface sha256: "42657c1715d48b167930d5f34d00222ac100475f73d10162ddf43e714932f204" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.0.1" convert: @@ -86,7 +86,7 @@ packages: description: name: cross_file sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.3.4+2" crypto: @@ -94,7 +94,7 @@ packages: description: name: crypto sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.0.6" csslib: @@ -102,7 +102,7 @@ packages: description: name: csslib sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.0.2" cupertino_icons: @@ -110,7 +110,7 @@ packages: description: name: cupertino_icons sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.0.8" dbus: @@ -118,7 +118,7 @@ packages: description: name: dbus sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.7.11" dio: @@ -150,7 +150,7 @@ packages: description: name: extended_image sha256: f6cbb1d798f51262ed1a3d93b4f1f2aa0d76128df39af18ecb77fa740f88b2e0 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "10.0.1" extended_image_library: @@ -158,23 +158,23 @@ packages: description: name: extended_image_library sha256: "1f9a24d3a00c2633891c6a7b5cab2807999eb2d5b597e5133b63f49d113811fe" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "5.0.1" fake_async: dependency: transitive description: name: fake_async - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.flutter-io.cn" + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted - version: "1.3.3" + version: "1.3.2" ffi: dependency: transitive description: name: ffi sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.1.4" file: @@ -182,7 +182,7 @@ packages: description: name: file sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "7.0.1" file_selector_linux: @@ -190,7 +190,7 @@ packages: description: name: file_selector_linux sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.9.3+2" file_selector_macos: @@ -198,7 +198,7 @@ packages: description: name: file_selector_macos sha256: "8c9250b2bd2d8d4268e39c82543bacbaca0fda7d29e0728c3c4bbb7c820fd711" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.9.4+3" file_selector_platform_interface: @@ -206,7 +206,7 @@ packages: description: name: file_selector_platform_interface sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.6.2" file_selector_windows: @@ -214,7 +214,7 @@ packages: description: name: file_selector_windows sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.9.3+4" flutter: @@ -227,7 +227,7 @@ packages: description: name: flutter_lints sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "5.0.0" flutter_plugin_android_lifecycle: @@ -235,7 +235,7 @@ packages: description: name: flutter_plugin_android_lifecycle sha256: f948e346c12f8d5480d2825e03de228d0eb8c3a737e4cdaa122267b89c022b5e - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.0.28" flutter_test: @@ -261,7 +261,7 @@ packages: description: name: html sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.15.6" http: @@ -269,7 +269,7 @@ packages: description: name: http sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.4.0" http_client_helper: @@ -277,7 +277,7 @@ packages: description: name: http_client_helper sha256: "8a9127650734da86b5c73760de2b404494c968a3fd55602045ffec789dac3cb1" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.0.0" http_parser: @@ -285,7 +285,7 @@ packages: description: name: http_parser sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "4.1.2" image_picker: @@ -293,7 +293,7 @@ packages: description: name: image_picker sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.1.2" image_picker_android: @@ -301,7 +301,7 @@ packages: description: name: image_picker_android sha256: "317a5d961cec5b34e777b9252393f2afbd23084aa6e60fcf601dcf6341b9ebeb" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.8.12+23" image_picker_for_web: @@ -309,7 +309,7 @@ packages: description: name: image_picker_for_web sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.0.6" image_picker_ios: @@ -317,7 +317,7 @@ packages: description: name: image_picker_ios sha256: "05da758e67bc7839e886b3959848aa6b44ff123ab4b28f67891008afe8ef9100" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.8.12+2" image_picker_linux: @@ -325,7 +325,7 @@ packages: description: name: image_picker_linux sha256: "34a65f6740df08bbbeb0a1abd8e6d32107941fd4868f67a507b25601651022c9" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.2.1+2" image_picker_macos: @@ -333,7 +333,7 @@ packages: description: name: image_picker_macos sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.2.1+2" image_picker_platform_interface: @@ -341,7 +341,7 @@ packages: description: name: image_picker_platform_interface sha256: "886d57f0be73c4b140004e78b9f28a8914a09e50c2d816bdd0520051a71236a0" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.10.1" image_picker_windows: @@ -349,7 +349,7 @@ packages: description: name: image_picker_windows sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.2.1+1" intl: @@ -357,7 +357,7 @@ packages: description: name: intl sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.20.2" js: @@ -365,23 +365,23 @@ packages: description: name: js sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.7.2" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" - url: "https://pub.flutter-io.cn" + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted - version: "10.0.9" + version: "10.0.8" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.0.9" leak_tracker_testing: @@ -389,7 +389,7 @@ packages: description: name: leak_tracker_testing sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.0.1" lints: @@ -397,7 +397,7 @@ packages: description: name: lints sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "5.1.1" matcher: @@ -405,7 +405,7 @@ packages: description: name: matcher sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.12.17" material_color_utilities: @@ -413,7 +413,7 @@ packages: description: name: material_color_utilities sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.11.1" meta: @@ -421,7 +421,7 @@ packages: description: name: meta sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.16.0" mime: @@ -429,7 +429,7 @@ packages: description: name: mime sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.0.0" mobile_scanner: @@ -437,7 +437,7 @@ packages: description: name: mobile_scanner sha256: "54005bdea7052d792d35b4fef0f84ec5ddc3a844b250ecd48dc192fb9b4ebc95" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "7.0.1" nested: @@ -445,7 +445,7 @@ packages: description: name: nested sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.0.0" nm: @@ -453,7 +453,7 @@ packages: description: name: nm sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.5.0" package_info_plus: @@ -461,7 +461,7 @@ packages: description: name: package_info_plus sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "8.3.0" package_info_plus_platform_interface: @@ -469,7 +469,7 @@ packages: description: name: package_info_plus_platform_interface sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.2.0" path: @@ -477,7 +477,7 @@ packages: description: name: path sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.9.1" path_provider: @@ -485,7 +485,7 @@ packages: description: name: path_provider sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.1.5" path_provider_android: @@ -493,7 +493,7 @@ packages: description: name: path_provider_android sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.2.17" path_provider_foundation: @@ -501,7 +501,7 @@ packages: description: name: path_provider_foundation sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.4.1" path_provider_linux: @@ -509,7 +509,7 @@ packages: description: name: path_provider_linux sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.2.1" path_provider_platform_interface: @@ -517,7 +517,7 @@ packages: description: name: path_provider_platform_interface sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.1.2" path_provider_windows: @@ -525,7 +525,7 @@ packages: description: name: path_provider_windows sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.3.0" petitparser: @@ -533,7 +533,7 @@ packages: description: name: petitparser sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "6.1.0" photo_manager: @@ -541,7 +541,7 @@ packages: description: name: photo_manager sha256: a0d9a7a9bc35eda02d33766412bde6d883a8b0acb86bbe37dac5f691a0894e8a - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.7.1" photo_manager_image_provider: @@ -549,7 +549,7 @@ packages: description: name: photo_manager_image_provider sha256: b6015b67b32f345f57cf32c126f871bced2501236c405aafaefa885f7c821e4f - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.2.0" photo_view: @@ -557,7 +557,7 @@ packages: description: name: photo_view sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.15.0" platform: @@ -565,7 +565,7 @@ packages: description: name: platform sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.1.6" plugin_platform_interface: @@ -573,7 +573,7 @@ packages: description: name: plugin_platform_interface sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.1.8" pointycastle: @@ -589,7 +589,7 @@ packages: description: name: provider sha256: "4abbd070a04e9ddc287673bf5a030c7ca8b685ff70218720abab8b092f53dd84" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "6.1.5" shared_preferences: @@ -597,7 +597,7 @@ packages: description: name: shared_preferences sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.5.3" shared_preferences_android: @@ -605,7 +605,7 @@ packages: description: name: shared_preferences_android sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.4.10" shared_preferences_foundation: @@ -613,7 +613,7 @@ packages: description: name: shared_preferences_foundation sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.5.4" shared_preferences_linux: @@ -621,7 +621,7 @@ packages: description: name: shared_preferences_linux sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.4.1" shared_preferences_platform_interface: @@ -629,7 +629,7 @@ packages: description: name: shared_preferences_platform_interface sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.4.1" shared_preferences_web: @@ -637,7 +637,7 @@ packages: description: name: shared_preferences_web sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.4.3" shared_preferences_windows: @@ -645,7 +645,7 @@ packages: description: name: shared_preferences_windows sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.4.1" simple_gesture_detector: @@ -653,7 +653,7 @@ packages: description: name: simple_gesture_detector sha256: ba2cd5af24ff20a0b8d609cec3f40e5b0744d2a71804a2616ae086b9c19d19a3 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.2.1" sky_engine: @@ -666,7 +666,7 @@ packages: description: name: source_span sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.10.1" stack_trace: @@ -674,7 +674,7 @@ packages: description: name: stack_trace sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.12.1" stream_channel: @@ -682,7 +682,7 @@ packages: description: name: stream_channel sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.1.4" string_scanner: @@ -690,7 +690,7 @@ packages: description: name: string_scanner sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.4.1" table_calendar: @@ -698,7 +698,7 @@ packages: description: name: table_calendar sha256: "0c0c6219878b363a2d5f40c7afb159d845f253d061dc3c822aa0d5fe0f721982" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.2.0" term_glyph: @@ -706,7 +706,7 @@ packages: description: name: term_glyph sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.2.2" test_api: @@ -714,7 +714,7 @@ packages: description: name: test_api sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.7.4" typed_data: @@ -722,7 +722,7 @@ packages: description: name: typed_data sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.4.0" vector_math: @@ -730,7 +730,7 @@ packages: description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.1.4" video_player: @@ -738,7 +738,7 @@ packages: description: name: video_player sha256: "0d55b1f1a31e5ad4c4967bfaa8ade0240b07d20ee4af1dfef5f531056512961a" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.10.0" video_player_android: @@ -746,7 +746,7 @@ packages: description: name: video_player_android sha256: "4a5135754a62dbc827a64a42ef1f8ed72c962e191c97e2d48744225c2b9ebb73" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.8.7" video_player_avfoundation: @@ -754,7 +754,7 @@ packages: description: name: video_player_avfoundation sha256: "9fedd55023249f3a02738c195c906b4e530956191febf0838e37d0dac912f953" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.8.0" video_player_platform_interface: @@ -762,7 +762,7 @@ packages: description: name: video_player_platform_interface sha256: cf2a1d29a284db648fd66cbd18aacc157f9862d77d2cc790f6f9678a46c1db5a - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "6.4.0" video_player_web: @@ -770,7 +770,7 @@ packages: description: name: video_player_web sha256: "9f3c00be2ef9b76a95d94ac5119fb843dca6f2c69e6c9968f6f2b6c9e7afbdeb" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.4.0" visibility_detector: @@ -778,23 +778,23 @@ packages: description: name: visibility_detector sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "0.4.0+2" vm_service: dependency: transitive description: name: vm_service - sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 - url: "https://pub.flutter-io.cn" + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted - version: "15.0.0" + version: "14.3.1" web: dependency: transitive description: name: web sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.1.1" webview_flutter: @@ -802,7 +802,7 @@ packages: description: name: webview_flutter sha256: c3e4fe614b1c814950ad07186007eff2f2e5dd2935eba7b9a9a1af8e5885f1ba - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "4.13.0" webview_flutter_android: @@ -810,7 +810,7 @@ packages: description: name: webview_flutter_android sha256: f6e6afef6e234801da77170f7a1847ded8450778caf2fe13979d140484be3678 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "4.7.0" webview_flutter_platform_interface: @@ -818,7 +818,7 @@ packages: description: name: webview_flutter_platform_interface sha256: f0dc2dc3a2b1e3a6abdd6801b9355ebfeb3b8f6cde6b9dc7c9235909c4a1f147 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "2.13.1" webview_flutter_wkwebview: @@ -826,7 +826,7 @@ packages: description: name: webview_flutter_wkwebview sha256: a3d461fe3467014e05f3ac4962e5fdde2a4bf44c561cb53e9ae5c586600fdbc3 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "3.22.0" wechat_assets_picker: @@ -834,7 +834,7 @@ packages: description: name: wechat_assets_picker sha256: cafe3d32564ed3cacf9822f251941f7b44fe9885c17c8de4fca7e939a459e1ef - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "9.5.1" wechat_picker_library: @@ -842,23 +842,23 @@ packages: description: name: wechat_picker_library sha256: a42e09cb85b15fc9410f6a69671371cc60aa99c4a1f7967f6593a7f665f6f47a - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.0.5" win32: dependency: transitive description: name: win32 - sha256: "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03" - url: "https://pub.flutter-io.cn" + sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted - version: "5.14.0" + version: "5.13.0" xdg_directories: dependency: transitive description: name: xdg_directories sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "1.1.0" xml: @@ -866,9 +866,9 @@ packages: description: name: xml sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.flutter-io.cn" + url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" source: hosted version: "6.5.0" sdks: - dart: ">=3.8.0 <4.0.0" + dart: ">=3.7.0 <4.0.0" flutter: ">=3.29.0" diff --git a/pubspec.yaml b/pubspec.yaml index 169eab7..321bab5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -57,6 +57,9 @@ dependencies: #RSA 加密库 encrypt: ^5.0.3 pointycastle: ^3.6.2 + #网页页面加载 + webview_flutter: ^4.4.0 + path_provider: ^2.0.1 dev_dependencies: flutter_test: