From 620660c73a3b660378068240cc9e12fa9177c218 Mon Sep 17 00:00:00 2001 From: Marcelo Glasberg <13332110+marcglasberg@users.noreply.github.com> Date: Thu, 28 Nov 2024 19:37:59 -0300 Subject: [PATCH] Doc improvements. --- README.md | 16 ++++++++-------- lib/src/base/iterable_extension.dart | 2 +- lib/src/ilist/ilist.dart | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 492d705..b3e0be0 100644 --- a/README.md +++ b/README.md @@ -413,9 +413,9 @@ The `replaceBy` method lets you define a function to transform an item at a spec It's actually possible to create a const `IList`, but you must follow these rules: -1. Instantiate an `IListConst` (or use `IListConst.empty()`). +1. Instantiate an `IListConst` (or use `IList.empty()`). 2. Explicitly assign it to an `IList`. -3. Use the const keyword. +3. Use the `const` keyword. Examples: @@ -431,8 +431,8 @@ So, for example, those are wrong: ``` // Wrong: Not using the const keyword. -IList ilist = IListConst([]); IList ilist = IList.empty(); +IList ilist = IListConst([]); // Wrong: Not explicitly assigning it to an `IList`. const ilist = IListConst([]); @@ -440,12 +440,12 @@ const ilist = IListConst([]); One other thing to keep in mind is that the `IListConst()` constructor always uses `ConfigList(isDeepEquals: true, cacheHashCode: true)`, completely ignoring the global -`defaultConfig` (which will be explained below). This means if you want a specific a config you must -provide it in the constructor. +`defaultConfig` (which will be explained below). This means if you want a specific a +config you must provide it in the constructor. -_Note: While the FIC collections are generally intuitive to use, the **const** `IList` is a bit -cumbersome to use, because of these rules you have to remember. Unfortunately it can't be avoided -because of the limitations of the Dart language._ +_Note: While the FIC collections are generally intuitive to use, the **const** `IList` +is a bit cumbersome to use, because of these rules you have to remember. +Unfortunately it can't be avoided because of the limitations of the Dart language._ ## 2.1. IList Equality diff --git a/lib/src/base/iterable_extension.dart b/lib/src/base/iterable_extension.dart index d79b4f7..a6bf0cb 100644 --- a/lib/src/base/iterable_extension.dart +++ b/lib/src/base/iterable_extension.dart @@ -287,7 +287,7 @@ extension FicIterableExtension on Iterable { /// (and the [id] is a function of the item), like so: /// /// 1) Items with the same [id] will be replaced, in place. - /// 2) Items with new [id]s will be added go to the end of the list. + /// 2) Items with new [id]s will be added to the end of the list. /// /// Note: If the original iterable contains more than one item with the /// same [id] as some item in [newItems], the first will be replaced, and diff --git a/lib/src/ilist/ilist.dart b/lib/src/ilist/ilist.dart index 11fdc3f..0af224e 100644 --- a/lib/src/ilist/ilist.dart +++ b/lib/src/ilist/ilist.dart @@ -736,7 +736,7 @@ abstract class IList // ignore: must_be_immutable /// (and the [id] is a function of the item), like so: /// /// 1) Items with the same [id] will be replaced, in place. - /// 2) Items with new [id]s will be added go to the end of the list. + /// 2) Items with new [id]s will be added to the end of the list. /// /// Note: If the original list contains more than one item with the same /// [id] as some item in [newItems], the first will be replaced, and the