GitDiffViewer constructor

GitDiffViewer({
  1. required String diff,
  2. int? width,
  3. int? height,
  4. bool showLineNumbers = true,
  5. bool wrapLines = true,
  6. bool zeroPadLineNumbers = false,
  7. DiffViewMode? viewMode,
  8. DiffStyles? styles,
  9. GitDiffController? controller,
  10. ScrollController? scrollController,
  11. bool handleKeys = true,
  12. bool scrollable = true,
  13. bool fitContentHeight = false,
  14. List<DiffCommentLineHighlight> commentHighlights = const <DiffCommentLineHighlight>[],
  15. List<DiffCommentBlock> commentBlocks = const [],
  16. Cmd? onCommentAnchorSelected(
    1. DiffCommentAnchor anchor
    )?,
  17. Key? key,
})

Creates a git diff viewer widget.

Implementation

GitDiffViewer({
  required this.diff,
  this.width,
  this.height,
  this.showLineNumbers = true,
  this.wrapLines = true,
  this.zeroPadLineNumbers = false,
  this.viewMode,
  this.styles,
  this.controller,
  this.scrollController,
  this.handleKeys = true,
  this.scrollable = true,
  this.fitContentHeight = false,
  this.commentHighlights = const <DiffCommentLineHighlight>[],
  this.commentBlocks = const [],
  this.onCommentAnchorSelected,
  super.key,
});