File tree Expand file tree Collapse file tree
sub_pages_builder/setting_pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222- 补全控制器销毁逻辑,避免内存泄露
2323- 修复了网页端中无法通过文件导入数据的问题
2424- 修复了单词推送不截止的问题
25+ - 修复了二次点击选项时真误颜色消失的问题
2526
2627## v1.0.0 - 2026-3-18 - (100000)
2728
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ gradle-wrapper.jar
77GeneratedPluginRegistrant.java
88.cxx /
99build /
10+ .kotlin /
1011
1112# Remember to never publicly share your keystore.
1213# See https://flutter.dev/to/reference-keystore
Original file line number Diff line number Diff line change 11org.gradle.jvmargs =-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22android.useAndroidX =true
33android.enableJetifier =true
4+ # This builtInKotlin flag was added automatically by Flutter migrator
5+ android.builtInKotlin =false
6+ # This newDsl flag was added automatically by Flutter migrator
7+ android.newDsl =false
Original file line number Diff line number Diff line change @@ -429,6 +429,8 @@ class ChooseButtonBox extends StatefulWidget {
429429}
430430class _ChooseButtonBoxState extends State <ChooseButtonBox > {
431431 Color ? color;
432+ bool isChoosed = false ;
433+
432434 @override
433435 Widget build (BuildContext context) {
434436 color ?? = widget.cl ?? Theme .of (context).colorScheme.primaryContainer.withAlpha (150 );
@@ -443,6 +445,8 @@ class _ChooseButtonBoxState extends State<ChooseButtonBox> {
443445 child: ElevatedButton (
444446 onPressed: () {
445447 setState (() {
448+ if (isChoosed) return ;
449+ isChoosed = true ;
446450 bool ? ans = widget.chose (widget.index);
447451 if (ans != null ) {
448452 if (widget.isAnimated) {
@@ -464,7 +468,7 @@ class _ChooseButtonBoxState extends State<ChooseButtonBox> {
464468 }
465469 }
466470 } else {
467- color = Theme .of (context).colorScheme.onPrimary .withAlpha (150 );
471+ color = Theme .of (context).colorScheme.primaryContainer .withAlpha (150 );
468472 }
469473 });
470474 },
Original file line number Diff line number Diff line change @@ -215,15 +215,14 @@ class _SettingPage extends State<SettingPage> {
215215 ),
216216 onPressed: () async {
217217 context.read <Global >().uiLogger.info ("选择手动导入单词" );
218- FilePickerResult ? result =
219- await FilePicker .pickFiles (
220- allowMultiple: false ,
218+ PlatformFile ? result =
219+ await FilePicker .pickFile (
221220 type: FileType .custom,
222221 allowedExtensions: ['json' ],
223222 );
224223 if (result != null ) {
225224 String jsonString;
226- PlatformFile platformFile = result.files.first ;
225+ PlatformFile platformFile = result;
227226 try {
228227 jsonString = await platformFile.xFile
229228 .readAsString ();
Original file line number Diff line number Diff line change @@ -240,16 +240,15 @@ class _DataSyncPage extends State<DataSyncPage> {
240240 ElevatedButton (
241241 onPressed: () async {
242242 context.read <Global >().uiLogger.info ("导入软件数据" );
243- FilePickerResult ? result = await FilePicker .pickFiles (
244- allowMultiple: false ,
243+ PlatformFile ? result = await FilePicker .pickFile (
245244 type: FileType .custom,
246245 allowedExtensions: ['json' ],
247246 );
248247 if (result != null ) {
249248 String jsonString;
250- PlatformFile platformFile = result.files.first ;
251- if (platformFile.bytes != null ){
252- jsonString = utf8.decode (platformFile.bytes ! );
249+ PlatformFile platformFile = result;
250+ if (( await platformFile.readAsBytes ()).isNotEmpty ){
251+ jsonString = utf8.decode (await platformFile.readAsBytes () );
253252 } else if (platformFile.path != null && ! kIsWeb) {
254253 jsonString = await io.File (platformFile.path! ).readAsString ();
255254 } else {
You can’t perform that action at this time.
0 commit comments