diff --git a/example/builder/abstract_inheritance.over_react.g.dart b/example/builder/abstract_inheritance.over_react.g.dart index c4ff11553..5b7daf733 100644 --- a/example/builder/abstract_inheritance.over_react.g.dart +++ b/example/builder/abstract_inheritance.over_react.g.dart @@ -56,12 +56,17 @@ _$$SubProps _$Sub([Map backingProps]) => new _$$SubProps(backingProps); class _$$SubProps extends _$SubProps with _$SubPropsAccessorsMixin implements SubProps { - _$$SubProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$SubProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -114,12 +119,17 @@ class SubState extends _$SubState with _$SubStateAccessorsMixin { class _$$SubState extends _$SubState with _$SubStateAccessorsMixin implements SubState { - _$$SubState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$SubState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/example/builder/basic.over_react.g.dart b/example/builder/basic.over_react.g.dart index 43446120c..761a868d5 100644 --- a/example/builder/basic.over_react.g.dart +++ b/example/builder/basic.over_react.g.dart @@ -132,12 +132,17 @@ _$$BasicProps _$Basic([Map backingProps]) => new _$$BasicProps(backingProps); class _$$BasicProps extends _$BasicProps with _$BasicPropsAccessorsMixin implements BasicProps { - _$$BasicProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/example/builder/basic_library.over_react.g.dart b/example/builder/basic_library.over_react.g.dart index 0c75b0cb3..1978c2106 100644 --- a/example/builder/basic_library.over_react.g.dart +++ b/example/builder/basic_library.over_react.g.dart @@ -144,12 +144,17 @@ _$$BasicPartOfLibProps _$BasicPartOfLib([Map backingProps]) => class _$$BasicPartOfLibProps extends _$BasicPartOfLibProps with _$BasicPartOfLibPropsAccessorsMixin implements BasicPartOfLibProps { - _$$BasicPartOfLibProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicPartOfLibProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -209,12 +214,17 @@ class BasicPartOfLibState extends _$BasicPartOfLibState class _$$BasicPartOfLibState extends _$BasicPartOfLibState with _$BasicPartOfLibStateAccessorsMixin implements BasicPartOfLibState { - _$$BasicPartOfLibState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicPartOfLibState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override @@ -304,12 +314,17 @@ _$$SubPartOfLibProps _$SubPartOfLib([Map backingProps]) => class _$$SubPartOfLibProps extends _$SubPartOfLibProps with _$SubPartOfLibPropsAccessorsMixin implements SubPartOfLibProps { - _$$SubPartOfLibProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$SubPartOfLibProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/example/builder/basic_with_state.over_react.g.dart b/example/builder/basic_with_state.over_react.g.dart index 1a24e7c69..11a5c8a08 100644 --- a/example/builder/basic_with_state.over_react.g.dart +++ b/example/builder/basic_with_state.over_react.g.dart @@ -128,12 +128,17 @@ _$$BasicProps _$Basic([Map backingProps]) => new _$$BasicProps(backingProps); class _$$BasicProps extends _$BasicProps with _$BasicPropsAccessorsMixin implements BasicProps { - _$$BasicProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -189,12 +194,17 @@ class BasicState extends _$BasicState with _$BasicStateAccessorsMixin { class _$$BasicState extends _$BasicState with _$BasicStateAccessorsMixin implements BasicState { - _$$BasicState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/example/builder/basic_with_type_params.over_react.g.dart b/example/builder/basic_with_type_params.over_react.g.dart index 0f3d849c5..9c10dc22f 100644 --- a/example/builder/basic_with_type_params.over_react.g.dart +++ b/example/builder/basic_with_type_params.over_react.g.dart @@ -78,12 +78,17 @@ _$$BasicProps _$Basic([Map backingProps]) => new _$$BasicProps(backingProps); class _$$BasicProps extends _$BasicProps with _$BasicPropsAccessorsMixin implements BasicProps { - _$$BasicProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/example/builder/generic_inheritance_sub.over_react.g.dart b/example/builder/generic_inheritance_sub.over_react.g.dart index 9097006bc..40686e60c 100644 --- a/example/builder/generic_inheritance_sub.over_react.g.dart +++ b/example/builder/generic_inheritance_sub.over_react.g.dart @@ -62,12 +62,17 @@ _$$GenericSubProps _$GenericSub([Map backingProps]) => class _$$GenericSubProps extends _$GenericSubProps with _$GenericSubPropsAccessorsMixin implements GenericSubProps { - _$$GenericSubProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$GenericSubProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -126,12 +131,17 @@ class GenericSubState extends _$GenericSubState class _$$GenericSubState extends _$GenericSubState with _$GenericSubStateAccessorsMixin implements GenericSubState { - _$$GenericSubState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$GenericSubState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/example/builder/generic_inheritance_super.over_react.g.dart b/example/builder/generic_inheritance_super.over_react.g.dart index 577fc1a09..0957136f5 100644 --- a/example/builder/generic_inheritance_super.over_react.g.dart +++ b/example/builder/generic_inheritance_super.over_react.g.dart @@ -96,12 +96,17 @@ _$$GenericSuperProps _$GenericSuper([Map backingProps]) => class _$$GenericSuperProps extends _$GenericSuperProps with _$GenericSuperPropsAccessorsMixin implements GenericSuperProps { - _$$GenericSuperProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$GenericSuperProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -161,12 +166,17 @@ class GenericSuperState extends _$GenericSuperState class _$$GenericSuperState extends _$GenericSuperState with _$GenericSuperStateAccessorsMixin implements GenericSuperState { - _$$GenericSuperState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$GenericSuperState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/example/builder/private_component.over_react.g.dart b/example/builder/private_component.over_react.g.dart index def712c82..d5488e320 100644 --- a/example/builder/private_component.over_react.g.dart +++ b/example/builder/private_component.over_react.g.dart @@ -58,12 +58,17 @@ _$$_PrivateProps _$_Private([Map backingProps]) => class _$$_PrivateProps extends _$_PrivateProps with _$_PrivatePropsAccessorsMixin implements _PrivateProps { - _$$_PrivateProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$_PrivateProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -116,12 +121,17 @@ class _PrivateState extends _$_PrivateState with _$_PrivateStateAccessorsMixin { class _$$_PrivateState extends _$_PrivateState with _$_PrivateStateAccessorsMixin implements _PrivateState { - _$$_PrivateState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$_PrivateState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/example/builder/private_factory_public_component.over_react.g.dart b/example/builder/private_factory_public_component.over_react.g.dart index d127bd132..4a19d5d49 100644 --- a/example/builder/private_factory_public_component.over_react.g.dart +++ b/example/builder/private_factory_public_component.over_react.g.dart @@ -64,12 +64,17 @@ _$$FormActionInputProps _$_FormActionInput([Map backingProps]) => class _$$FormActionInputProps extends _$FormActionInputProps with _$FormActionInputPropsAccessorsMixin implements FormActionInputProps { - _$$FormActionInputProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$FormActionInputProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/lib/src/builder/generation/impl_generation.dart b/lib/src/builder/generation/impl_generation.dart index c47ee4714..7e86376da 100644 --- a/lib/src/builder/generation/impl_generation.dart +++ b/lib/src/builder/generation/impl_generation.dart @@ -164,12 +164,17 @@ class ImplGenerator { ..writeln('//') ..writeln('// Implements constructor and backing map.') ..writeln('class $stateImplName$typeParamsOnClass extends $stateName$typeParamsOnSuper with $stateAccessorsMixinName$typeParamsOnSuper implements $consumableStateName$typeParamsOnSuper {') - ..writeln(' $stateImplName(Map backingMap) : this._state = backingMap ?? {};') + ..writeln(' // This initializer of `_state` to an empty map, as well as the reassignment') + ..writeln(' // of `_state` in the constructor body is necessary to work around an unknown ddc issue.') + ..writeln(' // See for more details') + ..writeln(' $stateImplName(Map backingMap) : this._state = {} {') + ..writeln(' this._state = backingMap ?? {};') + ..writeln(' }') ..writeln() ..writeln(' /// The backing state map proxied by this class.') ..writeln(' @override') ..writeln(' Map get state => _state;') - ..writeln(' final Map _state;') + ..writeln(' Map _state;') ..writeln() ..writeln(' /// Let [UiState] internals know that this class has been generated.') ..writeln(' @override') @@ -685,12 +690,17 @@ class ImplGenerator { ..writeln('//') ..writeln('// Implements constructor and backing map, and links up to generated component factory.') ..write(classDeclaration) - ..writeln(' $implName(Map backingMap) : this._props = backingMap ?? {};') + ..writeln(' // This initializer of `_props` to an empty map, as well as the reassignment') + ..writeln(' // of `_props` in the constructor body is necessary to work around an unknown ddc issue.') + ..writeln(' // See for more details') + ..writeln(' $implName(Map backingMap) : this._props = {} {') + ..writeln(' this._props = backingMap ?? {};') + ..writeln(' }') ..writeln() ..writeln(' /// The backing props map proxied by this class.') ..writeln(' @override') ..writeln(' Map get props => _props;') - ..writeln(' final Map _props;') + ..writeln(' Map _props;') ..writeln() ..writeln(' /// Let [UiProps] internals know that this class has been generated.') ..writeln(' @override') diff --git a/lib/src/component/resize_sensor.over_react.g.dart b/lib/src/component/resize_sensor.over_react.g.dart index 941ad6382..56ccc4d1b 100644 --- a/lib/src/component/resize_sensor.over_react.g.dart +++ b/lib/src/component/resize_sensor.over_react.g.dart @@ -47,12 +47,17 @@ _$$ResizeSensorProps _$ResizeSensor([Map backingProps]) => class _$$ResizeSensorProps extends _$ResizeSensorProps with _$ResizeSensorPropsAccessorsMixin implements ResizeSensorProps { - _$$ResizeSensorProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ResizeSensorProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component/abstract_transition_test.over_react.g.dart b/test/over_react/component/abstract_transition_test.over_react.g.dart index 4867776b2..51e79baac 100644 --- a/test/over_react/component/abstract_transition_test.over_react.g.dart +++ b/test/over_react/component/abstract_transition_test.over_react.g.dart @@ -208,12 +208,17 @@ _$$TransitionerProps _$Transitioner([Map backingProps]) => class _$$TransitionerProps extends _$TransitionerProps with _$TransitionerPropsAccessorsMixin implements TransitionerProps { - _$$TransitionerProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TransitionerProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -256,12 +261,17 @@ class TransitionerState extends _$TransitionerState class _$$TransitionerState extends _$TransitionerState with _$TransitionerStateAccessorsMixin implements TransitionerState { - _$$TransitionerState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TransitionerState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/component_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/component_integration_test.over_react.g.dart index ea72f4813..68e3fc712 100644 --- a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/component_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/component_integration_test.over_react.g.dart @@ -148,12 +148,17 @@ _$$ComponentTestProps _$ComponentTest([Map backingProps]) => class _$$ComponentTestProps extends _$ComponentTestProps with _$ComponentTestPropsAccessorsMixin implements ComponentTestProps { - _$$ComponentTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/constant_required_accessor_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/constant_required_accessor_integration_test.over_react.g.dart index ec1e63486..e637e48ef 100644 --- a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/constant_required_accessor_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/constant_required_accessor_integration_test.over_react.g.dart @@ -79,12 +79,17 @@ _$$ComponentTestProps _$ComponentTest([Map backingProps]) => class _$$ComponentTestProps extends _$ComponentTestProps with _$ComponentTestPropsAccessorsMixin implements ComponentTestProps { - _$$ComponentTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/do_not_generate_accessor_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/do_not_generate_accessor_integration_test.over_react.g.dart index 84859e32e..3a1dce89b 100644 --- a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/do_not_generate_accessor_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/do_not_generate_accessor_integration_test.over_react.g.dart @@ -102,13 +102,17 @@ _$$DoNotGenerateAccessorTestProps _$DoNotGenerateAccessorTest( class _$$DoNotGenerateAccessorTestProps extends _$DoNotGenerateAccessorTestProps with _$DoNotGenerateAccessorTestPropsAccessorsMixin implements DoNotGenerateAccessorTestProps { - _$$DoNotGenerateAccessorTestProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$DoNotGenerateAccessorTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -206,13 +210,17 @@ const StateMeta _$metaForDoNotGenerateAccessorTestState = const StateMeta( class _$$DoNotGenerateAccessorTestState extends _$DoNotGenerateAccessorTestState with _$DoNotGenerateAccessorTestStateAccessorsMixin implements DoNotGenerateAccessorTestState { - _$$DoNotGenerateAccessorTestState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$DoNotGenerateAccessorTestState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/namespaced_accessor_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/namespaced_accessor_integration_test.over_react.g.dart index 5aa9d249f..9c8df8b07 100644 --- a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/namespaced_accessor_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/namespaced_accessor_integration_test.over_react.g.dart @@ -156,13 +156,17 @@ _$$NamespacedAccessorTestProps _$NamespacedAccessorTest([Map backingProps]) => class _$$NamespacedAccessorTestProps extends _$NamespacedAccessorTestProps with _$NamespacedAccessorTestPropsAccessorsMixin implements NamespacedAccessorTestProps { - _$$NamespacedAccessorTestProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$NamespacedAccessorTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -315,13 +319,17 @@ const StateMeta _$metaForNamespacedAccessorTestState = const StateMeta( class _$$NamespacedAccessorTestState extends _$NamespacedAccessorTestState with _$NamespacedAccessorTestStateAccessorsMixin implements NamespacedAccessorTestState { - _$$NamespacedAccessorTestState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$NamespacedAccessorTestState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/private_props_ddc_bug.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/private_props_ddc_bug.dart new file mode 100644 index 000000000..669b925fa --- /dev/null +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/private_props_ddc_bug.dart @@ -0,0 +1,45 @@ +import 'package:over_react/over_react.dart'; +import 'package:test/test.dart'; + +import '../../../../test_util/test_util.dart'; + +// ignore: uri_has_not_been_generated +part 'private_props_ddc_bug.over_react.g.dart'; + +main() { + test('sets private props correctly in `getDefaultProps`', () { + var instance = render((Foo())()); + + expect(instance, isNotNull); // sanity check + + var node = findDomNode(instance); + + expect(node.text, contains('some private value')); + }); +} + + +@Factory() +// ignore: undefined_identifier +UiFactory Foo = _$Foo; + +@Props() +class _$FooProps extends UiProps { + String _privateProp; +} + +@Component() +class FooComponent extends UiComponent { + @override + Map getDefaultProps() => newProps().._privateProp = 'some private value'; + + @override + render() => (Dom.div())(props._privateProp); +} + +// AF-3369 This will be removed once the transition to Dart 2 is complete. +// ignore: mixin_of_non_class, undefined_class +class FooProps extends _$FooProps with _$FooPropsAccessorsMixin { + // ignore: undefined_identifier, undefined_class, const_initialized_with_non_constant_value + static const PropsMeta meta = _$metaForFooProps; +} diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/private_props_ddc_bug.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/private_props_ddc_bug.over_react.g.dart new file mode 100644 index 000000000..71f057645 --- /dev/null +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/private_props_ddc_bug.over_react.g.dart @@ -0,0 +1,97 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'private_props_ddc_bug.dart'; + +// ************************************************************************** +// OverReactGenerator +// ************************************************************************** + +// React component factory implementation. +// +// Registers component implementation and links type meta to builder factory. +final $FooComponentFactory = registerComponent(() => new _$FooComponent(), + builderFactory: Foo, + componentClass: FooComponent, + isWrapper: false, + parentType: null, + displayName: 'Foo'); + +abstract class _$FooPropsAccessorsMixin implements _$FooProps { + @override + Map get props; + + /// Go to [_$FooProps._privateProp] to see the source code for this prop + @override + String get _privateProp => + props[_$key___privateProp___$FooProps] ?? + null; // Add ` ?? null` to workaround DDC bug: ; + /// Go to [_$FooProps._privateProp] to see the source code for this prop + @override + set _privateProp(String value) => + props[_$key___privateProp___$FooProps] = value; + /* GENERATED CONSTANTS */ + static const PropDescriptor _$prop___privateProp___$FooProps = + const PropDescriptor(_$key___privateProp___$FooProps); + static const String _$key___privateProp___$FooProps = 'FooProps._privateProp'; + + static const List $props = const [ + _$prop___privateProp___$FooProps + ]; + static const List $propKeys = const [_$key___privateProp___$FooProps]; +} + +const PropsMeta _$metaForFooProps = const PropsMeta( + fields: _$FooPropsAccessorsMixin.$props, + keys: _$FooPropsAccessorsMixin.$propKeys, +); + +_$$FooProps _$Foo([Map backingProps]) => new _$$FooProps(backingProps); + +// Concrete props implementation. +// +// Implements constructor and backing map, and links up to generated component factory. +class _$$FooProps extends _$FooProps + with _$FooPropsAccessorsMixin + implements FooProps { + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$FooProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } + + /// The backing props map proxied by this class. + @override + Map get props => _props; + Map _props; + + /// Let [UiProps] internals know that this class has been generated. + @override + bool get $isClassGenerated => true; + + /// The [ReactComponentFactory] associated with the component built by this class. + @override + ReactComponentFactoryProxy get componentFactory => $FooComponentFactory; + + /// The default namespace for the prop getters/setters generated for this class. + @override + String get propKeyNamespace => 'FooProps.'; +} + +// Concrete component implementation mixin. +// +// Implements typed props/state factories, defaults `consumedPropKeys` to the keys +// generated for the associated props class. +class _$FooComponent extends FooComponent { + @override + _$$FooProps typedPropsFactory(Map backingMap) => new _$$FooProps(backingMap); + + /// Let [UiComponent] internals know that this class has been generated. + @override + bool get $isClassGenerated => true; + + /// The default consumed props, taken from _$FooProps. + /// Used in [UiProps.consumedProps] if [consumedProps] is not overridden. + @override + final List $defaultConsumedProps = const [_$metaForFooProps]; +} diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/required_accessor_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/required_accessor_integration_test.over_react.g.dart index 8782abc97..f435d424d 100644 --- a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/required_accessor_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/required_accessor_integration_test.over_react.g.dart @@ -92,12 +92,17 @@ _$$ComponentTestProps _$ComponentTest([Map backingProps]) => class _$$ComponentTestProps extends _$ComponentTestProps with _$ComponentTestPropsAccessorsMixin implements ComponentTestProps { - _$$ComponentTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/required_prop_integration_tests.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/required_prop_integration_tests.over_react.g.dart index ba93d1f78..194b933dd 100644 --- a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/required_prop_integration_tests.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/required_prop_integration_tests.over_react.g.dart @@ -82,12 +82,17 @@ _$$ComponentTestProps _$ComponentTest([Map backingProps]) => class _$$ComponentTestProps extends _$ComponentTestProps with _$ComponentTestPropsAccessorsMixin implements ComponentTestProps { - _$$ComponentTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/stateful_component_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/stateful_component_integration_test.over_react.g.dart index 47f2278f1..c80e97e41 100644 --- a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/stateful_component_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/stateful_component_integration_test.over_react.g.dart @@ -42,13 +42,17 @@ _$$StatefulComponentTestProps _$StatefulComponentTest([Map backingProps]) => class _$$StatefulComponentTestProps extends _$StatefulComponentTestProps with _$StatefulComponentTestPropsAccessorsMixin implements StatefulComponentTestProps { - _$$StatefulComponentTestProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$StatefulComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -201,13 +205,17 @@ const StateMeta _$metaForStatefulComponentTestState = const StateMeta( class _$$StatefulComponentTestState extends _$StatefulComponentTestState with _$StatefulComponentTestStateAccessorsMixin implements StatefulComponentTestState { - _$$StatefulComponentTestState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$StatefulComponentTestState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/unassigned_prop_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/unassigned_prop_integration_test.over_react.g.dart index 3642bcc1a..24ac6b851 100644 --- a/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/unassigned_prop_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/backwards_compatible/unassigned_prop_integration_test.over_react.g.dart @@ -70,12 +70,17 @@ _$$FooProps _$Foo([Map backingProps]) => new _$$FooProps(backingProps); class _$$FooProps extends _$FooProps with _$FooPropsAccessorsMixin implements FooProps { - _$$FooProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$FooProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/component_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/component_integration_test.over_react.g.dart index b01214359..b4e7f305f 100644 --- a/test/over_react/component_declaration/builder_integration_tests/component_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/component_integration_test.over_react.g.dart @@ -153,12 +153,17 @@ _$$ComponentTestProps _$ComponentTest([Map backingProps]) => class _$$ComponentTestProps extends _$ComponentTestProps with _$ComponentTestPropsAccessorsMixin implements ComponentTestProps { - _$$ComponentTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/constant_required_accessor_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/constant_required_accessor_integration_test.over_react.g.dart index 9d0d1f27c..fa63fc01d 100644 --- a/test/over_react/component_declaration/builder_integration_tests/constant_required_accessor_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/constant_required_accessor_integration_test.over_react.g.dart @@ -84,12 +84,17 @@ _$$ComponentTestProps _$ComponentTest([Map backingProps]) => class _$$ComponentTestProps extends _$ComponentTestProps with _$ComponentTestPropsAccessorsMixin implements ComponentTestProps { - _$$ComponentTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/do_not_generate_accessor_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/do_not_generate_accessor_integration_test.over_react.g.dart index c8b23cf12..f69e4161f 100644 --- a/test/over_react/component_declaration/builder_integration_tests/do_not_generate_accessor_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/do_not_generate_accessor_integration_test.over_react.g.dart @@ -107,13 +107,17 @@ _$$DoNotGenerateAccessorTestProps _$DoNotGenerateAccessorTest( class _$$DoNotGenerateAccessorTestProps extends _$DoNotGenerateAccessorTestProps with _$DoNotGenerateAccessorTestPropsAccessorsMixin implements DoNotGenerateAccessorTestProps { - _$$DoNotGenerateAccessorTestProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$DoNotGenerateAccessorTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -216,13 +220,17 @@ class DoNotGenerateAccessorTestState extends _$DoNotGenerateAccessorTestState class _$$DoNotGenerateAccessorTestState extends _$DoNotGenerateAccessorTestState with _$DoNotGenerateAccessorTestStateAccessorsMixin implements DoNotGenerateAccessorTestState { - _$$DoNotGenerateAccessorTestState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$DoNotGenerateAccessorTestState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/namespaced_accessor_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/namespaced_accessor_integration_test.over_react.g.dart index 78e56eb90..67ffff4e1 100644 --- a/test/over_react/component_declaration/builder_integration_tests/namespaced_accessor_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/namespaced_accessor_integration_test.over_react.g.dart @@ -161,13 +161,17 @@ _$$NamespacedAccessorTestProps _$NamespacedAccessorTest([Map backingProps]) => class _$$NamespacedAccessorTestProps extends _$NamespacedAccessorTestProps with _$NamespacedAccessorTestPropsAccessorsMixin implements NamespacedAccessorTestProps { - _$$NamespacedAccessorTestProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$NamespacedAccessorTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -325,13 +329,17 @@ class NamespacedAccessorTestState extends _$NamespacedAccessorTestState class _$$NamespacedAccessorTestState extends _$NamespacedAccessorTestState with _$NamespacedAccessorTestStateAccessorsMixin implements NamespacedAccessorTestState { - _$$NamespacedAccessorTestState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$NamespacedAccessorTestState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/private_props_ddc_bug.dart b/test/over_react/component_declaration/builder_integration_tests/private_props_ddc_bug.dart new file mode 100644 index 000000000..26f4e71b6 --- /dev/null +++ b/test/over_react/component_declaration/builder_integration_tests/private_props_ddc_bug.dart @@ -0,0 +1,36 @@ +import 'package:over_react/over_react.dart'; +import 'package:test/test.dart'; + +import '../../../test_util/test_util.dart'; + +part 'private_props_ddc_bug.over_react.g.dart'; + +main() { + test('sets private props correctly in `getDefaultProps`', () { + var instance = render((Foo())()); + + expect(instance, isNotNull); // sanity check + + var node = findDomNode(instance); + + expect(node.text, contains('some private value')); + }); +} + + +@Factory() +UiFactory Foo = _$Foo; + +@Props() +class _$FooProps extends UiProps { + String _privateProp; +} + +@Component() +class FooComponent extends UiComponent { + @override + Map getDefaultProps() => newProps().._privateProp = 'some private value'; + + @override + render() => (Dom.div())(props._privateProp); +} diff --git a/test/over_react/component_declaration/builder_integration_tests/private_props_ddc_bug.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/private_props_ddc_bug.over_react.g.dart new file mode 100644 index 000000000..f0b1c48fa --- /dev/null +++ b/test/over_react/component_declaration/builder_integration_tests/private_props_ddc_bug.over_react.g.dart @@ -0,0 +1,101 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'private_props_ddc_bug.dart'; + +// ************************************************************************** +// OverReactGenerator +// ************************************************************************** + +// React component factory implementation. +// +// Registers component implementation and links type meta to builder factory. +final $FooComponentFactory = registerComponent(() => new _$FooComponent(), + builderFactory: Foo, + componentClass: FooComponent, + isWrapper: false, + parentType: null, + displayName: 'Foo'); + +abstract class _$FooPropsAccessorsMixin implements _$FooProps { + @override + Map get props; + + /// Go to [_$FooProps._privateProp] to see the source code for this prop + @override + String get _privateProp => + props[_$key___privateProp___$FooProps] ?? + null; // Add ` ?? null` to workaround DDC bug: ; + /// Go to [_$FooProps._privateProp] to see the source code for this prop + @override + set _privateProp(String value) => + props[_$key___privateProp___$FooProps] = value; + /* GENERATED CONSTANTS */ + static const PropDescriptor _$prop___privateProp___$FooProps = + const PropDescriptor(_$key___privateProp___$FooProps); + static const String _$key___privateProp___$FooProps = 'FooProps._privateProp'; + + static const List $props = const [ + _$prop___privateProp___$FooProps + ]; + static const List $propKeys = const [_$key___privateProp___$FooProps]; +} + +const PropsMeta _$metaForFooProps = const PropsMeta( + fields: _$FooPropsAccessorsMixin.$props, + keys: _$FooPropsAccessorsMixin.$propKeys, +); + +class FooProps extends _$FooProps with _$FooPropsAccessorsMixin { + static const PropsMeta meta = _$metaForFooProps; +} + +_$$FooProps _$Foo([Map backingProps]) => new _$$FooProps(backingProps); + +// Concrete props implementation. +// +// Implements constructor and backing map, and links up to generated component factory. +class _$$FooProps extends _$FooProps + with _$FooPropsAccessorsMixin + implements FooProps { + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$FooProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } + + /// The backing props map proxied by this class. + @override + Map get props => _props; + Map _props; + + /// Let [UiProps] internals know that this class has been generated. + @override + bool get $isClassGenerated => true; + + /// The [ReactComponentFactory] associated with the component built by this class. + @override + ReactComponentFactoryProxy get componentFactory => $FooComponentFactory; + + /// The default namespace for the prop getters/setters generated for this class. + @override + String get propKeyNamespace => 'FooProps.'; +} + +// Concrete component implementation mixin. +// +// Implements typed props/state factories, defaults `consumedPropKeys` to the keys +// generated for the associated props class. +class _$FooComponent extends FooComponent { + @override + _$$FooProps typedPropsFactory(Map backingMap) => new _$$FooProps(backingMap); + + /// Let [UiComponent] internals know that this class has been generated. + @override + bool get $isClassGenerated => true; + + /// The default consumed props, taken from _$FooProps. + /// Used in [UiProps.consumedProps] if [consumedProps] is not overridden. + @override + final List $defaultConsumedProps = const [_$metaForFooProps]; +} diff --git a/test/over_react/component_declaration/builder_integration_tests/required_accessor_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/required_accessor_integration_test.over_react.g.dart index 0bcf4192f..04abc2bbb 100644 --- a/test/over_react/component_declaration/builder_integration_tests/required_accessor_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/required_accessor_integration_test.over_react.g.dart @@ -97,12 +97,17 @@ _$$ComponentTestProps _$ComponentTest([Map backingProps]) => class _$$ComponentTestProps extends _$ComponentTestProps with _$ComponentTestPropsAccessorsMixin implements ComponentTestProps { - _$$ComponentTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/required_prop_integration_tests.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/required_prop_integration_tests.over_react.g.dart index 9ce47d61f..24ce7a040 100644 --- a/test/over_react/component_declaration/builder_integration_tests/required_prop_integration_tests.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/required_prop_integration_tests.over_react.g.dart @@ -87,12 +87,17 @@ _$$ComponentTestProps _$ComponentTest([Map backingProps]) => class _$$ComponentTestProps extends _$ComponentTestProps with _$ComponentTestPropsAccessorsMixin implements ComponentTestProps { - _$$ComponentTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/stateful_component_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/stateful_component_integration_test.over_react.g.dart index d5258a4dd..eb464e940 100644 --- a/test/over_react/component_declaration/builder_integration_tests/stateful_component_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/stateful_component_integration_test.over_react.g.dart @@ -47,13 +47,17 @@ _$$StatefulComponentTestProps _$StatefulComponentTest([Map backingProps]) => class _$$StatefulComponentTestProps extends _$StatefulComponentTestProps with _$StatefulComponentTestPropsAccessorsMixin implements StatefulComponentTestProps { - _$$StatefulComponentTestProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$StatefulComponentTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -211,13 +215,17 @@ class StatefulComponentTestState extends _$StatefulComponentTestState class _$$StatefulComponentTestState extends _$StatefulComponentTestState with _$StatefulComponentTestStateAccessorsMixin implements StatefulComponentTestState { - _$$StatefulComponentTestState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$StatefulComponentTestState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/builder_integration_tests/unassigned_prop_integration_test.over_react.g.dart b/test/over_react/component_declaration/builder_integration_tests/unassigned_prop_integration_test.over_react.g.dart index 9920a6e77..13831b895 100644 --- a/test/over_react/component_declaration/builder_integration_tests/unassigned_prop_integration_test.over_react.g.dart +++ b/test/over_react/component_declaration/builder_integration_tests/unassigned_prop_integration_test.over_react.g.dart @@ -74,12 +74,17 @@ _$$FooProps _$Foo([Map backingProps]) => new _$$FooProps(backingProps); class _$$FooProps extends _$FooProps with _$FooPropsAccessorsMixin implements FooProps { - _$$FooProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$FooProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/component_type_checking_test/test_a.over_react.g.dart b/test/over_react/component_declaration/component_type_checking_test/test_a.over_react.g.dart index 82beebd50..dc65b6122 100644 --- a/test/over_react/component_declaration/component_type_checking_test/test_a.over_react.g.dart +++ b/test/over_react/component_declaration/component_type_checking_test/test_a.over_react.g.dart @@ -43,12 +43,17 @@ _$$TestAProps _$TestA([Map backingProps]) => new _$$TestAProps(backingProps); class _$$TestAProps extends _$TestAProps with _$TestAPropsAccessorsMixin implements TestAProps { - _$$TestAProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestAProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/component_type_checking_test/test_b.over_react.g.dart b/test/over_react/component_declaration/component_type_checking_test/test_b.over_react.g.dart index ec4654ea3..a3eb3a0e1 100644 --- a/test/over_react/component_declaration/component_type_checking_test/test_b.over_react.g.dart +++ b/test/over_react/component_declaration/component_type_checking_test/test_b.over_react.g.dart @@ -43,12 +43,17 @@ _$$TestBProps _$TestB([Map backingProps]) => new _$$TestBProps(backingProps); class _$$TestBProps extends _$TestBProps with _$TestBPropsAccessorsMixin implements TestBProps { - _$$TestBProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestBProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/component_type_checking_test/type_inheritance/abstract_inheritance/extendedtype.over_react.g.dart b/test/over_react/component_declaration/component_type_checking_test/type_inheritance/abstract_inheritance/extendedtype.over_react.g.dart index 6c7dbaf00..12d545663 100644 --- a/test/over_react/component_declaration/component_type_checking_test/type_inheritance/abstract_inheritance/extendedtype.over_react.g.dart +++ b/test/over_react/component_declaration/component_type_checking_test/type_inheritance/abstract_inheritance/extendedtype.over_react.g.dart @@ -48,12 +48,17 @@ _$$TestExtendtypeProps _$TestExtendtype([Map backingProps]) => class _$$TestExtendtypeProps extends _$TestExtendtypeProps with _$TestExtendtypePropsAccessorsMixin implements TestExtendtypeProps { - _$$TestExtendtypeProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestExtendtypeProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/component_type_checking_test/type_inheritance/parent.over_react.g.dart b/test/over_react/component_declaration/component_type_checking_test/type_inheritance/parent.over_react.g.dart index 9a9276a04..3e5e6f40a 100644 --- a/test/over_react/component_declaration/component_type_checking_test/type_inheritance/parent.over_react.g.dart +++ b/test/over_react/component_declaration/component_type_checking_test/type_inheritance/parent.over_react.g.dart @@ -46,12 +46,17 @@ _$$TestParentProps _$TestParent([Map backingProps]) => class _$$TestParentProps extends _$TestParentProps with _$TestParentPropsAccessorsMixin implements TestParentProps { - _$$TestParentProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestParentProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/component_type_checking_test/type_inheritance/subsubtype.over_react.g.dart b/test/over_react/component_declaration/component_type_checking_test/type_inheritance/subsubtype.over_react.g.dart index ea0b2b127..fc7b69f4d 100644 --- a/test/over_react/component_declaration/component_type_checking_test/type_inheritance/subsubtype.over_react.g.dart +++ b/test/over_react/component_declaration/component_type_checking_test/type_inheritance/subsubtype.over_react.g.dart @@ -48,12 +48,17 @@ _$$TestSubsubtypeProps _$TestSubsubtype([Map backingProps]) => class _$$TestSubsubtypeProps extends _$TestSubsubtypeProps with _$TestSubsubtypePropsAccessorsMixin implements TestSubsubtypeProps { - _$$TestSubsubtypeProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestSubsubtypeProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/component_type_checking_test/type_inheritance/subtype.over_react.g.dart b/test/over_react/component_declaration/component_type_checking_test/type_inheritance/subtype.over_react.g.dart index 929afa8d3..e16ca29b5 100644 --- a/test/over_react/component_declaration/component_type_checking_test/type_inheritance/subtype.over_react.g.dart +++ b/test/over_react/component_declaration/component_type_checking_test/type_inheritance/subtype.over_react.g.dart @@ -47,12 +47,17 @@ _$$TestSubtypeProps _$TestSubtype([Map backingProps]) => class _$$TestSubtypeProps extends _$TestSubtypeProps with _$TestSubtypePropsAccessorsMixin implements TestSubtypeProps { - _$$TestSubtypeProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestSubtypeProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/flux_component_test.over_react.g.dart b/test/over_react/component_declaration/flux_component_test.over_react.g.dart index 7125caa70..a9574437a 100644 --- a/test/over_react/component_declaration/flux_component_test.over_react.g.dart +++ b/test/over_react/component_declaration/flux_component_test.over_react.g.dart @@ -46,12 +46,17 @@ _$$TestBasicProps _$TestBasic([Map backingProps]) => class _$$TestBasicProps extends _$TestBasicProps with _$TestBasicPropsAccessorsMixin implements TestBasicProps { - _$$TestBasicProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestBasicProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -128,12 +133,17 @@ _$$TestHandlerLifecycleProps _$TestHandlerLifecycle([Map backingProps]) => class _$$TestHandlerLifecycleProps extends _$TestHandlerLifecycleProps with _$TestHandlerLifecyclePropsAccessorsMixin implements TestHandlerLifecycleProps { - _$$TestHandlerLifecycleProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestHandlerLifecycleProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -211,13 +221,17 @@ _$$TestHandlerPrecedenceProps _$TestHandlerPrecedence([Map backingProps]) => class _$$TestHandlerPrecedenceProps extends _$TestHandlerPrecedenceProps with _$TestHandlerPrecedencePropsAccessorsMixin implements TestHandlerPrecedenceProps { - _$$TestHandlerPrecedenceProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestHandlerPrecedenceProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -315,12 +329,17 @@ _$$TestPropValidationProps _$TestPropValidation([Map backingProps]) => class _$$TestPropValidationProps extends _$TestPropValidationProps with _$TestPropValidationPropsAccessorsMixin implements TestPropValidationProps { - _$$TestPropValidationProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestPropValidationProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -398,12 +417,17 @@ _$$TestRedrawOnProps _$TestRedrawOn([Map backingProps]) => class _$$TestRedrawOnProps extends _$TestRedrawOnProps with _$TestRedrawOnPropsAccessorsMixin implements TestRedrawOnProps { - _$$TestRedrawOnProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestRedrawOnProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -481,12 +505,17 @@ _$$TestStoreHandlersProps _$TestStoreHandlers([Map backingProps]) => class _$$TestStoreHandlersProps extends _$TestStoreHandlersProps with _$TestStoreHandlersPropsAccessorsMixin implements TestStoreHandlersProps { - _$$TestStoreHandlersProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStoreHandlersProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -564,12 +593,17 @@ _$$TestStatefulBasicProps _$TestStatefulBasic([Map backingProps]) => class _$$TestStatefulBasicProps extends _$TestStatefulBasicProps with _$TestStatefulBasicPropsAccessorsMixin implements TestStatefulBasicProps { - _$$TestStatefulBasicProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulBasicProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -612,12 +646,17 @@ class TestStatefulBasicState extends _$TestStatefulBasicState class _$$TestStatefulBasicState extends _$TestStatefulBasicState with _$TestStatefulBasicStateAccessorsMixin implements TestStatefulBasicState { - _$$TestStatefulBasicState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulBasicState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override @@ -693,13 +732,17 @@ class _$$TestStatefulHandlerLifecycleProps extends _$TestStatefulHandlerLifecycleProps with _$TestStatefulHandlerLifecyclePropsAccessorsMixin implements TestStatefulHandlerLifecycleProps { - _$$TestStatefulHandlerLifecycleProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulHandlerLifecycleProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -744,13 +787,17 @@ class _$$TestStatefulHandlerLifecycleState extends _$TestStatefulHandlerLifecycleState with _$TestStatefulHandlerLifecycleStateAccessorsMixin implements TestStatefulHandlerLifecycleState { - _$$TestStatefulHandlerLifecycleState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulHandlerLifecycleState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override @@ -827,13 +874,17 @@ class _$$TestStatefulHandlerPrecedenceProps extends _$TestStatefulHandlerPrecedenceProps with _$TestStatefulHandlerPrecedencePropsAccessorsMixin implements TestStatefulHandlerPrecedenceProps { - _$$TestStatefulHandlerPrecedenceProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulHandlerPrecedenceProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -878,13 +929,17 @@ class _$$TestStatefulHandlerPrecedenceState extends _$TestStatefulHandlerPrecedenceState with _$TestStatefulHandlerPrecedenceStateAccessorsMixin implements TestStatefulHandlerPrecedenceState { - _$$TestStatefulHandlerPrecedenceState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulHandlerPrecedenceState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override @@ -983,13 +1038,17 @@ class _$$TestStatefulPropValidationProps extends _$TestStatefulPropValidationProps with _$TestStatefulPropValidationPropsAccessorsMixin implements TestStatefulPropValidationProps { - _$$TestStatefulPropValidationProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulPropValidationProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -1033,13 +1092,17 @@ class _$$TestStatefulPropValidationState extends _$TestStatefulPropValidationState with _$TestStatefulPropValidationStateAccessorsMixin implements TestStatefulPropValidationState { - _$$TestStatefulPropValidationState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulPropValidationState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override @@ -1113,12 +1176,17 @@ _$$TestStatefulRedrawOnProps _$TestStatefulRedrawOn([Map backingProps]) => class _$$TestStatefulRedrawOnProps extends _$TestStatefulRedrawOnProps with _$TestStatefulRedrawOnPropsAccessorsMixin implements TestStatefulRedrawOnProps { - _$$TestStatefulRedrawOnProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulRedrawOnProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -1161,12 +1229,17 @@ class TestStatefulRedrawOnState extends _$TestStatefulRedrawOnState class _$$TestStatefulRedrawOnState extends _$TestStatefulRedrawOnState with _$TestStatefulRedrawOnStateAccessorsMixin implements TestStatefulRedrawOnState { - _$$TestStatefulRedrawOnState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulRedrawOnState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override @@ -1240,13 +1313,17 @@ _$$TestStatefulStoreHandlersProps _$TestStatefulStoreHandlers( class _$$TestStatefulStoreHandlersProps extends _$TestStatefulStoreHandlersProps with _$TestStatefulStoreHandlersPropsAccessorsMixin implements TestStatefulStoreHandlersProps { - _$$TestStatefulStoreHandlersProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulStoreHandlersProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -1289,13 +1366,17 @@ class TestStatefulStoreHandlersState extends _$TestStatefulStoreHandlersState class _$$TestStatefulStoreHandlersState extends _$TestStatefulStoreHandlersState with _$TestStatefulStoreHandlersStateAccessorsMixin implements TestStatefulStoreHandlersState { - _$$TestStatefulStoreHandlersState(Map backingMap) - : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestStatefulStoreHandlersState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/test/over_react/component_declaration/redux_component_test.over_react.g.dart b/test/over_react/component_declaration/redux_component_test.over_react.g.dart index 50b6701e2..4d12a3192 100644 --- a/test/over_react/component_declaration/redux_component_test.over_react.g.dart +++ b/test/over_react/component_declaration/redux_component_test.over_react.g.dart @@ -46,12 +46,17 @@ _$$TestDefaultProps _$TestDefault([Map backingProps]) => class _$$TestDefaultProps extends _$TestDefaultProps with _$TestDefaultPropsAccessorsMixin implements TestDefaultProps { - _$$TestDefaultProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestDefaultProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -128,12 +133,17 @@ _$$TestConnectProps _$TestConnect([Map backingProps]) => class _$$TestConnectProps extends _$TestConnectProps with _$TestConnectPropsAccessorsMixin implements TestConnectProps { - _$$TestConnectProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestConnectProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -209,12 +219,17 @@ _$$TestPureProps _$TestPure([Map backingProps]) => class _$$TestPureProps extends _$TestPureProps with _$TestPurePropsAccessorsMixin implements TestPureProps { - _$$TestPureProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestPureProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/dom/fixtures/dummy_composite_component.over_react.g.dart b/test/over_react/dom/fixtures/dummy_composite_component.over_react.g.dart index 018662f65..3071599aa 100644 --- a/test/over_react/dom/fixtures/dummy_composite_component.over_react.g.dart +++ b/test/over_react/dom/fixtures/dummy_composite_component.over_react.g.dart @@ -106,13 +106,17 @@ _$$TestCompositeComponentProps _$TestCompositeComponent([Map backingProps]) => class _$$TestCompositeComponentProps extends _$TestCompositeComponentProps with _$TestCompositeComponentPropsAccessorsMixin implements TestCompositeComponentProps { - _$$TestCompositeComponentProps(Map backingMap) - : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestCompositeComponentProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/util/dom_util_test.over_react.g.dart b/test/over_react/util/dom_util_test.over_react.g.dart index d25c50167..cede73bab 100644 --- a/test/over_react/util/dom_util_test.over_react.g.dart +++ b/test/over_react/util/dom_util_test.over_react.g.dart @@ -45,12 +45,17 @@ _$$DomTestProps _$DomTest([Map backingProps]) => class _$$DomTestProps extends _$DomTestProps with _$DomTestPropsAccessorsMixin implements DomTestProps { - _$$DomTestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$DomTestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react/util/prop_key_util_test_dart2.over_react.g.dart b/test/over_react/util/prop_key_util_test_dart2.over_react.g.dart index a2680a96b..7ad0ffa12 100644 --- a/test/over_react/util/prop_key_util_test_dart2.over_react.g.dart +++ b/test/over_react/util/prop_key_util_test_dart2.over_react.g.dart @@ -72,12 +72,17 @@ _$$TestProps _$Test([Map backingProps]) => new _$$TestProps(backingProps); class _$$TestProps extends _$TestProps with _$TestPropsAccessorsMixin implements TestProps { - _$$TestProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TestProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/over_react_component_declaration_test.dart b/test/over_react_component_declaration_test.dart index 2ddac88a5..d6be011e0 100644 --- a/test/over_react_component_declaration_test.dart +++ b/test/over_react_component_declaration_test.dart @@ -35,6 +35,7 @@ import 'over_react/component_declaration/builder_integration_tests/component_int import 'over_react/component_declaration/builder_integration_tests/constant_required_accessor_integration_test.dart' as constant_required_accessor_integration_test; import 'over_react/component_declaration/builder_integration_tests/do_not_generate_accessor_integration_test.dart' as do_not_generate_accessor_integration_test; import 'over_react/component_declaration/builder_integration_tests/namespaced_accessor_integration_test.dart' as namespaced_accessor_integration_test; +import 'over_react/component_declaration/builder_integration_tests/private_props_ddc_bug.dart' as private_props_ddc_bug; import 'over_react/component_declaration/builder_integration_tests/required_accessor_integration_test.dart' as required_accessor_integration_test; import 'over_react/component_declaration/builder_integration_tests/stateful_component_integration_test.dart' as stateful_component_integration_test; import 'over_react/component_declaration/builder_integration_tests/unassigned_prop_integration_test.dart' as unassigned_prop_integration_test; @@ -44,6 +45,7 @@ import 'over_react/component_declaration/builder_integration_tests/backwards_com import 'over_react/component_declaration/builder_integration_tests/backwards_compatible/constant_required_accessor_integration_test.dart' as backwards_compat_constant_required_accessor_integration_test; import 'over_react/component_declaration/builder_integration_tests/backwards_compatible/do_not_generate_accessor_integration_test.dart' as backwards_compat_do_not_generate_accessor_integration_test; import 'over_react/component_declaration/builder_integration_tests/backwards_compatible/namespaced_accessor_integration_test.dart' as backwards_compat_namespaced_accessor_integration_test; +import 'over_react/component_declaration/builder_integration_tests/backwards_compatible/private_props_ddc_bug.dart' as backwards_compat_private_props_ddc_bug; import 'over_react/component_declaration/builder_integration_tests/backwards_compatible/required_accessor_integration_test.dart' as backwards_compat_required_accessor_integration_test; import 'over_react/component_declaration/builder_integration_tests/backwards_compatible/stateful_component_integration_test.dart' as backwards_compat_stateful_component_integration_test; import 'over_react/component_declaration/builder_integration_tests/backwards_compatible/unassigned_prop_integration_test.dart' as backwards_compat_unassigned_prop_integration_test; @@ -66,15 +68,17 @@ main() { constant_required_accessor_integration_test.main(); do_not_generate_accessor_integration_test.main(); namespaced_accessor_integration_test.main(); + private_props_ddc_bug.main(); required_accessor_integration_test.main(); stateful_component_integration_test.main(); unassigned_prop_integration_test.main(); backwards_compat_abstract_accessor_integration_test.main(); backwards_compat_accessor_mixin_integration_test.main(); + backwards_compat_do_not_generate_accessor_integration_test.main(); backwards_compat_component_integration_test.main(); backwards_compat_constant_required_accessor_integration_test.main(); - backwards_compat_do_not_generate_accessor_integration_test.main(); + backwards_compat_private_props_ddc_bug.main(); backwards_compat_namespaced_accessor_integration_test.main(); backwards_compat_required_accessor_integration_test.main(); backwards_compat_stateful_component_integration_test.main(); diff --git a/test/test_util/one_level_wrapper.over_react.g.dart b/test/test_util/one_level_wrapper.over_react.g.dart index ce37f984d..96385c530 100644 --- a/test/test_util/one_level_wrapper.over_react.g.dart +++ b/test/test_util/one_level_wrapper.over_react.g.dart @@ -47,12 +47,17 @@ _$$OneLevelWrapperProps _$OneLevelWrapper([Map backingProps]) => class _$$OneLevelWrapperProps extends _$OneLevelWrapperProps with _$OneLevelWrapperPropsAccessorsMixin implements OneLevelWrapperProps { - _$$OneLevelWrapperProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$OneLevelWrapperProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/test_util/two_level_wrapper.over_react.g.dart b/test/test_util/two_level_wrapper.over_react.g.dart index 87bf2b4a5..5bc510795 100644 --- a/test/test_util/two_level_wrapper.over_react.g.dart +++ b/test/test_util/two_level_wrapper.over_react.g.dart @@ -47,12 +47,17 @@ _$$TwoLevelWrapperProps _$TwoLevelWrapper([Map backingProps]) => class _$$TwoLevelWrapperProps extends _$TwoLevelWrapperProps with _$TwoLevelWrapperPropsAccessorsMixin implements TwoLevelWrapperProps { - _$$TwoLevelWrapperProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TwoLevelWrapperProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test/vm_tests/builder/impl_generation_test.dart b/test/vm_tests/builder/impl_generation_test.dart index 54f6d42b6..7e933a9bf 100644 --- a/test/vm_tests/builder/impl_generation_test.dart +++ b/test/vm_tests/builder/impl_generation_test.dart @@ -340,6 +340,7 @@ main() { group('and creates concrete props implementation', () { void testConcretePropsGeneration(String testName, OverReactSrc ors) { group(testName, () { + setUp(() { generateFromSource(ors.source); }); @@ -354,14 +355,16 @@ main() { test('with the correct constructor', () { expect(implGenerator.outputContentsBuffer.toString(), contains( - ' _\$\$${ors.baseName}Props(Map backingMap) : this._props = backingMap ?? {};\n')); + ' _\$\$${ors.baseName}Props(Map backingMap) : this._props = {} {\n' + ' this._props = backingMap ?? {};\n' + ' }')); }); test('with props backing map getter', () { expect(implGenerator.outputContentsBuffer.toString(), contains( ' @override\n' ' Map get props => _props;\n' - ' final Map _props;')); + ' Map _props;')); }); test('overrides `\$isClassGenerated` to return `true`', () { @@ -424,14 +427,16 @@ main() { test('with the correct constructor', () { expect(implGenerator.outputContentsBuffer.toString(), contains( - ' _\$\$${ors.baseName}State(Map backingMap) : this._state = backingMap ?? {};\n')); + ' _\$\$${ors.baseName}State(Map backingMap) : this._state = {} {\n' + ' this._state = backingMap ?? {};\n' + ' }')); }); test('with state backing map getter', () { expect(implGenerator.outputContentsBuffer.toString(), contains( ' @override\n' ' Map get state => _state;\n' - ' final Map _state;')); + ' Map _state;')); }); test('overrides `\$isClassGenerated` to return `true`', () { diff --git a/test_fixtures/gold_output_files/backwards_compatible/basic.over_react.g.dart.goldFile b/test_fixtures/gold_output_files/backwards_compatible/basic.over_react.g.dart.goldFile index cd9ac7e81..e8c641bbb 100644 --- a/test_fixtures/gold_output_files/backwards_compatible/basic.over_react.g.dart.goldFile +++ b/test_fixtures/gold_output_files/backwards_compatible/basic.over_react.g.dart.goldFile @@ -128,12 +128,17 @@ _$$BasicProps _$Basic([Map backingProps]) => new _$$BasicProps(backingProps); class _$$BasicProps extends _$BasicProps with _$BasicPropsAccessorsMixin implements BasicProps { - _$$BasicProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test_fixtures/gold_output_files/backwards_compatible/basic_library.over_react.g.dart.goldFile b/test_fixtures/gold_output_files/backwards_compatible/basic_library.over_react.g.dart.goldFile index 846eb3dd6..62c68ca4f 100644 --- a/test_fixtures/gold_output_files/backwards_compatible/basic_library.over_react.g.dart.goldFile +++ b/test_fixtures/gold_output_files/backwards_compatible/basic_library.over_react.g.dart.goldFile @@ -139,12 +139,17 @@ _$$BasicPartOfLibProps _$BasicPartOfLib([Map backingProps]) => class _$$BasicPartOfLibProps extends _$BasicPartOfLibProps with _$BasicPartOfLibPropsAccessorsMixin implements BasicPartOfLibProps { - _$$BasicPartOfLibProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicPartOfLibProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -199,12 +204,17 @@ const StateMeta _$metaForBasicPartOfLibState = const StateMeta( class _$$BasicPartOfLibState extends _$BasicPartOfLibState with _$BasicPartOfLibStateAccessorsMixin implements BasicPartOfLibState { - _$$BasicPartOfLibState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicPartOfLibState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override @@ -289,12 +299,17 @@ _$$SubPartOfLibProps _$SubPartOfLib([Map backingProps]) => class _$$SubPartOfLibProps extends _$SubPartOfLibProps with _$SubPartOfLibPropsAccessorsMixin implements SubPartOfLibProps { - _$$SubPartOfLibProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$SubPartOfLibProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test_fixtures/gold_output_files/basic.over_react.g.dart.goldFile b/test_fixtures/gold_output_files/basic.over_react.g.dart.goldFile index 256b075b7..31a3c16e6 100644 --- a/test_fixtures/gold_output_files/basic.over_react.g.dart.goldFile +++ b/test_fixtures/gold_output_files/basic.over_react.g.dart.goldFile @@ -134,12 +134,17 @@ _$$BasicProps _$Basic([Map backingProps]) => new _$$BasicProps(backingProps); class _$$BasicProps extends _$BasicProps with _$BasicPropsAccessorsMixin implements BasicProps { - _$$BasicProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/test_fixtures/gold_output_files/basic_library.over_react.g.dart.goldFile b/test_fixtures/gold_output_files/basic_library.over_react.g.dart.goldFile index 0c75b0cb3..1978c2106 100644 --- a/test_fixtures/gold_output_files/basic_library.over_react.g.dart.goldFile +++ b/test_fixtures/gold_output_files/basic_library.over_react.g.dart.goldFile @@ -144,12 +144,17 @@ _$$BasicPartOfLibProps _$BasicPartOfLib([Map backingProps]) => class _$$BasicPartOfLibProps extends _$BasicPartOfLibProps with _$BasicPartOfLibPropsAccessorsMixin implements BasicPartOfLibProps { - _$$BasicPartOfLibProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicPartOfLibProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -209,12 +214,17 @@ class BasicPartOfLibState extends _$BasicPartOfLibState class _$$BasicPartOfLibState extends _$BasicPartOfLibState with _$BasicPartOfLibStateAccessorsMixin implements BasicPartOfLibState { - _$$BasicPartOfLibState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$BasicPartOfLibState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override @@ -304,12 +314,17 @@ _$$SubPartOfLibProps _$SubPartOfLib([Map backingProps]) => class _$$SubPartOfLibProps extends _$SubPartOfLibProps with _$SubPartOfLibPropsAccessorsMixin implements SubPartOfLibProps { - _$$SubPartOfLibProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$SubPartOfLibProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/web/src/demo_components/button.over_react.g.dart b/web/src/demo_components/button.over_react.g.dart index f8de8763f..52f80a87b 100644 --- a/web/src/demo_components/button.over_react.g.dart +++ b/web/src/demo_components/button.over_react.g.dart @@ -162,12 +162,17 @@ _$$ButtonProps _$Button([Map backingProps]) => new _$$ButtonProps(backingProps); class _$$ButtonProps extends _$ButtonProps with _$ButtonPropsAccessorsMixin implements ButtonProps { - _$$ButtonProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ButtonProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -207,12 +212,17 @@ class ButtonState extends _$ButtonState with _$ButtonStateAccessorsMixin { class _$$ButtonState extends _$ButtonState with _$ButtonStateAccessorsMixin implements ButtonState { - _$$ButtonState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ButtonState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/web/src/demo_components/button_group.over_react.g.dart b/web/src/demo_components/button_group.over_react.g.dart index 74ff7840a..59d97bd28 100644 --- a/web/src/demo_components/button_group.over_react.g.dart +++ b/web/src/demo_components/button_group.over_react.g.dart @@ -92,12 +92,17 @@ _$$ButtonGroupProps _$ButtonGroup([Map backingProps]) => class _$$ButtonGroupProps extends _$ButtonGroupProps with _$ButtonGroupPropsAccessorsMixin implements ButtonGroupProps { - _$$ButtonGroupProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ButtonGroupProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -139,12 +144,17 @@ class ButtonGroupState extends _$ButtonGroupState class _$$ButtonGroupState extends _$ButtonGroupState with _$ButtonGroupStateAccessorsMixin implements ButtonGroupState { - _$$ButtonGroupState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ButtonGroupState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/web/src/demo_components/list_group.over_react.g.dart b/web/src/demo_components/list_group.over_react.g.dart index 5e123b75f..09d8f9c5b 100644 --- a/web/src/demo_components/list_group.over_react.g.dart +++ b/web/src/demo_components/list_group.over_react.g.dart @@ -63,12 +63,17 @@ _$$ListGroupProps _$ListGroup([Map backingProps]) => class _$$ListGroupProps extends _$ListGroupProps with _$ListGroupPropsAccessorsMixin implements ListGroupProps { - _$$ListGroupProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ListGroupProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/web/src/demo_components/list_group_item.over_react.g.dart b/web/src/demo_components/list_group_item.over_react.g.dart index 4e24a7aaf..ed0b37ebe 100644 --- a/web/src/demo_components/list_group_item.over_react.g.dart +++ b/web/src/demo_components/list_group_item.over_react.g.dart @@ -210,12 +210,17 @@ _$$ListGroupItemProps _$ListGroupItem([Map backingProps]) => class _$$ListGroupItemProps extends _$ListGroupItemProps with _$ListGroupItemPropsAccessorsMixin implements ListGroupItemProps { - _$$ListGroupItemProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ListGroupItemProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/web/src/demo_components/progress.over_react.g.dart b/web/src/demo_components/progress.over_react.g.dart index 60a2bcffd..af15a8ec8 100644 --- a/web/src/demo_components/progress.over_react.g.dart +++ b/web/src/demo_components/progress.over_react.g.dart @@ -211,12 +211,17 @@ _$$ProgressProps _$Progress([Map backingProps]) => class _$$ProgressProps extends _$ProgressProps with _$ProgressPropsAccessorsMixin implements ProgressProps { - _$$ProgressProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ProgressProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -269,12 +274,17 @@ class ProgressState extends _$ProgressState with _$ProgressStateAccessorsMixin { class _$$ProgressState extends _$ProgressState with _$ProgressStateAccessorsMixin implements ProgressState { - _$$ProgressState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ProgressState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/web/src/demo_components/tag.over_react.g.dart b/web/src/demo_components/tag.over_react.g.dart index faa6067e6..309405652 100644 --- a/web/src/demo_components/tag.over_react.g.dart +++ b/web/src/demo_components/tag.over_react.g.dart @@ -72,12 +72,17 @@ _$$TagProps _$Tag([Map backingProps]) => new _$$TagProps(backingProps); class _$$TagProps extends _$TagProps with _$TagPropsAccessorsMixin implements TagProps { - _$$TagProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$TagProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override diff --git a/web/src/demo_components/toggle_button.over_react.g.dart b/web/src/demo_components/toggle_button.over_react.g.dart index ed734479b..5813a21f9 100644 --- a/web/src/demo_components/toggle_button.over_react.g.dart +++ b/web/src/demo_components/toggle_button.over_react.g.dart @@ -100,12 +100,17 @@ _$$ToggleButtonProps _$ToggleButton([Map backingProps]) => class _$$ToggleButtonProps extends _$ToggleButtonProps with _$ToggleButtonPropsAccessorsMixin implements ToggleButtonProps { - _$$ToggleButtonProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ToggleButtonProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -181,12 +186,17 @@ class ToggleButtonState extends _$ToggleButtonState class _$$ToggleButtonState extends _$ToggleButtonState with _$ToggleButtonStateAccessorsMixin implements ToggleButtonState { - _$$ToggleButtonState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ToggleButtonState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override diff --git a/web/src/demo_components/toggle_button_group.over_react.g.dart b/web/src/demo_components/toggle_button_group.over_react.g.dart index dba542748..8f3a3cbd3 100644 --- a/web/src/demo_components/toggle_button_group.over_react.g.dart +++ b/web/src/demo_components/toggle_button_group.over_react.g.dart @@ -48,12 +48,17 @@ _$$ToggleButtonGroupProps _$ToggleButtonGroup([Map backingProps]) => class _$$ToggleButtonGroupProps extends _$ToggleButtonGroupProps with _$ToggleButtonGroupPropsAccessorsMixin implements ToggleButtonGroupProps { - _$$ToggleButtonGroupProps(Map backingMap) : this._props = backingMap ?? {}; + // This initializer of `_props` to an empty map, as well as the reassignment + // of `_props` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ToggleButtonGroupProps(Map backingMap) : this._props = {} { + this._props = backingMap ?? {}; + } /// The backing props map proxied by this class. @override Map get props => _props; - final Map _props; + Map _props; /// Let [UiProps] internals know that this class has been generated. @override @@ -96,12 +101,17 @@ class ToggleButtonGroupState extends _$ToggleButtonGroupState class _$$ToggleButtonGroupState extends _$ToggleButtonGroupState with _$ToggleButtonGroupStateAccessorsMixin implements ToggleButtonGroupState { - _$$ToggleButtonGroupState(Map backingMap) : this._state = backingMap ?? {}; + // This initializer of `_state` to an empty map, as well as the reassignment + // of `_state` in the constructor body is necessary to work around an unknown ddc issue. + // See for more details + _$$ToggleButtonGroupState(Map backingMap) : this._state = {} { + this._state = backingMap ?? {}; + } /// The backing state map proxied by this class. @override Map get state => _state; - final Map _state; + Map _state; /// Let [UiState] internals know that this class has been generated. @override