From 0f85dec02b54fbfee331a8df39379c7c3ddd0ddc Mon Sep 17 00:00:00 2001 From: hejl Date: Wed, 14 May 2025 16:49:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E9=99=A4=E6=97=A0=E7=94=A8=E5=BC=95?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- win_text_editor/lib/app/components/file_explorer.dart | 3 --- win_text_editor/lib/app/providers/editor_provider.dart | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/win_text_editor/lib/app/components/file_explorer.dart b/win_text_editor/lib/app/components/file_explorer.dart index 98efde6..59fe406 100644 --- a/win_text_editor/lib/app/components/file_explorer.dart +++ b/win_text_editor/lib/app/components/file_explorer.dart @@ -1,9 +1,6 @@ -import 'dart:io'; - import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; -import 'package:win_text_editor/app/providers/logger.dart'; import '../models/file_node.dart'; import '../providers/file_provider.dart'; diff --git a/win_text_editor/lib/app/providers/editor_provider.dart b/win_text_editor/lib/app/providers/editor_provider.dart index 7d84b06..014855e 100644 --- a/win_text_editor/lib/app/providers/editor_provider.dart +++ b/win_text_editor/lib/app/providers/editor_provider.dart @@ -104,7 +104,7 @@ class EditorProvider with ChangeNotifier { if (!_tabLoadingStates[tabId]!) break; // 检查是否取消 final chunkLines = lines.sublist(i, min(i + linesPerChunk, lines.length)); - _tabs[index].chunks!.addAll(chunkLines); + _tabs[index].chunks.addAll(chunkLines); notifyListeners(); await Future.delayed(Duration.zero); // 让UI更新