Skip to content
pubscout

docx_viewer

1.0.1, released a year ago by bhandari-santosh.com.np

Displays DOCX files across Flutter platforms

WASM-ready
$ flutter pub add docx_viewer
Source repository

What it does

The package provides a widget that extracts and renders the text content of DOCX files. It supports network URLs, local file paths, and raw bytes, with error handling callbacks.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Need to display DOCX documents in a Flutter app
  • Want a single widget that works on mobile, desktop, and web
  • Need to load documents from a URL or a file picker

Skip it when

  • You only need to display PDFs or other document types
  • You require rich formatting or styling beyond plain text

Strengths

  • Cross‑platform support (Android, iOS, Web, Windows, macOS, Linux)
  • Simple API: just provide filePath or bytes
  • Web‑friendly: works with file picker and bytes

Weaknesses

  • Only extracts plain text, no formatting or images
  • Requires file_picker for local files on web
  • No support for editing or advanced document features

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Add `docx_viewer` to pubspec.yaml. For web local files, add `file_picker` dependency and use bytes. No special permissions needed.

```dart
import 'package:docx_viewer/docx_viewer.dart';

DocxView(
  filePath: 'https://example.com/doc.docx',
  fontSize: 18,
  onError: (e) => print('Error: $e'),
);
```

Alternatives

Packages that do the same job and could replace docx_viewer.

Works with

Packages commonly used together with docx_viewer: ones it builds on, ones built on it, and its own family.