renggli / dart-more Goto Github PK
View Code? Open in Web Editor NEWMore Dart — Literally.
Home Page: http://pub.dartlang.org/packages/more
License: MIT License
More Dart — Literally.
Home Page: http://pub.dartlang.org/packages/more
License: MIT License
Hi Lukas, Long time no speak, hope you're doing well!
I love this library, but there seems to be an issue in the logic in IntegerRange for non-default step sizes. Sorry to be reporting this just after 3.9.0 got released 😄
Cheers, Michael
I'm using this package for the iterable extensions, but ran into an issue when trying to use it on web using webdev serve
.
When running with development settings, I get the following error: Uncaught SyntaxError: Unexpected token 'null' (at bimap.sound.ddc.js:108:7)
. This is caused by dart-lang/sdk#39595, which apparently never caught the eyes of the Dart team enough to fix. The package works properly in webdev release builds.
When I cloned locally, renamed null.dart
to null_printer.dart
and made the other necessary changes, the package worked as intended.
Hi!
Are you interested in a PR, which provides sliding window, but for streams, similar to https://github.com/renggli/dart-more/blob/main/lib/src/iterable/window.dart?
thanks
Hey,
Is there a way to do what this package do with More? https://pub.dev/packages/merge_map
It merges multiple Map recursively.
flutter create hello_world
more: ^3.7.0
to the pubspec.yaml
fileflutter pub get
Got the following error:
$ flutter pub get
Because every version of flutter_test from sdk depends on meta 1.7.0 and more >=3.6.0 depends on meta ^1.8.0, flutter_test from sdk is incompatible with more >=3.6.0.
So, because hello_world depends on both more ^3.7.0 and flutter_test from sdk, version solving failed.
Running "flutter pub get" in hello_world...
pub get failed (1; So, because hello_world depends on both more ^3.7.0 and flutter_test from sdk, version solving failed.)
Minor documentation bug for Ordering class. The example:
var natural = new Ordering.natural();
natural.compare(1, 2); // 1
Wouldn't the compare result be -1
signifying that 1 is less than 2?
For reference: dart-lang/sdk#52673
Dart: 1.18
OS: Windows 10 (64-bit)
More version: 3.8.2
import "package:more/collection.dart";
void main() {
final range = IntegerRange(500);
print(range.contains(1000)); // true
}
Hey guys, I made this:
extension InsertBetweenExtension<T> on Iterable<T> {
Iterable<T> insertBetween(T element) {
final result = expand(
(item) => [
item,
element,
],
);
return result.take(result.length - 1);
}
}
It is useful in Flutter to insert dividers or paddings between widgets when you can't use the ListView.separated
constructor (Row
, Column
, SliverList
, etc.).
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: products
.map<Widget>(
(id) => Expanded(
child: id != null ? ProductTile(id: id) : SizedBox.shrink(),
),
)
.insertBetween(SizedBox(width: 8.0))
.toList(),
)
Can it be an interesting addition to this package?
for example, class Indexed
in package:more/src/iterable/indexed.dart
can't be accessed from other package.
but I want to use class for generics just like indexed<E>(list).map((Indexed<E> item) {}
any solution?
thanks in advance.
Does more
have any Python range
equivalent, i.e. a function returning an iterable from int start
until int end
, exclusive?
Multiset
's difference function takes
Iterable` which was fine before null safety. But with null safety this unnecessarily limits the uses.
For example
Multiset<E> diffSample<E>(Multiset<E> multiset, Iterable<E> iterable) => multiset.difference(iterable);
will fail unless you force E
to extend from Object
.
I guess this logic will apply to other collection related code, but did not search for them.
I am having trouble getting Ascending vs Descending sort working, always with nulls last. Imagine code like this:
final orderingAsc = Ordering.natural<String>().nullsLast;
final orderingDesc = Ordering.natural<String>().reversed.nullsLast;
...
final sorter = sortAscending ? orderingAsc : orderingDesc;
return sorter.compare(s1, s2);
I would expect null values ALWAYS to be at the BOTTOM -- then the non-null values will be sorted in Ascending or Descending order, depending on the sortAscending
flag.
What am I doing wrong?
Because more >=4.1.0 depends on meta ^1.11.0 and every version of flutter from sdk depends on meta 1.10.0, more >=4.1.0 is incompatible with flutter from sdk.
So, because shared_package depends on both flutter from sdk and more ^4.2.0, version solving failed.
I'm on the latest stable branch
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.