File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,12 +194,15 @@ class _DocxViewState extends State<DocxView> {
194194
195195 /// Handles errors by calling the [onError] callback if provided, or displaying the error message.
196196 void _handleError (Exception error) {
197+ setState (() {
198+ isLoading = false ;
199+ });
200+
197201 if (widget.onError != null ) {
198202 widget.onError !(error);
199203 } else {
200204 setState (() {
201205 fileContent = error.toString ();
202- isLoading = false ;
203206 });
204207 }
205208 }
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ String extractTextFromDocxBytes(Uint8List bytes) {
4343 paragraph.findAllElements ('w:t' ).map ((node) => node.innerText).join ();
4444
4545 // Check for numbering information in the paragraph
46- final numIdNode = paragraph.findElements ('w:numId' ).firstOrNull;
46+ final numIdNode = paragraph.findAllElements ('w:numId' ).firstOrNull;
4747 final numId = numIdNode? .getAttribute ('w:val' );
4848
4949 // Manage numbering: increment or reset based on numId changes
You can’t perform that action at this time.
0 commit comments