Skip to content

Commit 7aed40c

Browse files
committed
fix formatting
1 parent e216415 commit 7aed40c

47 files changed

Lines changed: 931 additions & 576 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/fic_mappable/lib/ilist_copy_with.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import 'package:fast_immutable_collections/fast_immutable_collections.dart';
44
class ImmutableListCopyWith<Result, Elem, Copy>
55
extends CopyWithBase<Result, IList<Elem>, IList<Elem>> {
66
ImmutableListCopyWith(
7-
IList<Elem> value, this._item, Then<IList<Elem>, Result> then)
8-
: super(value, $identity, then);
7+
IList<Elem> value,
8+
this._item,
9+
Then<IList<Elem>, Result> then,
10+
) : super(value, $identity, then);
911

1012
final ItemCopyWith<Copy, Elem, Result> _item;
1113

examples/fic_mappable/lib/main.dart

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ class B with BMappable {
2323
/// This makes chained copyWith work on [A.list] using the custom
2424
/// [ImmutableListCopyWith] implementation.
2525
extension DataList<$R, $Out extends A> on ACopyWith<$R, A, $Out> {
26-
ImmutableListCopyWith<$R, B, BCopyWith<$R, B, B>> get list => (this
27-
as CopyWithBase<$R, A, $Out>)
28-
.as((v, t, t2) => ImmutableListCopyWith(
29-
v.list, (vv, tt) => vv.copyWith.$chain(tt), (l) => call(list: l)));
26+
ImmutableListCopyWith<$R, B, BCopyWith<$R, B, B>> get list =>
27+
(this as CopyWithBase<$R, A, $Out>).as(
28+
(v, t, t2) => ImmutableListCopyWith(
29+
v.list,
30+
(vv, tt) => vv.copyWith.$chain(tt),
31+
(l) => call(list: l),
32+
),
33+
);
3034
}
3135

3236
void main() {
@@ -35,8 +39,8 @@ void main() {
3539
var a = AMapper.fromMap({
3640
'list': [
3741
{'str': 'hello'},
38-
{'str': 'world'}
39-
]
42+
{'str': 'world'},
43+
],
4044
});
4145

4246
assert(a == A(IList([B('hello'), B('world')])));

examples/fic_mappable/lib/main.mapper.dart

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/freezed_mappable/lib/main.freezed.dart

Lines changed: 66 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/freezed_mappable/lib/main.mapper.dart

Lines changed: 19 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/polymorph_copywith/lib/main.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ import 'models/person.dart';
55
import 'models/zoo.dart';
66

77
void main() {
8-
Animal animal = AnimalMapper.fromMap(
9-
{'type': 'Cat', 'name': 'Coco', 'color': 'white', 'breed': 'black'});
8+
Animal animal = AnimalMapper.fromMap({
9+
'type': 'Cat',
10+
'name': 'Coco',
11+
'color': 'white',
12+
'breed': 'black',
13+
});
1014

1115
assert(animal.runtimeType == Cat);
1216

0 commit comments

Comments
 (0)