Skip to content

Commit 2948941

Browse files
dart fix --apply --code=unnecessary_parenthesis
1 parent 1b5f972 commit 2948941

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

example/test/context_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void main() {
2525
}),
2626
newContextConsumerObservedBitsComponent({
2727
'key': 'newConsumerObservedBitsComponent',
28-
'unstable_observedBits': (1 << 2),
28+
'unstable_observedBits': 1 << 2,
2929
}),
3030
newContextTypeConsumerComponentComponent({'key': 'newContextTypeConsumerComponent'}, []),
3131
]),

example/test/get_dom_node_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ customAssert(text, condition) {
88
if (condition)
99
print('$text passed');
1010
else
11-
throw (text);
11+
throw text;
1212
}
1313

1414
var ChildComponent = react.registerComponent(() => _ChildComponent());

example/test/react_test_components.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,9 @@ class _Component2TestComponent extends react.Component2 with react.TypedSnapshot
431431
Map getDerivedStateFromProps(nextProps, prevState) {
432432
final prevItems = prevState['items'];
433433
if (prevItems.isEmpty || prevItems[0] != 3) {
434-
return ({
434+
return {
435435
'items': List.from([3, 1, 2, 0])
436-
});
436+
};
437437
}
438438
return null;
439439
}

test/lifecycle_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ void sharedLifecycleTests<T extends react.Component>({
737737
const Map expectedContext = {'foo': true};
738738

739739
Map refMap = {
740-
'ref': ((ref) => component = ref),
740+
'ref': (ref) => component = ref,
741741
};
742742

743743
// Add the 'ref' prop separately so it isn't an expected prop since React removes it internally
@@ -808,7 +808,7 @@ void sharedLifecycleTests<T extends react.Component>({
808808
const Map expectedContext = {'foo': true};
809809

810810
Map refMap = {
811-
'ref': ((ref) => component = ref),
811+
'ref': (ref) => component = ref,
812812
};
813813

814814
final initialProps = Map.from(defaultProps)..addAll({'children': const []});
@@ -872,7 +872,7 @@ void sharedLifecycleTests<T extends react.Component>({
872872
Map expectedContext = {'foo': true};
873873

874874
Map refMap = {
875-
'ref': ((ref) => component = ref),
875+
'ref': (ref) => component = ref,
876876
};
877877

878878
final initialProps = Map.from(defaultProps)

test/shared_type_tester.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ void sharedTypeTests(
5151
});
5252
if (!skipNumTypes) {
5353
test('num types', () {
54-
final intValue = (1 as int); // ignore: unnecessary_cast
54+
final intValue = 1 as int; // ignore: unnecessary_cast
5555
final doubleValue = 1.1;
56-
final numValue = (1 as num); // ignore: unnecessary_cast
56+
final numValue = 1 as num; // ignore: unnecessary_cast
5757

5858
testTypeValue(intValue);
5959
testTypeValue(doubleValue);

0 commit comments

Comments
 (0)