Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OverReact syntax to support Dart 2.9+ #111

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/over_react_test/wrapper_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ part 'wrapper_component.over_react.g.dart';
/// A helper component for use in tests where a component needs to be
/// rendered inside a wrapper, but a composite component must be used
/// for compatability with `getByTestId()`.
UiFactory<WrapperProps> Wrapper = _$Wrapper; // ignore: undefined_identifier
UiFactory<WrapperProps> Wrapper = castUiFactory(_$Wrapper); // ignore: undefined_identifier

mixin WrapperProps on UiProps {}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
js: ^0.6.1+1
matcher: ^0.12.1+4
meta: ^1.1.0
over_react: ">=3.5.3 <5.0.0"
over_react: ^4.1.0
react: ">=5.5.1 <7.0.0"
test: ^1.9.1
dev_dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:over_react/over_react.dart';

part 'sample_component.over_react.g.dart';

UiFactory<SampleProps> Sample = _$Sample; // ignore: undefined_identifier
UiFactory<SampleProps> Sample = castUiFactory(_$Sample); // ignore: undefined_identifier

mixin SampleProps on UiProps {
bool shouldNeverBeNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:over_react/over_react.dart';

part 'sample_component2.over_react.g.dart';

UiFactory<Sample2Props> Sample2 = _$Sample2; // ignore: undefined_identifier
UiFactory<Sample2Props> Sample2 = castUiFactory(_$Sample2); // ignore: undefined_identifier

mixin Sample2Props on UiProps {
bool shouldNeverBeNull;
Expand Down
2 changes: 1 addition & 1 deletion test/over_react_test/jacket_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ main() {
});
}

UiFactory<SampleProps> Sample = _$Sample; // ignore: undefined_identifier
UiFactory<SampleProps> Sample = castUiFactory(_$Sample); // ignore: undefined_identifier

mixin SampleProps on UiProps {
bool foo;
Expand Down
2 changes: 1 addition & 1 deletion test/over_react_test/react_util_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ class TestProps extends _$TestProps with _$TestPropsAccessorsMixin {
static const PropsMeta meta = _$metaForTestProps;
}

UiFactory<Test2Props> Test2 = _$Test2; // ignore: undefined_identifier
UiFactory<Test2Props> Test2 = castUiFactory(_$Test2); // ignore: undefined_identifier

mixin Test2Props on UiProps {}

Expand Down
2 changes: 1 addition & 1 deletion test/over_react_test/utils/nested_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'package:over_react/over_react.dart';

part 'nested_component.over_react.g.dart';

UiFactory<NestedProps> Nested = _$Nested; // ignore: undefined_identifier
UiFactory<NestedProps> Nested = castUiFactory(_$Nested); // ignore: undefined_identifier

mixin NestedProps on UiProps {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import 'package:over_react_test/src/over_react_test/wrapper_component.dart';
part 'test_common_component_new_boilerplate.over_react.g.dart';

UiFactory<TestCommonForwardingProps> TestCommonForwarding =
_$TestCommonForwarding; // ignore: undefined_identifier
castUiFactory(_$TestCommonForwarding); // ignore: undefined_identifier

class TestCommonForwardingProps = UiProps
with ShouldBeForwardedProps, ShouldNotBeForwardedProps;
Expand Down Expand Up @@ -57,7 +57,7 @@ mixin ShouldNotBeForwardedProps on UiProps {
}

UiFactory<TestCommonDomOnlyForwardingProps> TestCommonDomOnlyForwarding =
_$TestCommonDomOnlyForwarding; // ignore: undefined_identifier
castUiFactory(_$TestCommonDomOnlyForwarding); // ignore: undefined_identifier

class TestCommonDomOnlyForwardingProps = UiProps
with ShouldBeForwardedProps, ShouldNotBeForwardedProps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'package:over_react/over_react.dart';
part 'test_common_component_required_props_commponent2.over_react.g.dart';

UiFactory<TestCommonRequired2Props> TestCommonRequired2 =
_$TestCommonRequired2; // ignore: undefined_identifier
castUiFactory(_$TestCommonRequired2); // ignore: undefined_identifier

mixin TestCommonRequired2Props on UiProps {
@nullableRequiredProp
Expand Down