Skip to content

Commit 2b04d4a

Browse files
committed
Merge branch 'dart2_upgrade_codemod' of github.com:Workiva/over_react_codemod into dart2_upgrade_codemod
2 parents c06c825 + 2f1c952 commit 2b04d4a

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

test/dart2_suggestors/props_and_state_companion_class_remover.suggestor_test

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ class Foo extends _$Foo
3333
<<<
3434
@Props() class _$Foo {}
3535

36+
>>> @Props() public removes only the companion class (patches 1)
37+
@Props() class _$Foo {}
38+
39+
@State() class _$FooState {}
40+
41+
@Component() class FooComponent {}
42+
// This will be removed once the transition to Dart 2 is complete.
43+
class Foo extends _$Foo
44+
with
45+
// ignore: mixin_of_non_class, undefined_class
46+
_$FooAccessorsMixin {
47+
// ignore: const_initialized_with_non_constant_value, undefined_class, undefined_identifier
48+
static const PropsMeta meta = _$metaForFoo;
49+
}
50+
<<<
51+
@Props() class _$Foo {}
52+
53+
@State() class _$FooState {}
54+
55+
@Component() class FooComponent {}
3656

3757
>>> @Props() private (patches 1)
3858
@Props() class _$_Foo {}
@@ -256,4 +276,4 @@ class DontRemove extends _$DontRemove
256276
_$FooAccessorsMixin {
257277
// ignore: const_initialized_with_non_constant_value, undefined_class, undefined_identifier
258278
static const StateMeta meta = _$metaForFoo;
259-
}
279+
}

0 commit comments

Comments
 (0)