diff --git a/android/local.properties b/android/local.properties index 783a68d..8331262 100644 --- a/android/local.properties +++ b/android/local.properties @@ -1,5 +1,5 @@ sdk.dir=C:\\sdk\\android-sdk flutter.sdk=C:\\sdk\\flutter -flutter.buildMode=debug -flutter.versionName=1.6.241211 +flutter.buildMode=release +flutter.versionName=1.6.241225 flutter.versionCode=75 \ No newline at end of file diff --git a/lib/common/get.dart b/lib/common/get.dart index 64cf024..cf98c19 100644 --- a/lib/common/get.dart +++ b/lib/common/get.dart @@ -305,6 +305,9 @@ Future getSchedule() async { } Future getScheduleChanges(String id, Map schedule) async { + if ((AppData.persistentData["showScheduleChange"] ?? "0") == "0") { + return schedule; + } print('getScheduleChanges'); print("获取课表变更(调课/停课/补课)"); print('id: ' + id); diff --git a/lib/data.dart b/lib/data.dart index 834c3c4..e311c75 100644 --- a/lib/data.dart +++ b/lib/data.dart @@ -67,6 +67,7 @@ class AppData { "threshold": "5", "showLessonTimeInList": "0", "showDayByWeekDay": "0", + "showScheduleChange": "0", "newVersion": "", "newBody": "", "newTime": "", diff --git a/lib/pages/about.dart b/lib/pages/about.dart index 7f70887..ac2a6fb 100644 --- a/lib/pages/about.dart +++ b/lib/pages/about.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; import '/custom/expansiontile.dart' as CustomExpansionTile; import '/widget/bars.dart'; @@ -28,7 +28,7 @@ class _InfoPageState extends State { publicTopBar( "说明", InkWell( - child: Icon(FlutterRemix.close_line, size: 24), + child: Icon(Remix.close_line, size: 24), onTap: () { Navigator.of(context).pop(); }, diff --git a/lib/pages/career.dart b/lib/pages/career.dart index ab5c4a3..86146c6 100644 --- a/lib/pages/career.dart +++ b/lib/pages/career.dart @@ -1,13 +1,13 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; + import '/common/get.dart'; import '/common/style.dart'; +import '/custom/expansiontile.dart' as CustomExpansionTile; import '/widget/bars.dart'; import '/widget/dialog.dart'; -import '/custom/expansiontile.dart' as CustomExpansionTile; - import '../config.dart'; import '../data.dart'; @@ -182,7 +182,7 @@ class _CareerPageBodyState extends State { publicTopBar( "我的大学生涯", InkWell( - child: Icon(FlutterRemix.close_line, size: 24), + child: Icon(Remix.close_line, size: 24), onTap: () { if (type == 0) { Navigator.of(context).pop(); @@ -207,7 +207,7 @@ class _CareerPageBodyState extends State { // margin: EdgeInsets.fromLTRB(16, 0, 0, 0), // padding: EdgeInsets.fromLTRB(8, 8, 8, 8), // child: Icon( - // FlutterRemix.checkbox_circle_line, + // Remix.checkbox_circle_line, // size: 64, // color: Colors.white, // ), diff --git a/lib/pages/login.dart b/lib/pages/login.dart index eb013eb..6aa6f5a 100644 --- a/lib/pages/login.dart +++ b/lib/pages/login.dart @@ -2,8 +2,8 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_remix/flutter_remix.dart'; import 'package:http/http.dart'; +import 'package:remixicon/remixicon.dart'; import '/common/cookie.dart'; import '/common/get.dart'; @@ -177,7 +177,7 @@ class LoginPageState extends State { publicTopBar( "桂工助手N", InkWell( - child: Icon(FlutterRemix.close_line, size: 24), + child: Icon(Remix.close_line, size: 24), onTap: () { Navigator.of(context).pop(); }, @@ -221,7 +221,7 @@ class LoginPageState extends State { controller: studentIdController, decoration: InputDecoration( icon: Icon( - FlutterRemix.user_3_line, + Remix.user_3_line, color: studentIdFocusNode.hasFocus ? readColor() : null, ), border: InputBorder.none, @@ -249,7 +249,7 @@ class LoginPageState extends State { controller: passwordController, decoration: InputDecoration( icon: Icon( - FlutterRemix.key_line, + Remix.key_line, color: passwordFocusNode.hasFocus ? readColor() : null, ), border: InputBorder.none, @@ -274,7 +274,7 @@ class LoginPageState extends State { controller: checkCodeController, decoration: InputDecoration( icon: Icon( - FlutterRemix.magic_line, + Remix.magic_line, color: checkCodeFocusNode.hasFocus ? readColor() : null, ), border: InputBorder.none, diff --git a/lib/pages/person.dart b/lib/pages/person.dart index 8fecd09..332ba71 100644 --- a/lib/pages/person.dart +++ b/lib/pages/person.dart @@ -1,13 +1,13 @@ +import 'package:badges/badges.dart' as badges; import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; + import '/pages/career.dart'; import '/pages/queryClassRoom.dart'; import '/pages/setting.dart'; import '/pages/update.dart'; import '/widget/bars.dart'; import '/widget/icons.dart'; -import 'package:badges/badges.dart' as badges; - import '../config.dart'; import '../data.dart'; import 'about.dart'; @@ -52,7 +52,7 @@ class MinePageState extends State { ); }, child: mineItem( - FlutterRemix.user_5_line, + Remix.user_5_line, EdgeInsets.fromLTRB(16, 14, 0, 14), (AppData.persistentData["name"] != "" ? "更换账号" : "登录教务"), readColor(), @@ -67,7 +67,7 @@ class MinePageState extends State { Navigator.of(context).push(MaterialPageRoute(builder: (context) => CareerPage())); } }, - child: mineItem(FlutterRemix.timer_flash_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "课程生涯", readColor()), + child: mineItem(Remix.timer_flash_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "课程生涯", readColor()), ), InkWell( onTap: () { @@ -78,7 +78,7 @@ class MinePageState extends State { Navigator.of(context).push(MaterialPageRoute(builder: (context) => QueryRoomPage())); } }, - child: mineItem(FlutterRemix.building_4_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "教室查询", readColor()), + child: mineItem(Remix.building_4_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "教室查询", readColor()), ), topLine, InkWell( @@ -88,20 +88,20 @@ class MinePageState extends State { Navigator.of(context).push(MaterialPageRoute(builder: (context) => UpdatePage())); }, child: AppData.hasNewVersion - ? mineItem5(FlutterRemix.download_cloud_2_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "版本更新", readColor()) - : mineItem(FlutterRemix.download_cloud_2_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "版本更新", readColor()), + ? mineItem5(Remix.download_cloud_2_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "版本更新", readColor()) + : mineItem(Remix.download_cloud_2_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "版本更新", readColor()), ), InkWell( onTap: () { Navigator.of(context).push(MaterialPageRoute(builder: (context) => InfoPage())); }, - child: mineItem(FlutterRemix.information_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "说明", readColor()), + child: mineItem(Remix.information_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "说明", readColor()), ), InkWell( onTap: () { Navigator.of(context).push(MaterialPageRoute(builder: (context) => SettingPage(title: "设置2"))); }, - child: mineItem(FlutterRemix.settings_3_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "设置", readColor()), + child: mineItem(Remix.settings_3_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "设置", readColor()), ), ], ), diff --git a/lib/pages/queryClassRoom.dart b/lib/pages/queryClassRoom.dart index f0c1213..66211ba 100644 --- a/lib/pages/queryClassRoom.dart +++ b/lib/pages/queryClassRoom.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; import '/common/get.dart'; import '/data.dart'; import '/widget/bars.dart'; @@ -40,7 +40,7 @@ class QueryRoomPageState extends State { publicTopBar( "教室查询", InkWell( - child: Icon(FlutterRemix.close_line, size: 24), + child: Icon(Remix.close_line, size: 24), onTap: () { Navigator.of(context).pop(); }, @@ -206,7 +206,7 @@ class QueryConditionCardState extends State { height: 40, child: DropdownButton( enableFeedback: true, - icon: Icon(FlutterRemix.arrow_right_s_line), + icon: Icon(Remix.arrow_right_s_line), iconSize: 16, underline: Container(), alignment: Alignment.centerRight, @@ -247,7 +247,7 @@ class QueryConditionCardState extends State { selectedItemBuilder: (context) { return dropdownMenuItemList("weekOfSemester", true); }, - icon: Icon(FlutterRemix.arrow_right_s_line), + icon: Icon(Remix.arrow_right_s_line), iconSize: 16, underline: Container(), alignment: Alignment.centerRight, @@ -279,7 +279,7 @@ class QueryConditionCardState extends State { selectedItemBuilder: (context) { return dropdownMenuItemList("dayOfWeek", true); }, - icon: Icon(FlutterRemix.arrow_right_s_line), + icon: Icon(Remix.arrow_right_s_line), iconSize: 16, underline: Container(), alignment: Alignment.centerRight, diff --git a/lib/pages/queryExam.dart b/lib/pages/queryExam.dart index cf873ee..4d00091 100644 --- a/lib/pages/queryExam.dart +++ b/lib/pages/queryExam.dart @@ -1,12 +1,12 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; + import '/common/get.dart'; import '/config.dart'; import '/widget/bars.dart'; import '/widget/lists.dart'; - import '../data.dart'; import 'career.dart'; @@ -114,7 +114,7 @@ class _QueryExamBodyState extends State { "我的考试", InkWell( child: Icon( - FlutterRemix.close_line, + Remix.close_line, size: 24, color: Colors.white, ), diff --git a/lib/pages/queryScore.dart b/lib/pages/queryScore.dart index 29dd19b..024192c 100644 --- a/lib/pages/queryScore.dart +++ b/lib/pages/queryScore.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; import 'package:glutassistantn/widget/dialog.dart'; +import 'package:remixicon/remixicon.dart'; import '/common/get.dart'; import '/pages/setting.dart'; @@ -187,7 +187,7 @@ class _QueryBodyState extends State { "成绩查询", InkWell( child: Icon( - FlutterRemix.close_line, + Remix.close_line, size: 24, color: Colors.white, ), @@ -214,7 +214,7 @@ class _QueryBodyState extends State { children: [ DropdownButton( enableFeedback: true, - icon: Icon(FlutterRemix.arrow_down_s_line), + icon: Icon(Remix.arrow_down_s_line), iconSize: 16, iconEnabledColor: Colors.white, elevation: 0, @@ -240,7 +240,7 @@ class _QueryBodyState extends State { ), DropdownButton( enableFeedback: true, - icon: Icon(FlutterRemix.arrow_down_s_line), + icon: Icon(Remix.arrow_down_s_line), iconSize: 16, iconEnabledColor: Colors.white, elevation: 0, diff --git a/lib/pages/scheduleManager.dart b/lib/pages/scheduleManager.dart index f51a6b9..3dd30a2 100644 --- a/lib/pages/scheduleManager.dart +++ b/lib/pages/scheduleManager.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; + import '/widget/bars.dart'; import '../config.dart'; @@ -34,7 +35,7 @@ class _ScheduleManagePageState extends State { publicTopBar( "课程管理", InkWell( - child: Icon(FlutterRemix.close_line, size: 24), + child: Icon(Remix.close_line, size: 24), onTap: () { Navigator.of(context).pop(); }, diff --git a/lib/pages/setting.dart b/lib/pages/setting.dart index a4695c9..5ef9db9 100644 --- a/lib/pages/setting.dart +++ b/lib/pages/setting.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; import 'package:glutassistantn/common/log.dart'; +import 'package:remixicon/remixicon.dart'; import '/common/init.dart'; import '/common/io.dart'; @@ -53,7 +53,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { publicTopBar( "设置", InkWell( - child: Icon(FlutterRemix.close_line, size: 24), + child: Icon(Remix.close_line, size: 24), onTap: () { Navigator.of(context).pop(); }, @@ -72,7 +72,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Row( children: [ Icon( - FlutterRemix.calendar_line, + Remix.calendar_line, color: readColor(), ), Container( @@ -115,7 +115,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Row( children: [ Icon( - FlutterRemix.mickey_line, + Remix.mickey_line, color: readColor(), ), Container( @@ -161,7 +161,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Row( children: [ Icon( - FlutterRemix.game_line, + Remix.game_line, color: readColor(), ), Container( @@ -208,7 +208,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Row( children: [ Icon( - FlutterRemix.palette_line, + Remix.palette_line, color: readColor(), ), Container( @@ -224,7 +224,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { return DropdownButton( value: AppData.persistentData["color"] ?? null, icon: Icon( - FlutterRemix.arrow_down_s_line, + Remix.arrow_down_s_line, size: 18, ), enableFeedback: true, @@ -285,7 +285,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Row( children: [ Icon( - FlutterRemix.apps_2_line, + Remix.apps_2_line, color: readColor(), ), Container( @@ -300,7 +300,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Builder(builder: (BuildContext context) { return DropdownButton( icon: Icon( - FlutterRemix.arrow_down_s_line, + Remix.arrow_down_s_line, size: 18, ), enableFeedback: true, @@ -329,7 +329,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Row( children: [ Icon( - FlutterRemix.timer_2_line, + Remix.timer_2_line, color: readColor(), ), Container( @@ -344,7 +344,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Builder(builder: (BuildContext context) { return DropdownButton( icon: Icon( - FlutterRemix.arrow_down_s_line, + Remix.arrow_down_s_line, size: 18, ), enableFeedback: true, @@ -386,7 +386,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Row( children: [ Icon( - FlutterRemix.calendar_2_line, + Remix.calendar_2_line, color: readColor(), ), Container( @@ -401,7 +401,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { Builder(builder: (BuildContext context) { return DropdownButton( icon: Icon( - FlutterRemix.arrow_down_s_line, + Remix.arrow_down_s_line, size: 18, ), enableFeedback: true, @@ -437,11 +437,68 @@ class _SettingPageState extends State with WidgetsBindingObserver { }) ], ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Icon( + Remix.exchange_2_line, + color: readColor(), + ), + Container( + padding: EdgeInsets.fromLTRB(16, 14, 0, 14), + child: Text( + "调课补课", + style: TextStyle(fontSize: 16, color: Colors.black), + ), + ) + ], + ), + Builder(builder: (BuildContext context) { + return DropdownButton( + icon: Icon( + Remix.arrow_down_s_line, + size: 18, + ), + enableFeedback: true, + // style: TextStyle(color: readColor()), + iconEnabledColor: readColor(), + elevation: 0, + hint: Text( + (AppData.persistentData["showScheduleChange"] ?? "0") == "1" ? "显示" : "隐藏", + style: TextStyle(color: readColor(), fontSize: 14), + ), + items: [ + DropdownMenuItem( + child: Text( + "显示", + style: TextStyle(fontSize: 14), + ), + value: "1"), + DropdownMenuItem( + child: Text( + "隐藏", + style: TextStyle(fontSize: 14), + ), + value: "0") + ], + underline: Container(height: 0), + onChanged: (value) { + setState(() { + AppData.persistentData["showScheduleChange"] = value.toString(); + }); + writeConfig(); + }, + ); + }) + ], + ), InkWell( onTap: () { Navigator.of(context).push(MaterialPageRoute(builder: (context) => TimeManagePage())); }, - child: mineItem(FlutterRemix.timer_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "课节时间", readColor()), + child: mineItem(Remix.timer_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "课节时间", readColor()), ), InkWell( onTap: () async { @@ -449,13 +506,13 @@ class _SettingPageState extends State with WidgetsBindingObserver { ScaffoldMessenger.of(context).showSnackBar(jwSnackBar(2, "准备文件中...", 4)); shareLogFile(); }, - child: mineItem(FlutterRemix.bug_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "导出日志", readColor()), + child: mineItem(Remix.bug_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "导出日志", readColor()), ), // InkWell( // onTap: () { // Navigator.of(context).push(MaterialPageRoute(builder: (context) => ScheduleManagePage())); // }, - // child: mineItem(FlutterRemix.edit_box_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "课程管理", readColor()), + // child: mineItem(Remix.edit_box_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "课程管理", readColor()), // ), CustomExpansionTile.ExpansionTile( onExpansionChanged: (e) { @@ -468,7 +525,7 @@ class _SettingPageState extends State with WidgetsBindingObserver { tilePadding: EdgeInsets.fromLTRB(0, 0, 0, 0), title: Row( children: [ - Icon(_isExpanded ? FlutterRemix.alarm_warning_line : FlutterRemix.delete_bin_2_line, color: _isExpanded ? Colors.redAccent : readColor()), + Icon(_isExpanded ? Remix.alarm_warning_line : Remix.delete_bin_2_line, color: _isExpanded ? Colors.redAccent : readColor()), Container( padding: EdgeInsets.fromLTRB(16, 14, 0, 14), child: Text( diff --git a/lib/pages/timeManager.dart b/lib/pages/timeManager.dart index 5eee06f..fcf6604 100644 --- a/lib/pages/timeManager.dart +++ b/lib/pages/timeManager.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; + import '/common/io.dart'; import '/widget/bars.dart'; - import '../config.dart'; import '../data.dart'; import 'layout.dart'; @@ -99,7 +99,7 @@ class _TimeManagePageState extends State { publicTopBar( "时间定义", InkWell( - child: Icon(FlutterRemix.close_line, size: 24), + child: Icon(Remix.close_line, size: 24), onTap: () { Navigator.of(context).pop(); }, diff --git a/lib/pages/update.dart b/lib/pages/update.dart index 1fdfad6..67c2448 100644 --- a/lib/pages/update.dart +++ b/lib/pages/update.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; import 'package:url_launcher/url_launcher.dart'; import '/common/get.dart'; @@ -83,7 +83,7 @@ class UpdatePageBodyState extends State { publicTopBar( "获取新版本", InkWell( - child: Icon(FlutterRemix.close_line, size: 24), + child: Icon(Remix.close_line, size: 24), onTap: () { Navigator.of(context).pop(); }, @@ -129,7 +129,7 @@ class UpdatePageBodyState extends State { ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - mineItem4(FlutterRemix.lightbulb_flash_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "有新版本可以更新!", Colors.red), + mineItem4(Remix.lightbulb_flash_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "有新版本可以更新!", Colors.red), Container( width: double.infinity, margin: EdgeInsets.fromLTRB(0, 0, 0, 7), @@ -150,10 +150,10 @@ class UpdatePageBodyState extends State { style: TextStyle(color: Colors.black), ), ), - customInkWell("https://nano71.com/gan/GlutAssistantN.apk", FlutterRemix.download_2_line, "直接下载", readColor()), + customInkWell("https://nano71.com/gan/GlutAssistantN.apk", Remix.download_2_line, "直接下载", readColor()), // coolapk(), - customInkWell("", FlutterRemix.earth_line, "学校官网(暂不可用)", Colors.blueAccent), - customInkWell(AppData.persistentData["githubDownload"] ?? "", FlutterRemix.github_line, "Github", Colors.blueGrey) + customInkWell("", Remix.earth_line, "学校官网(暂不可用)", Colors.blueAccent), + customInkWell(AppData.persistentData["githubDownload"] ?? "", Remix.github_line, "Github", Colors.blueGrey) ], ) : Container(), @@ -161,7 +161,7 @@ class UpdatePageBodyState extends State { ? Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - mineItem4(FlutterRemix.lightbulb_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "当前版本变更", Colors.blue), + mineItem4(Remix.lightbulb_line, EdgeInsets.fromLTRB(16, 14, 0, 14), "当前版本变更", Colors.blue), Container( width: double.infinity, margin: EdgeInsets.fromLTRB(0, 0, 0, 7), @@ -183,8 +183,8 @@ class UpdatePageBodyState extends State { ), ), // coolapk(), - customInkWell("https://github.com/nano71/GlutAssistantN", FlutterRemix.github_line, "Github", Colors.blueGrey), - customInkWell("https://nano71.com/gan", FlutterRemix.earth_line, "项目官网", Colors.blueAccent) + customInkWell("https://github.com/nano71/GlutAssistantN", Remix.github_line, "Github", Colors.blueGrey), + customInkWell("https://nano71.com/gan", Remix.earth_line, "项目官网", Colors.blueAccent) ], ) : Container(), @@ -199,8 +199,8 @@ class UpdatePageBodyState extends State { style: TextStyle(color: Colors.black), ), ), - customInkWell("https://github.com/nano71/GlutAssistantN/releases/latest", FlutterRemix.github_line, "Github", Colors.blueGrey), - customInkWell("https://nano71.com/gan", FlutterRemix.earth_line, "项目官网", Colors.blueAccent) + customInkWell("https://github.com/nano71/GlutAssistantN/releases/latest", Remix.github_line, "Github", Colors.blueGrey), + customInkWell("https://nano71.com/gan", Remix.earth_line, "项目官网", Colors.blueAccent) // coolapk(), ], ) @@ -250,7 +250,7 @@ void checkNewVersion([bool skipShowSnackBar = true, BuildContext? context]) { } InkWell coolapk() { - return customInkWell("https://www.coolapk.com/apk/289253", FlutterRemix.store_2_line, "酷安", Colors.green); + return customInkWell("https://www.coolapk.com/apk/289253", Remix.store_2_line, "酷安", Colors.green); } InkWell customInkWell(String url, IconData icon, String title, Color color) { diff --git a/lib/widget/bars.dart b/lib/widget/bars.dart index c139819..304bc27 100644 --- a/lib/widget/bars.dart +++ b/lib/widget/bars.dart @@ -3,8 +3,8 @@ import 'dart:async'; import 'package:badges/badges.dart' as badges; import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; import 'package:flutter_swiper_view/flutter_swiper_view.dart'; +import 'package:remixicon/remixicon.dart'; import '/config.dart'; import '/pages/setting.dart'; @@ -35,7 +35,7 @@ SliverAppBar homeTopBar(BuildContext context) { ), ), InkWell( - child: Icon(FlutterRemix.more_fill, size: 24), + child: Icon(Remix.more_fill, size: 24), onTap: () { Navigator.of(context).push(MaterialPageRoute(builder: (context) => SettingPage(title: "设置"))); }, @@ -105,7 +105,7 @@ SliverAppBar publicTopBarWithInfoIcon(String title, [dynamic inkWell = const Tex child: IconButton( padding: EdgeInsets.zero, iconSize: 12, - icon: const Icon(FlutterRemix.information_line, color: Colors.white), + icon: const Icon(Remix.information_line, color: Colors.white), onPressed: onPressed, ), ) @@ -257,20 +257,20 @@ class BottomNavBarState extends State { destinations: [ NavigationDestination( icon: Icon( - FlutterRemix.home_3_line, + Remix.home_3_line, ), selectedIcon: Icon( - FlutterRemix.home_3_fill, + Remix.home_3_fill, color: readColor(), ), label: "一览", ), NavigationDestination( icon: Icon( - FlutterRemix.calendar_todo_line, + Remix.calendar_todo_line, ), selectedIcon: Icon( - FlutterRemix.calendar_todo_fill, + Remix.calendar_todo_fill, color: readColor(), ), label: "课表", @@ -284,7 +284,7 @@ class BottomNavBarState extends State { style: TextStyle(color: Colors.white), ), child: Icon( - FlutterRemix.emotion_happy_fill, + Remix.emotion_happy_fill, color: readColor(), ), ), @@ -296,7 +296,7 @@ class BottomNavBarState extends State { style: TextStyle(color: Colors.white), ), child: Icon( - FlutterRemix.emotion_happy_line, + Remix.emotion_happy_line, ), ), label: "我的", @@ -387,21 +387,21 @@ SnackBar jwSnackBar(int type, String text, [int hideSnackBarSeconds = 2, double Widget setIcon() { if (type == 0) return Icon( - FlutterRemix.error_warning_line, + Remix.error_warning_line, color: Colors.red, ); if (type == 1) return Icon( - FlutterRemix.checkbox_circle_line, + Remix.checkbox_circle_line, color: Colors.green, ); if (type == 2) return Icon( - FlutterRemix.link, + Remix.link, color: Colors.blue, ); return Icon( - FlutterRemix.star_smile_line, + Remix.star_smile_line, color: randomColors2(), ); } @@ -436,11 +436,11 @@ SnackBar jwSnackBar(int type, String text, [int hideSnackBarSeconds = 2, double SnackBar jwSnackBarAction(bool result, String text, BuildContext context, Function callback, {int hideSnackBarSeconds = 2, bool isDialogCallback = true}) { Widget resultIcon = result ? Icon( - FlutterRemix.checkbox_circle_line, + Remix.checkbox_circle_line, color: Colors.green, ) : Icon( - FlutterRemix.error_warning_line, + Remix.error_warning_line, color: Colors.red, ); return SnackBar( diff --git a/lib/widget/cards.dart b/lib/widget/cards.dart index 6674f4d..1f31ab0 100644 --- a/lib/widget/cards.dart +++ b/lib/widget/cards.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; import '../config.dart'; import '../data.dart'; @@ -170,7 +170,7 @@ Widget homeCard3 = Stack( class HomeCardsState { static double iconSize = 36; - static List icons = [FlutterRemix.restart_line, FlutterRemix.search_eye_line, FlutterRemix.file_list_3_line]; + static List icons = [Remix.restart_line, Remix.search_eye_line, Remix.file_list_3_line]; static List iconTexts = ["课表刷新", "成绩查询", "我的考试"]; static EdgeInsetsGeometry textMargin = EdgeInsets.fromLTRB(0, 44, 0, 0); static EdgeInsetsGeometry iconMargin = EdgeInsets.fromLTRB(0, 0, 0, 32); diff --git a/lib/widget/dialog.dart b/lib/widget/dialog.dart index 694668e..fe08840 100644 --- a/lib/widget/dialog.dart +++ b/lib/widget/dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; import 'package:http/http.dart'; +import 'package:remixicon/remixicon.dart'; import '/common/cookie.dart'; import '/common/login.dart'; @@ -42,7 +42,7 @@ importantUpdateDialog(BuildContext context) { ], ), InkWell( - child: Icon(FlutterRemix.close_line, size: 32), + child: Icon(Remix.close_line, size: 32), onTap: () { Navigator.of(context).pop(); }, @@ -128,7 +128,7 @@ infoDialog(BuildContext context, String text) { ], ), InkWell( - child: Icon(FlutterRemix.close_line, size: 32), + child: Icon(Remix.close_line, size: 32), onTap: () { Navigator.of(context).pop(); }, @@ -267,7 +267,7 @@ codeCheckDialog(BuildContext context, Function callback) async { controller: textFieldController, decoration: InputDecoration( icon: Icon( - FlutterRemix.magic_line, + Remix.magic_line, color: readColor(), ), border: InputBorder.none, @@ -424,7 +424,7 @@ scheduleDialog(BuildContext context, String week, String weekDay, String index) ], ), InkWell( - child: Icon(FlutterRemix.close_line, size: 32), + child: Icon(Remix.close_line, size: 32), onTap: () { Navigator.of(context).pop(); }, @@ -467,7 +467,7 @@ careerDialog(context, index, type, year) { ], ), InkWell( - child: Icon(FlutterRemix.close_line, size: 32), + child: Icon(Remix.close_line, size: 32), onTap: () { Navigator.of(context).pop(); }, diff --git a/lib/widget/icons.dart b/lib/widget/icons.dart index 61f3fe3..cc44b63 100644 --- a/lib/widget/icons.dart +++ b/lib/widget/icons.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; import '../config.dart'; import 'cards.dart'; @@ -32,20 +32,20 @@ class RefreshIconWidgetDynamicState extends State { } Icon chevronRight = Icon( - FlutterRemix.arrow_right_s_line, + Remix.arrow_right_s_line, color: Colors.black45, size: 18, ); Icon chevronDown = Icon( - FlutterRemix.arrow_down_s_line, + Remix.arrow_down_s_line, color: Colors.black45, ); Icon chevronUp = Icon( - FlutterRemix.arrow_up_s_line, + Remix.arrow_up_s_line, color: Colors.black45, ); Icon goCurrent = Icon( - FlutterRemix.map_pin_line, + Remix.map_pin_line, color: Colors.black, size: 14, ); diff --git a/lib/widget/lists.dart b/lib/widget/lists.dart index cf96ad2..028c199 100644 --- a/lib/widget/lists.dart +++ b/lib/widget/lists.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'package:flutter/material.dart'; -import 'package:flutter_remix/flutter_remix.dart'; +import 'package:remixicon/remixicon.dart'; import '/config.dart'; import '../data.dart'; @@ -190,12 +190,12 @@ class TodayCourseListItemState extends State { IconData _icon(int index) { String result = timeUntilNextClass(AppData.todaySchedule[index][4])[3]; if (result == "before") { - return FlutterRemix.timer_2_line; + return Remix.timer_2_line; } else { if (_timeText(index).contains("下课")) { - return FlutterRemix.quill_pen_line; + return Remix.quill_pen_line; } else { - return FlutterRemix.check_line; + return Remix.check_line; } } } @@ -384,7 +384,7 @@ class TomorrowCourseListState extends State { Container( margin: EdgeInsets.fromLTRB(0, 0, 8, 0), child: Icon( - // FlutterRemix.time_line, + // Remix.time_line, Icons.hourglass_top_outlined, color: (_tomorrowSchedule[index][4] == "1" && index == 0 ? Colors.orange[900] : readColor()), size: AppConfig.listLeftIconSize, @@ -564,9 +564,9 @@ class ExamListState extends State { _getIcon(int index) { if (examListC[index]) { - return FlutterRemix.check_line; + return Remix.check_line; } - return FlutterRemix.timer_line; + return Remix.timer_line; } @override @@ -743,7 +743,7 @@ class ClassroomListItem extends StatelessWidget { style: TextStyle(color: Colors.white, fontSize: 20), ), Icon( - FlutterRemix.arrow_right_s_line, + Remix.arrow_right_s_line, color: Colors.white, size: 18, ), @@ -797,7 +797,7 @@ class ClassroomListItem extends StatelessWidget { ), InkWell( child: Icon( - FlutterRemix.information_line, + Remix.information_line, color: Colors.white, size: 18, ), diff --git a/pubspec.yaml b/pubspec.yaml index d58c451..9f47639 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -36,7 +36,7 @@ dependencies: event_bus: ^2.0.1 url_launcher: ^6.0.12 badges: ^3.1.2 - flutter_remix: ^0.0.3 + remixicon: ^1.3.0 flutter_swiper_view: ^1.1.8 home_widget: ^0.7.0 workmanager: ^0.5.2