flutter_diff_viewer 1.2.0 copy "flutter_diff_viewer: ^1.2.0" to clipboard
flutter_diff_viewer: ^1.2.0 copied to clipboard

A production-grade Flutter package providing GitHub/GitLab-style content comparison and diff viewing. Supports side-by-side, unified, and stacked layouts with line, word, and character-level diff granularity.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.2.0 - 2026-08-24 #

Added #

  • Configurable Diff Change Blocks (splitBlocks, blockSpacing): Group diff change hunks into distinct block cards with configurable vertical spacing between blocks.
  • Configurable Block Card Styling: Added blockBorderRadius, blockBorderWidth, blockPadding in DiffSpacing, plus leftBlockBackgroundColor, rightBlockBackgroundColor, leftBlockBorderColor, rightBlockBorderColor in FlutterDiffViewerTheme.
  • Distinct Left & Right Container Background Colors: Added leftPanelBackgroundColor, rightPanelBackgroundColor, leftPanelBorderColor, rightPanelBorderColor in FlutterDiffViewerTheme to style Current and Modified containers independently.
  • Per-Container Diff Highlights: Added side-aware diff highlight properties (leftAddedBackgroundColor, rightAddedBackgroundColor, leftRemovedBackgroundColor, rightRemovedBackgroundColor, leftModifiedBackgroundColor, rightModifiedBackgroundColor, etc.) and side-aware color resolvers.

1.1.0 - 2026-08-20 #

Added #

  • Split Dual-Card Panel Mode (splitPanels): Render original and modified diff views as two distinct separate card containers.
  • Customizable In-Between Box Gap (panelSpacing): Responsive spacing gap in pixels between the left/original and right/modified panel cards.
  • Customizable Card Box Borders & Radius: Added panelBorderRadius and panelBorderWidth in DiffSpacing, plus panelBackgroundColor and panelBorderColor in FlutterDiffViewerTheme.
  • Card-Embedded Version Headers: In split panel mode, version titles ("Current V1.1", "Modified V1.2") render cleanly inside each card header bar.

1.0.0 - 2026-08-17 #

Added #

  • Initial release of flutter_diff_viewer
  • GitHub/GitLab-style side-by-side diff view
  • Unified diff view (single-column with +/- indicators)
  • Stacked diff view (optimized for narrow/mobile screens)
  • Line-level diff calculation using Myers LCS algorithm
  • Word-level inline diff highlighting
  • Character-level inline diff highlighting
  • Staged diff processing (line → word → character, changed lines only)
  • FlutterDiffViewer main widget with simple and advanced API
  • FlutterDiffViewerController for programmatic navigation
  • FlutterDiffViewerConfiguration — fully immutable configuration object
  • FlutterDiffViewerTheme with light() and dark() factory constructors
  • DiffTypography — full text style customization
  • DiffSpacing — layout spacing customization
  • DiffLocalizations — localization/i18n support
  • Custom builder callbacks: headerBuilder, lineBuilder, lineNumberBuilder, indicatorBuilder, segmentBuilder, summaryBuilder, emptyStateBuilder, errorBuilder, loadingBuilder, collapsedSectionBuilder, footerBuilder
  • DiffEngine abstract interface for pluggable diff algorithms
  • Replaceable diff engine via FlutterDiffViewer(diffEngine: myEngine)
  • Synchronized scrolling for side-by-side view
  • Collapsible unchanged sections with configurable contextLines
  • Change navigation: next/previous/go-to change
  • Line numbers, indicators (+/-/space), headers, summary widget
  • Responsive layout via LayoutBuilder
  • Accessibility: semantic labels, screen reader support, color-independent indicators
  • Async diff processing with compute() for large documents (>1000 lines)
  • ListView.builder rendering — handles 50,000+ line documents efficiently
  • Proper lifecycle management — no controller or scroll leaks
  • Full null safety (Dart 3.x)
  • Comprehensive unit, widget, and integration tests
  • Full API documentation
  • Professional example application with 10+ screens
3
likes
0
points
322
downloads

Publisher

unverified uploader

Weekly Downloads

A production-grade Flutter package providing GitHub/GitLab-style content comparison and diff viewing. Supports side-by-side, unified, and stacked layouts with line, word, and character-level diff granularity.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_diff_viewer