Skip to content

Commit 3e4a897

Browse files
committed
dartfmt
1 parent 1ddb50b commit 3e4a897

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

lib/generators/json_serializable_generator.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ Set<FieldElement> _writeFactory(StringBuffer buffer, ClassElement classElement,
143143
buffer.write(', ');
144144
}
145145
buffer.writeAll(
146-
ctorNamedArguments.map((paramElement) => '${paramElement.name}: ' +
146+
ctorNamedArguments.map((paramElement) =>
147+
'${paramElement.name}: ' +
147148
_jsonMapAccessToField(
148149
paramElement.name, fields[paramElement.name], paramElement)),
149150
', ');

lib/src/results.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ class LibraryGenerationResult {
6565
String toString() => '$kind - $generatedFilePath';
6666

6767
@override
68-
bool operator ==(other) => other is LibraryGenerationResult &&
68+
bool operator ==(other) =>
69+
other is LibraryGenerationResult &&
6970
other.kind == kind &&
7071
other.generatedFilePath == generatedFilePath;
7172
}

test/annotation_test.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,10 @@ dynamic _getInstantiatedAnnotation(LibraryElement lib, String className) =>
230230
ElementAnnotation _getClassAnnotation(LibraryElement lib, String className) =>
231231
_getAnnotatedClass(lib, className).metadata.single;
232232

233-
ClassElement _getAnnotatedClass(LibraryElement lib, String className) => lib
234-
.units.expand((cu) => cu.types).singleWhere((cd) => cd.name == className);
233+
ClassElement _getAnnotatedClass(LibraryElement lib, String className) =>
234+
lib.units
235+
.expand((cu) => cu.types)
236+
.singleWhere((cd) => cd.name == className);
235237

236238
/// Returns a mock [ElementAnnotationImpl] whose
237239
/// `evaluationResult.value.type.element.library.source` is `libraryUri` and

test/test_files/json_test_example.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class Person extends Object with _$PersonSerializerMixin {
2020

2121
factory Person.fromJson(json) => _$PersonFromJson(json);
2222

23-
bool operator ==(other) => other is Person &&
23+
bool operator ==(other) =>
24+
other is Person &&
2425
firstName == other.firstName &&
2526
middleName == other.middleName &&
2627
lastName == other.lastName &&
@@ -41,7 +42,8 @@ class Order extends Object with _$OrderSerializerMixin {
4142

4243
factory Order.fromJson(json) => _$OrderFromJson(json);
4344

44-
bool operator ==(other) => other is Order &&
45+
bool operator ==(other) =>
46+
other is Order &&
4547
count == other.count &&
4648
isRushed == other.isRushed &&
4749
const DeepCollectionEquality().equals(items, other.items);
@@ -57,7 +59,8 @@ class Item extends Object with _$ItemSerializerMixin {
5759

5860
factory Item.fromJson(Map<String, Object> json) => _$ItemFromJson(json);
5961

60-
bool operator ==(other) => other is Item &&
62+
bool operator ==(other) =>
63+
other is Item &&
6164
price == other.price &&
6265
itemNumber == other.itemNumber &&
6366
const DeepCollectionEquality().equals(saleDates, other.saleDates);

0 commit comments

Comments
 (0)