A flutter project that compares two collections and produces a list of deltas between then. This is useful when working with flutter's AnimatedList widgets, or any other time you want to respond to list changes without having to rebuild your entire view.
By default, the diffs run synchronously, which hurts performance if you run them in the main thread.
See the [collection_diff_isolate] package for running the diff operations in the background.
[1.0.3] - Improving tests #
[1.0.2] - Updated badge #
[1.0.0] - Changed API surface - refactored DiffEquality #
[0.4.4] - Initial release #
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: collection_diff: ^1.0.3
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.8.4
- pana: 0.13.14
- Flutter: 1.17.5
Package not compatible with SDK dart
collection_diffthat is a package requiring null.
Maintenance issues and suggestions
dartdoc successfully runs on your package's source files. (-10 points)
exitCode: 255 stdout: Documenting collection_diff... Initialized dartdoc with 95 libraries in 35.0 seconds Generating docs for library collection_diff from package:collection_diff/collection_diff.dart... Generating docs for library diff_algorithm from package:collection_diff/diff_algorithm.dart... Generating docs for library diff_equality from package:collection_diff/diff_equality.dart... Generating docs for library diff_extensions from package:collection_diff/diff_extensions.dart... Generating docs for library diff_model from package:collection_diff/diff_model.dart... Generating docs for library list_diff from package:collection_diff/map_diff.dart... Generating docs for library list_diff from package:collection_diff/list_diff.dart... Generating docs for library list_diff_model from package:collection_diff/list_diff_model.dart... Generating docs for library map_diff from package:collection_diff/algorithms/map_diff.dart... Generating docs for library map_diff_model from package:collection_diff/map_diff_model.dart... Generating docs for library myers from package:collection_diff/algorithms/myers.dart... Generating docs for library path_node from package:collection_diff/algorithms/path_node.dart... Generating docs for library set_diff from package:collection_diff/algorithms/set_diff.dart... Generating docs for library set_diff from package:collection_diff/set_diff.dart... Generating docs for library set_diff_model from package:collection_diff/set_diff_model.dart... Generating docs for library utils from package:collection_diff/algorithms/utils.dart... Generating docs for library wagner_fischer from package:collection_diff/algorithms/wagner_fischer.dart... Validating docs... Documented 17 public libraries in 9.2 seconds stderr: warning: unresolved doc reference [collection_diff_isolate], from package-collection_diff: file:///tmp/pub-dartlang-dartdocOCWKAM/pkg warning: collection_diff has no library level documentation comments, from collection_diff: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/collection_diff.dart:1:9) warning: ambiguous doc reference [equals] => 'diff_equality.EqualityFromDiffable.equals', 'diff_equality.EqualityFromDiffable.equals', from diff_equality.EqualityFromDiffable.hash: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/diff_equality.dart:260:7) warning: ambiguous doc reference [equals] => 'diff_equality.EqualityFromDiffable.equals', 'diff_equality.EqualityFromDiffable.equals', from diff_equality.EqualityFromDiffable.isValidKey: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/diff_equality.dart:263:8) warning: Comment reference resolution inside extension methods is not yet implemented, from diff_extensions.StreamOfListDiffsExtensions.replacements: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/diff_extensions.dart:61:19) warning: unresolved doc reference [T], from diff_extensions.StreamOfListDiffsExtensions.replacements: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/diff_extensions.dart:61:19) warning: list_diff has no library level documentation comments, from list_diff: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/map_diff.dart:1:9) warning: list_diff has no library level documentation comments, from list_diff: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/list_diff.dart:1:9) error: failed to write file at: list_diff/list_diff-library.html for symbol list_diff: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/list_diff.dart:1:9) conflicting with file already generated by list_diff: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/map_diff.dart:1:9) Dartdoc generates a path and filename to write to for each symbol. list_diff conflicts with another symbol in the generated path, and therefore can not be written out. Changing the name, library name, or class name (if appropriate) of one of the conflicting items can resolve the conflict. Alternatively, use the @nodoc tag in one symbol's documentation comments to hide it. warning: set_diff has no library level documentation comments, from set_diff: (file:///tmp/pub-dartlang-dartdocOCWKAM/pkg/lib/set_diff.dart:1:9) found 9 warnings and 1 error Unhandled exception: dartdoc encountered 1 errors while processing. #0 Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:225:9)
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
collection_diff.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
|Dart SDK||>=2.7.0 <3.0.0|