@@ -50,7 +50,7 @@ class LearningPage extends StatelessWidget {
5050 ),
5151 Column (
5252 children: [
53- ElevatedButton . icon (
53+ ElevatedButton (
5454 style: ElevatedButton .styleFrom (
5555 backgroundColor: Theme .of (context).colorScheme.secondaryContainer.withAlpha (150 ),
5656 foregroundColor: Theme .of (context).colorScheme.onSurface.withAlpha (150 ),
@@ -61,11 +61,10 @@ class LearningPage extends StatelessWidget {
6161 onPressed: () {
6262 shiftToStudy (context, 2 );
6363 },
64- icon: Icon (Icons .arrow_back, size: 24.0 ),
65- label: FittedBox (fit: BoxFit .fitWidth ,child: Text ("阿译中专项" , style: TextStyle (fontSize: 32.0 ))),
64+ child: FittedBox (fit: BoxFit .fitWidth ,child: Text ("阿译中专项" , style: TextStyle (fontSize: 32.0 ))),
6665 ),
6766 SizedBox (height: mediaQuery.size.height * 0.005 ),
68- ElevatedButton . icon (
67+ ElevatedButton (
6968 style: ElevatedButton .styleFrom (
7069 backgroundColor: Theme .of (context).colorScheme.secondaryContainer.withAlpha (150 ),
7170 foregroundColor: Theme .of (context).colorScheme.onSurface.withAlpha (150 ),
@@ -76,8 +75,7 @@ class LearningPage extends StatelessWidget {
7675 onPressed: () {
7776 shiftToStudy (context, 1 );
7877 },
79- icon: Icon (Icons .arrow_forward, size: 24.0 ),
80- label: FittedBox (fit: BoxFit .fitWidth ,child: Text ("中译阿专项" , style: TextStyle (fontSize: 32.0 ))),
78+ child: FittedBox (fit: BoxFit .fitWidth ,child: Text ("中译阿专项" , style: TextStyle (fontSize: 32.0 ))),
8179 ),
8280 ],
8381 ),
@@ -87,7 +85,7 @@ class LearningPage extends StatelessWidget {
8785 Row (
8886 mainAxisAlignment: MainAxisAlignment .spaceEvenly,
8987 children: [
90- ElevatedButton . icon (
88+ ElevatedButton (
9189 style: ElevatedButton .styleFrom (
9290 backgroundColor: Theme .of (context).colorScheme.onPrimary.withAlpha (150 ),
9391 shadowColor: Colors .transparent,
@@ -105,8 +103,15 @@ class LearningPage extends StatelessWidget {
105103 )
106104 );
107105 },
108- icon: Icon (Icons .history_edu, size: 24.0 ),
109- label: FittedBox (fit: BoxFit .fitWidth ,child: Text ("规律性学习" , style: TextStyle (fontSize: 32.0 ))),
106+ child: FittedBox (
107+ fit: BoxFit .contain,
108+ child: Column (
109+ children: [
110+ Icon (Icons .history_edu, size: 24.0 ),
111+ Text ("规律性学习" , style: TextStyle (fontSize: 32.0 )),
112+ ],
113+ )
114+ ),
110115 ),
111116 ElevatedButton (
112117 style: ElevatedButton .styleFrom (
@@ -160,7 +165,7 @@ Future<void> shiftToStudy(BuildContext context, int studyType) async {
160165 if (! context.mounted) return ;
161166 context.read <Global >().uiLogger.info ("返回完成情况: $finished " );
162167 if (finished?? false ) {
163- context.read <Global >().saveLearningProgress (words );
168+ context.read <Global >().updateLearningStreak ( );
164169 }
165170}
166171
0 commit comments