knaeckekami / diffutil_sliverlist Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I'd like to have access to an item's index in the builder function, in addition to the existing BuildContext
and item T
. If needed, I could offer this change myself in a PR. Let me know!
Hi!
Great work with this package! I have a question regarding the missing move-implementation, is there a reason for this? It seems to be supported in diff_util?
void _onDiffUpdate(diffutil.DiffUpdate update) {
update.when<void>(
move: (_, __) =>
throw UnimplementedError('moves are currently not supported'),
insert: _onInserted,
change: _onChanged,
remove: _onRemoved);
}
Best regards
The documentation states:
Don't mutate the list passed into DiffUtilSliverList yourself
...
either copy the list before mutation:
...
Or just copy the list before passing it to DiffUtilSliverList:
DiffUtilSliverList<int>(items: List.from(list), ...),
Is there a reason why this library does not automatically copy the list for users so this isn't needed? The list will need to be copied at some point for DiffUtil to work correctly anyways; I don't see why DiffUtilSliverList can't copy the list itself and take some work away from library users. Plus, this addition won't be a breaking change.
If I am missing something here/not understanding this correctly, please do let me know. But, if not, I'd be happy to open a PR for this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.