From e5153a3e4ba2e0162ac833d09b55f7d079e6748d Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Sun, 1 Mar 2026 19:27:52 +0800 Subject: [PATCH 1/5] fix: route to setting page error on daily word widget Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- CHANGELOG.md | 1 + lib/pages/home_page.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dc7204..984835c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Fix - 修复了自我评级开启时复习页面可能溢出的问题 +- 修复了无数据时,从每日单词进入设置发生错误的问题 ## v0.1.13 - 2026-2-6 - (000113) diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart index 356dbdd..2c2c5bf 100644 --- a/lib/pages/home_page.dart +++ b/lib/pages/home_page.dart @@ -181,7 +181,7 @@ class _DailyWord extends State { playing = false; } else { context.read().uiLogger.info("跳转: DailyWord => SettingPage"); - Navigator.of(context).push(MaterialPageRoute(builder: (context) => SettingPage())); + Navigator.of(context).push(MaterialPageRoute(builder: (context) => Scaffold(appBar: AppBar(title: Text("设置")) , body: SettingPage()))); } }, style: ElevatedButton.styleFrom( From 4d15943b7644af52a894cbc4b161d94edf5e80ee Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Sun, 1 Mar 2026 19:33:11 +0800 Subject: [PATCH 2/5] docs(CHANGELOG): update ChangeLog for pull #67 Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 984835c..b99cc61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,20 @@ ### Added - 添加了联机功能 +- 添加了停用FSRS(复习)的选项 [#67](https://github.com/OctagonalStar/arabic_learning/pull/67) ### Improvement - 优化了单词卡片的排版 - 添加了联机功能对Web的支持 +- 优化了单词导入时的去重逻辑 [#67](https://github.com/OctagonalStar/arabic_learning/pull/67) ### Fix - 修复了自我评级开启时复习页面可能溢出的问题 - 修复了无数据时,从每日单词进入设置发生错误的问题 +- 修复了规律学习重复推送同一个单词的问题 [#67](https://github.com/OctagonalStar/arabic_learning/pull/67) +- 修复了新安装无复习任务时 FSRS 设置菜单丢失的问题 [#67](https://github.com/OctagonalStar/arabic_learning/pull/67) ## v0.1.13 - 2026-2-6 - (000113) From 219c33bd7c6b548841cb3f91dff3040ff97b704c Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Sun, 1 Mar 2026 19:38:36 +0800 Subject: [PATCH 3/5] perf: improve review page enter logic Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- CHANGELOG.md | 1 + lib/sub_pages_builder/learning_pages/fsrs_pages.dart | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b99cc61..6eb648e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - 优化了单词卡片的排版 - 添加了联机功能对Web的支持 - 优化了单词导入时的去重逻辑 [#67](https://github.com/OctagonalStar/arabic_learning/pull/67) +- 优化复习页面逻辑 ### Fix diff --git a/lib/sub_pages_builder/learning_pages/fsrs_pages.dart b/lib/sub_pages_builder/learning_pages/fsrs_pages.dart index 257153b..4bee467 100644 --- a/lib/sub_pages_builder/learning_pages/fsrs_pages.dart +++ b/lib/sub_pages_builder/learning_pages/fsrs_pages.dart @@ -312,6 +312,12 @@ class MainFSRSPage extends StatelessWidget { scrollDirection: Axis.vertical, controller: controller, itemBuilder: (context, index) { + final wordID = fsrs.getLeastDueCard(); + if(wordID == -1) { + return Center( + child: TextContainer(text: "当前无需要复习的内容\n点击右上角可修改配置"), + ); + } if(index == 0) { return Center( child: Column( @@ -322,12 +328,6 @@ class MainFSRSPage extends StatelessWidget { ), ); } - final wordID = fsrs.getLeastDueCard(); - if(wordID == -1) { - return Center( - child: TextContainer(text: "今日复习任务已完成\n(或当前无复习内容)\n点击右上角齿轮可修改配置"), - ); - } return FSRSReviewCardPage(wordID: wordID, fsrs: fsrs, rnd: sharedRnd, controller: controller,); } ) From b204c2b910a990f24c90192c2c6e3b31e28e344e Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Sun, 1 Mar 2026 19:55:03 +0800 Subject: [PATCH 4/5] perf: improve animate Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- CHANGELOG.md | 1 + lib/funcs/local_pk_server.dart | 12 +++++----- lib/funcs/ui.dart | 12 +++++----- lib/main.dart | 5 ++--- .../learning_pages/fsrs_pages.dart | 14 ++++++------ .../learning_pages/learning_pages_build.dart | 22 +++++++++---------- .../setting_pages/debug_page.dart | 2 +- .../setting_pages/questions_setting_page.dart | 2 +- .../test_pages/local_pk_page.dart | 10 ++++----- 9 files changed, 40 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eb648e..b005d7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - 添加了联机功能对Web的支持 - 优化了单词导入时的去重逻辑 [#67](https://github.com/OctagonalStar/arabic_learning/pull/67) - 优化复习页面逻辑 +- 优化动画流畅性 ### Fix diff --git a/lib/funcs/local_pk_server.dart b/lib/funcs/local_pk_server.dart index 13d321f..1eafea0 100644 --- a/lib/funcs/local_pk_server.dart +++ b/lib/funcs/local_pk_server.dart @@ -6,7 +6,7 @@ import 'package:archive/archive.dart'; import 'package:arabic_learning/funcs/utili.dart'; import 'package:arabic_learning/vars/config_structure.dart'; import 'package:arabic_learning/vars/global.dart'; -import 'package:flutter/material.dart' show BuildContext, PageController; +import 'package:flutter/material.dart' show BuildContext, PageController, Durations; import 'package:logging/logging.dart'; import 'package:arabic_learning/vars/statics_var.dart'; import 'package:flutter/foundation.dart' show ChangeNotifier; @@ -222,7 +222,7 @@ class PKServer with ChangeNotifier{ void _questStartTime(){ startTime = DateTime.now().add(Duration(seconds: 5)); - Future.delayed(Duration(seconds: 5), () => pageController!.nextPage(duration: Duration(milliseconds: 5), curve: StaticsVar.curve)); + Future.delayed(Duration(seconds: 5), () => pageController!.nextPage(duration: Durations.medium2, curve: StaticsVar.curve)); _channel!.send(RTCDataChannelMessage(json.encode({ "step": 4, "startTime": startTime?.add(delay!).toIso8601String() @@ -302,7 +302,7 @@ class PKServer with ChangeNotifier{ if(sumList.contains(source.getHash(global.wordData.words))) selectableSource.add(source); logger.fine("[$packageid] 计算得到${source.sourceJsonFileName}在哈希中有匹配"); } - pageController!.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + pageController!.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); } else { logger.warning("[$packageid] 双端没有任意词库匹配"); exitMessage = "双端没有任意词库匹配"; @@ -328,7 +328,7 @@ class PKServer with ChangeNotifier{ "dictSum": List.generate(selectableSource.length, (int index) => selectableSource[index].getHash(global.wordData.words)), "time": DateTime.now().toIso8601String() }))); - pageController!.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + pageController!.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); } else { _channel!.send(RTCDataChannelMessage(json.encode({ "step": 1, @@ -352,7 +352,7 @@ class PKServer with ChangeNotifier{ } } classSelection = ClassSelection(selectedClass: selectedClass, countInReview: false); - pageController!.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + pageController!.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); break; } /// 接受对方完成准备 from both @@ -366,7 +366,7 @@ class PKServer with ChangeNotifier{ case 4: { startTime = DateTime.parse(data["startTime"]); Future.delayed(-DateTime.now().difference(startTime!), - ()=>pageController!.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve)); + ()=>pageController!.nextPage(duration: Durations.medium2, curve: StaticsVar.curve)); notifyListeners(); break; } diff --git a/lib/funcs/ui.dart b/lib/funcs/ui.dart index 88c02b2..3f28474 100644 --- a/lib/funcs/ui.dart +++ b/lib/funcs/ui.dart @@ -174,7 +174,7 @@ List classesSelectionList(BuildContext context, Function (ClassItem) onC /// alart(context, "你点击了按钮",onConfirmed: (){i++}, delayConfirm: Duration(seconds: 1)); /// } /// ``` -void alart(BuildContext context, String e, {Function? onConfirmed, Duration delayConfirm = const Duration(milliseconds: 0)}) { +void alart(BuildContext context, String e, {Function? onConfirmed, Duration delayConfirm = const Duration()}) { context.read().uiLogger.info("构建弹出窗口: 携带信息: $e ;确认参数: ${onConfirmed != null}; 延迟: ${delayConfirm.inMilliseconds}"); showDialog( context: context, @@ -291,7 +291,7 @@ class TextContainer extends StatelessWidget { child: (animated) ? TweenAnimationBuilder( tween: Tween(begin: 0.0, end: text.length.toDouble()), - duration: Duration(milliseconds: 700), + duration: Durations.long4, curve: StaticsVar.curve, builder: (context, value, child) { if(value == text.length.toDouble()) return child!; @@ -430,7 +430,7 @@ class _ChooseButtonBoxState extends State { color ??= widget.cl ?? Theme.of(context).colorScheme.primaryContainer.withAlpha(150); return AnimatedContainer( margin: EdgeInsets.all(8.0), - duration: Duration(milliseconds: widget.isAnimated ? 500 : 0), + duration: widget.isAnimated ? Durations.medium4 : Duration(), curve: StaticsVar.curve, decoration: BoxDecoration( color: color, @@ -442,7 +442,7 @@ class _ChooseButtonBoxState extends State { bool? ans = widget.chose(widget.index); if(ans != null) { color = Colors.amber; - Future.delayed(Duration(milliseconds: widget.isAnimated ? 500 : 0), (){ + Future.delayed(widget.isAnimated ? Durations.medium4 : Duration(), (){ setState(() { if(ans) { color = Colors.greenAccent; @@ -573,7 +573,7 @@ class WordCard extends StatelessWidget { begin: 1.0, end: hide ? 1.0 : 0.0 ), - duration: Duration(milliseconds: 500), + duration: Durations.medium2, curve: StaticsVar.curve, builder: (context, value, child) { return ClipRRect( @@ -949,7 +949,7 @@ class _SpellQuestion extends State { begin: Theme.of(context).colorScheme.onPrimaryFixed, end: isChecked ? cl.withAlpha(180) : Theme.of(context).colorScheme.onPrimaryFixed ), - duration: Duration(milliseconds: 500), + duration: Durations.medium2, curve: StaticsVar.curve, builder: (context, value, child) { return TextField( diff --git a/lib/main.dart b/lib/main.dart index a90d600..1517a82 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -116,7 +116,6 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { late List _pageList; final PageController _pageController = PageController(initialPage: 0); - static const Duration _duration = Duration(milliseconds: 500); bool disPlayedFirst = false; // 判断是否为桌面端的阈值(可根据需要调整) @@ -201,7 +200,7 @@ class _MyHomePageState extends State { _onNavigationTapped(index); }, height: MediaQuery.of(context).size.height * 0.1, - animationDuration: Duration(milliseconds: 500), + animationDuration: Durations.medium2, labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected, backgroundColor: Theme.of(context).colorScheme.onPrimary.withAlpha(150), destinations: const [ @@ -235,7 +234,7 @@ class _MyHomePageState extends State { void _onNavigationTapped(int index) { _pageController.animateToPage( index, - duration: _duration, + duration: Durations.medium2, curve: StaticsVar.curve, ); } diff --git a/lib/sub_pages_builder/learning_pages/fsrs_pages.dart b/lib/sub_pages_builder/learning_pages/fsrs_pages.dart index 4bee467..f95b0e0 100644 --- a/lib/sub_pages_builder/learning_pages/fsrs_pages.dart +++ b/lib/sub_pages_builder/learning_pages/fsrs_pages.dart @@ -405,7 +405,7 @@ class _FSRSReviewCardPage extends State { begin: 0.0, end: choosed ? 1.0 : 0.0 ), - duration: Duration(milliseconds: 500), + duration: Durations.medium2, curve: StaticsVar.curve, builder: (context, value, child) { return Row( @@ -432,7 +432,7 @@ class _FSRSReviewCardPage extends State { shape: RoundedRectangleBorder(borderRadius: StaticsVar.br) ), onPressed: () { - widget.controller.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + widget.controller.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); }, icon: Icon(Icons.arrow_downward), label: FittedBox(fit: BoxFit.contain, child: Text("下一题")), @@ -510,9 +510,9 @@ class _FSRSLearningPageState extends State { label: Text(index == widget.words.length-1 ? "开始答题" : "下一个"), onPressed: (){ if(index == widget.words.length-1) { - controllerHor.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controllerHor.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); } else { - controllerLearning.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controllerLearning.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); } }, ), @@ -557,7 +557,7 @@ class _FSRSLearningPageState extends State { begin: 0.0, end: corrected ? 1.0 : 0.0 ), - duration: Duration(milliseconds: 500), + duration: Durations.medium2, curve: StaticsVar.curve, builder: (context, value, child) { return Row( @@ -582,9 +582,9 @@ class _FSRSLearningPageState extends State { ), onPressed: () { if(index == widget.words.length-1) { - controllerHor.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controllerHor.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); } - controllerQuestions.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controllerQuestions.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); }, icon: Icon(index == widget.words.length-1 ? Icons.done_all : Icons.arrow_downward), label: FittedBox(child: Text(index == widget.words.length-1 ? "完成学习" : "下一题")), diff --git a/lib/sub_pages_builder/learning_pages/learning_pages_build.dart b/lib/sub_pages_builder/learning_pages/learning_pages_build.dart index 104f7ad..ca7f09e 100644 --- a/lib/sub_pages_builder/learning_pages/learning_pages_build.dart +++ b/lib/sub_pages_builder/learning_pages/learning_pages_build.dart @@ -146,7 +146,7 @@ class _InLearningPageState extends State { begin: 0.00, end: ((controller.hasClients ? controller.page?.ceil() : 0) ?? 0) / (testList.length - 1), ), - duration: const Duration(milliseconds: 500), + duration: Durations.extralong4, curve: StaticsVar.curve, builder: (context, value, child) { return LinearProgressIndicator( @@ -198,7 +198,7 @@ class _InLearningPageState extends State { shape: RoundedRectangleBorder(borderRadius: StaticsVar.br) ), onPressed: (){ - controller.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controller.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); correctCount++; setState(() {}); }, @@ -229,7 +229,7 @@ class _InLearningPageState extends State { isShowNext: clicked, isLast: controller.page?.ceil() == testList.length - 1, onNextClicked: (){ - controller.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controller.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); setState(() { clicked = false; }); @@ -261,7 +261,7 @@ class _InLearningPageState extends State { isShowNext: clicked, isLast: controller.page?.ceil() == testList.length - 1, onNextClicked: (){ - controller.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controller.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); setState(() { clicked = false; }); @@ -300,7 +300,7 @@ class _InLearningPageState extends State { isShowNext: clicked, isLast: controller.page?.ceil() == testList.length - 1, onNextClicked: (){ - controller.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controller.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); setState(() { clicked = false; }); @@ -337,7 +337,7 @@ class BottomTip extends StatelessWidget { begin: 0.0, end: isShowNext ? 1.0 : 0.0, ), - duration: const Duration(milliseconds: 500), + duration: Durations.medium2, curve: StaticsVar.curve, builder: (context, value, child) { return Row( @@ -636,7 +636,7 @@ class _WordCardOverViewPage extends State { preferredSize: Size(mediaQuery.size.width, 75), child: TweenAnimationBuilder( tween: Tween(begin: 0.0, end: inSearch ? 1.0 : 0.0), - duration: Duration(milliseconds: 300), + duration: Durations.short4, curve: StaticsVar.curve, builder: (context, value, child){ return Center( @@ -809,7 +809,7 @@ class _WordCardOverViewLayout extends State { }); jsonController.animateTo( (66 * jsonIndex).toDouble(), - duration: Duration(milliseconds: 200), + duration: Durations.medium1, curve: StaticsVar.curve ); }, @@ -835,18 +835,18 @@ class _WordCardOverViewLayout extends State { if(value) { classController.animateTo( (64 * classIndex).toDouble(), - duration: Duration(milliseconds: 200), + duration: Durations.medium1, curve: StaticsVar.curve ); jsonController.animateTo( (66 * (jsonIndex + 1)).toDouble(), - duration: Duration(milliseconds: 200), + duration: Durations.medium1, curve: StaticsVar.curve ); } else { jsonController.animateTo( (66 * jsonIndex).toDouble(), - duration: Duration(milliseconds: 200), + duration: Durations.medium1, curve: StaticsVar.curve ); } diff --git a/lib/sub_pages_builder/setting_pages/debug_page.dart b/lib/sub_pages_builder/setting_pages/debug_page.dart index bfa8c1e..b7634d6 100644 --- a/lib/sub_pages_builder/setting_pages/debug_page.dart +++ b/lib/sub_pages_builder/setting_pages/debug_page.dart @@ -25,7 +25,7 @@ class _DebugPage extends State { floatingActionButton: FloatingActionButton( child: Icon(Icons.arrow_upward), onPressed: (){ - controller.animateTo(0, duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + controller.animateTo(0, duration: Durations.medium2, curve: StaticsVar.curve); } ), body: ListView( diff --git a/lib/sub_pages_builder/setting_pages/questions_setting_page.dart b/lib/sub_pages_builder/setting_pages/questions_setting_page.dart index f8954e2..f6643a6 100644 --- a/lib/sub_pages_builder/setting_pages/questions_setting_page.dart +++ b/lib/sub_pages_builder/setting_pages/questions_setting_page.dart @@ -183,7 +183,7 @@ class _QuestionsSettingPage extends State { begin: 0.0, end: floatButtonFlod ? 0.0 : 1.0 ), - duration: Duration(milliseconds: 500), + duration: Durations.medium2, curve: Curves.bounceOut, builder: (context, value, child) { return Container( diff --git a/lib/sub_pages_builder/test_pages/local_pk_page.dart b/lib/sub_pages_builder/test_pages/local_pk_page.dart index cd9f05b..b1e6663 100644 --- a/lib/sub_pages_builder/test_pages/local_pk_page.dart +++ b/lib/sub_pages_builder/test_pages/local_pk_page.dart @@ -355,7 +355,7 @@ class PKClassSelectionPage extends StatelessWidget { ClassSelection selection = await popSelectClasses(context, forceSelectRange: context.read().selectableSource, withCache: false, withReviewChoose: false); if(!context.mounted || selection.selectedClass.isEmpty) return; context.read().setSelectedClass(selection); - context.read().pageController!.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + context.read().pageController!.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); }, child: Text("开始选课") ) @@ -575,7 +575,7 @@ class _PKOngoingPage extends State { allowAudio: true, allowAnitmation: false, onSelected: (int choosed) { - pageController.nextPage(duration: Duration(milliseconds: 500), curve: StaticsVar.curve); + pageController.nextPage(duration: Durations.medium2, curve: StaticsVar.curve); if(choiceOptions[index][choosed] == context.read().pkState.testWords[index].chinese) { context.read().updateState(true); return true; @@ -660,7 +660,7 @@ class PKConclue extends StatelessWidget { end: 1 ), curve: StaticsVar.curve, - duration: Duration(milliseconds: 500), + duration: Durations.medium2, builder: (context, value, child) { return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -760,7 +760,7 @@ class TopScoreBar extends StatelessWidget { begin: 0.0, end: context.watch().pkState.selfProgress.length/context.watch().pkState.testWords.length ), - duration: Duration(milliseconds: 500), + duration: Durations.medium2, builder: (context, value, child) { return LinearProgressIndicator( value: value, @@ -783,7 +783,7 @@ class TopScoreBar extends StatelessWidget { begin: 0.0, end: context.watch().pkState.sideProgress.length/context.watch().pkState.testWords.length ), - duration: Duration(milliseconds: 500), + duration: Durations.medium2, builder: (context, value, child) { return LinearProgressIndicator( value: value, From 49ba86c65030c0b641008c610dd1a3ad6e113495 Mon Sep 17 00:00:00 2001 From: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> Date: Sun, 1 Mar 2026 20:08:14 +0800 Subject: [PATCH 5/5] fix: wordCard overflow Signed-off-by: OctagonalStar <76486554+OctagonalStar@users.noreply.github.com> --- CHANGELOG.md | 1 + lib/funcs/ui.dart | 8 ++++---- .../setting_pages/questions_setting_page.dart | 5 +++-- lib/vars/statics_var.dart | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b005d7c..bcc89e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - 修复了无数据时,从每日单词进入设置发生错误的问题 - 修复了规律学习重复推送同一个单词的问题 [#67](https://github.com/OctagonalStar/arabic_learning/pull/67) - 修复了新安装无复习任务时 FSRS 设置菜单丢失的问题 [#67](https://github.com/OctagonalStar/arabic_learning/pull/67) +- 修复了单词卡片可能溢出的问题 ## v0.1.13 - 2026-2-6 - (000113) diff --git a/lib/funcs/ui.dart b/lib/funcs/ui.dart index 3f28474..418fa84 100644 --- a/lib/funcs/ui.dart +++ b/lib/funcs/ui.dart @@ -560,7 +560,7 @@ class WordCard extends StatelessWidget { ), child: FittedBox(fit: BoxFit.scaleDown, child: Text("归属课程", style: TextStyle(fontSize: 16))), ), - Expanded(child: Text(word.className, style: TextStyle(fontSize: 18), textAlign: TextAlign.center)) + Expanded(child: FittedBox(fit: BoxFit.scaleDown, child: Text(word.className, style: TextStyle(fontSize: 18), textAlign: TextAlign.center))) ], ) ], @@ -573,13 +573,13 @@ class WordCard extends StatelessWidget { begin: 1.0, end: hide ? 1.0 : 0.0 ), - duration: Durations.medium2, + duration: Durations.extralong2, curve: StaticsVar.curve, builder: (context, value, child) { return ClipRRect( borderRadius: BorderRadiusGeometry.vertical(bottom: Radius.circular(25.0)), child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 10.0 * value,sigmaY: 10.0 * value), + filter: ImageFilter.blur(sigmaX: 15.0 * value,sigmaY: 15.0 * value), enabled: true, child: value == 0.0 ? null : ElevatedButton( style: ElevatedButton.styleFrom( @@ -862,7 +862,7 @@ class _ChoiceQuestions extends State { ), SizedBox(height: mediaQuery.size.height *0.01), if(widget.bottomWidget != null) widget.bottomWidget!, - SizedBox(height: mediaQuery.size.height *0.05), + SizedBox(height: mediaQuery.size.height *0.03), ], ), ), diff --git a/lib/sub_pages_builder/setting_pages/questions_setting_page.dart b/lib/sub_pages_builder/setting_pages/questions_setting_page.dart index f6643a6..43886fb 100644 --- a/lib/sub_pages_builder/setting_pages/questions_setting_page.dart +++ b/lib/sub_pages_builder/setting_pages/questions_setting_page.dart @@ -1,6 +1,7 @@ import 'package:arabic_learning/funcs/ui.dart'; import 'package:arabic_learning/vars/config_structure.dart'; import 'package:arabic_learning/vars/global.dart'; +import 'package:arabic_learning/vars/statics_var.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -183,8 +184,8 @@ class _QuestionsSettingPage extends State { begin: 0.0, end: floatButtonFlod ? 0.0 : 1.0 ), - duration: Durations.medium2, - curve: Curves.bounceOut, + duration: Durations.long2, + curve: StaticsVar.curve, builder: (context, value, child) { return Container( decoration: BoxDecoration( diff --git a/lib/vars/statics_var.dart b/lib/vars/statics_var.dart index cfca7d0..4b02be1 100644 --- a/lib/vars/statics_var.dart +++ b/lib/vars/statics_var.dart @@ -10,7 +10,7 @@ class StaticsVar { static const int appVersion = 000113; static const String modelPath = 'arabicLearning/tts/model/vits-piper-ar_JO-kareem-medium'; static const Map tempConfig = {"SelectedClasses": []}; - static const Curve curve = Curves.easeInOut; + static const Curve curve = Curves.fastEaseInToSlowEaseOut; static const String onlineDictOwner = 'JYinherit'; static const String arBackupFont = "Vazirmatn"; static const String zhBackupFont = "NotoSansSC";