Skip to content

Commit 1bd6c52

Browse files
Update gold files
1 parent de8bcce commit 1bd6c52

13 files changed

Lines changed: 189 additions & 890 deletions

test_fixtures/gold_output_files/backwards_compatible/basic.over_react.g.dart.goldFile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,11 @@ _$$BasicProps _$Basic([Map backingProps]) => _$$BasicProps(backingProps);
130130
class _$$BasicProps extends _$BasicProps
131131
with _$BasicPropsAccessorsMixin
132132
implements BasicProps {
133-
// This initializer of `_props` to an empty map, as well as the reassignment
134-
// of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
135-
_$$BasicProps(Map backingMap) : this._props = {} {
136-
this._props = backingMap ?? {};
137-
}
133+
_$$BasicProps([Map backingMap]) : this.props = backingMap ?? JsBackedMap();
138134

139135
/// The backing props map proxied by this class.
140136
@override
141-
Map get props => _props;
142-
Map _props;
137+
final Map props;
143138

144139
/// Let `UiProps` internals know that this class has been generated.
145140
@override

test_fixtures/gold_output_files/backwards_compatible/basic_library.over_react.g.dart.goldFile

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,12 @@ _$$BasicPartOfLibProps _$BasicPartOfLib([Map backingProps]) =>
144144
class _$$BasicPartOfLibProps extends _$BasicPartOfLibProps
145145
with _$BasicPartOfLibPropsAccessorsMixin
146146
implements BasicPartOfLibProps {
147-
// This initializer of `_props` to an empty map, as well as the reassignment
148-
// of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
149-
_$$BasicPartOfLibProps(Map backingMap) : this._props = {} {
150-
this._props = backingMap ?? {};
151-
}
147+
_$$BasicPartOfLibProps([Map backingMap])
148+
: this.props = backingMap ?? JsBackedMap();
152149

153150
/// The backing props map proxied by this class.
154151
@override
155-
Map get props => _props;
156-
Map _props;
152+
final Map props;
157153

158154
/// Let `UiProps` internals know that this class has been generated.
159155
@override
@@ -224,16 +220,12 @@ const StateMeta _$metaForBasicPartOfLibState = StateMeta(
224220
class _$$BasicPartOfLibState extends _$BasicPartOfLibState
225221
with _$BasicPartOfLibStateAccessorsMixin
226222
implements BasicPartOfLibState {
227-
// This initializer of `_state` to an empty map, as well as the reassignment
228-
// of `_state` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
229-
_$$BasicPartOfLibState(Map backingMap) : this._state = {} {
230-
this._state = backingMap ?? {};
231-
}
223+
_$$BasicPartOfLibState([Map backingMap])
224+
: this.state = backingMap ?? JsBackedMap();
232225

233226
/// The backing state map proxied by this class.
234227
@override
235-
Map get state => _state;
236-
Map _state;
228+
final Map state;
237229

238230
/// Let `UiState` internals know that this class has been generated.
239231
@override
@@ -318,16 +310,12 @@ _$$SubPartOfLibProps _$SubPartOfLib([Map backingProps]) =>
318310
class _$$SubPartOfLibProps extends _$SubPartOfLibProps
319311
with _$SubPartOfLibPropsAccessorsMixin
320312
implements SubPartOfLibProps {
321-
// This initializer of `_props` to an empty map, as well as the reassignment
322-
// of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
323-
_$$SubPartOfLibProps(Map backingMap) : this._props = {} {
324-
this._props = backingMap ?? {};
325-
}
313+
_$$SubPartOfLibProps([Map backingMap])
314+
: this.props = backingMap ?? JsBackedMap();
326315

327316
/// The backing props map proxied by this class.
328317
@override
329-
Map get props => _props;
330-
Map _props;
318+
final Map props;
331319

332320
/// Let `UiProps` internals know that this class has been generated.
333321
@override

test_fixtures/gold_output_files/dart2_only/basic.over_react.g.dart.goldFile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,11 @@ _$$BasicProps _$Basic([Map backingProps]) => _$$BasicProps(backingProps);
138138
class _$$BasicProps extends _$BasicProps
139139
with _$BasicPropsAccessorsMixin
140140
implements BasicProps {
141-
// This initializer of `_props` to an empty map, as well as the reassignment
142-
// of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
143-
_$$BasicProps(Map backingMap) : this._props = {} {
144-
this._props = backingMap ?? {};
145-
}
141+
_$$BasicProps([Map backingMap]) : this.props = backingMap ?? JsBackedMap();
146142

147143
/// The backing props map proxied by this class.
148144
@override
149-
Map get props => _props;
150-
Map _props;
145+
final Map props;
151146

152147
/// Let `UiProps` internals know that this class has been generated.
153148
@override

test_fixtures/gold_output_files/dart2_only/basic_library.over_react.g.dart.goldFile

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,12 @@ _$$BasicPartOfLibProps _$BasicPartOfLib([Map backingProps]) =>
149149
class _$$BasicPartOfLibProps extends _$BasicPartOfLibProps
150150
with _$BasicPartOfLibPropsAccessorsMixin
151151
implements BasicPartOfLibProps {
152-
// This initializer of `_props` to an empty map, as well as the reassignment
153-
// of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
154-
_$$BasicPartOfLibProps(Map backingMap) : this._props = {} {
155-
this._props = backingMap ?? {};
156-
}
152+
_$$BasicPartOfLibProps([Map backingMap])
153+
: this.props = backingMap ?? JsBackedMap();
157154

158155
/// The backing props map proxied by this class.
159156
@override
160-
Map get props => _props;
161-
Map _props;
157+
final Map props;
162158

163159
/// Let `UiProps` internals know that this class has been generated.
164160
@override
@@ -234,16 +230,12 @@ class BasicPartOfLibState extends _$BasicPartOfLibState
234230
class _$$BasicPartOfLibState extends _$BasicPartOfLibState
235231
with _$BasicPartOfLibStateAccessorsMixin
236232
implements BasicPartOfLibState {
237-
// This initializer of `_state` to an empty map, as well as the reassignment
238-
// of `_state` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
239-
_$$BasicPartOfLibState(Map backingMap) : this._state = {} {
240-
this._state = backingMap ?? {};
241-
}
233+
_$$BasicPartOfLibState([Map backingMap])
234+
: this.state = backingMap ?? JsBackedMap();
242235

243236
/// The backing state map proxied by this class.
244237
@override
245-
Map get state => _state;
246-
Map _state;
238+
final Map state;
247239

248240
/// Let `UiState` internals know that this class has been generated.
249241
@override
@@ -333,16 +325,12 @@ _$$SubPartOfLibProps _$SubPartOfLib([Map backingProps]) =>
333325
class _$$SubPartOfLibProps extends _$SubPartOfLibProps
334326
with _$SubPartOfLibPropsAccessorsMixin
335327
implements SubPartOfLibProps {
336-
// This initializer of `_props` to an empty map, as well as the reassignment
337-
// of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
338-
_$$SubPartOfLibProps(Map backingMap) : this._props = {} {
339-
this._props = backingMap ?? {};
340-
}
328+
_$$SubPartOfLibProps([Map backingMap])
329+
: this.props = backingMap ?? JsBackedMap();
341330

342331
/// The backing props map proxied by this class.
343332
@override
344-
Map get props => _props;
345-
Map _props;
333+
final Map props;
346334

347335
/// Let `UiProps` internals know that this class has been generated.
348336
@override

test_fixtures/gold_output_files/dart2_only/component2/basic.over_react.g.dart.goldFile

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,19 @@ class BasicProps extends _$BasicProps with _$BasicPropsAccessorsMixin {
128128
static const PropsMeta meta = _$metaForBasicProps;
129129
}
130130

131-
_$$BasicProps _$Basic([Map backingProps]) => backingProps == null
132-
? _$$BasicProps$JsMap(JsBackedMap())
133-
: _$$BasicProps(backingProps);
131+
_$$BasicProps _$Basic([Map backingProps]) => _$$BasicProps(backingProps);
134132

135133
// Concrete props implementation.
136134
//
137135
// Implements constructor and backing map, and links up to generated component factory.
138-
abstract class _$$BasicProps extends _$BasicProps
136+
class _$$BasicProps extends _$BasicProps
139137
with _$BasicPropsAccessorsMixin
140138
implements BasicProps {
141-
_$$BasicProps._();
142-
143-
factory _$$BasicProps(Map backingMap) {
144-
if (backingMap == null || backingMap is JsBackedMap) {
145-
return _$$BasicProps$JsMap(backingMap as JsBackedMap);
146-
} else {
147-
return _$$BasicProps$PlainMap(backingMap);
148-
}
149-
}
139+
_$$BasicProps([Map backingMap]) : this.props = backingMap ?? JsBackedMap();
140+
141+
/// The backing props map proxied by this class.
142+
@override
143+
final Map props;
150144

151145
/// Let `UiProps` internals know that this class has been generated.
152146
@override
@@ -180,48 +174,15 @@ abstract class _$$BasicProps extends _$BasicProps
180174
/// without being shadowed by the `getPropKey` instance extension member.
181175
const _$getPropKey$_$$BasicProps = getPropKey;
182176

183-
// Concrete props implementation that can be backed by any [Map].
184-
class _$$BasicProps$PlainMap extends _$$BasicProps {
185-
// This initializer of `_props` to an empty map, as well as the reassignment
186-
// of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
187-
_$$BasicProps$PlainMap(Map backingMap)
188-
: this._props = {},
189-
super._() {
190-
this._props = backingMap ?? {};
191-
}
192-
193-
/// The backing props map proxied by this class.
194-
@override
195-
Map get props => _props;
196-
Map _props;
197-
}
198-
199-
// Concrete props implementation that can only be backed by [JsMap],
200-
// allowing dart2js to compile more optimal code for key-value pair reads/writes.
201-
class _$$BasicProps$JsMap extends _$$BasicProps {
202-
// This initializer of `_props` to an empty map, as well as the reassignment
203-
// of `_props` in the constructor body is necessary to work around a DDC bug: https://github.com/dart-lang/sdk/issues/36217
204-
_$$BasicProps$JsMap(JsBackedMap backingMap)
205-
: this._props = JsBackedMap(),
206-
super._() {
207-
this._props = backingMap ?? JsBackedMap();
208-
}
209-
210-
/// The backing props map proxied by this class.
211-
@override
212-
JsBackedMap get props => _props;
213-
JsBackedMap _props;
214-
}
215-
216177
// Concrete component implementation mixin.
217178
//
218179
// Implements typed props/state factories, defaults `consumedPropKeys` to the keys
219180
// generated for the associated props class.
220181
class _$Basic2Component extends Basic2Component {
221-
_$$BasicProps$JsMap _cachedTypedProps;
182+
_$$BasicProps _cachedTypedProps;
222183

223184
@override
224-
_$$BasicProps$JsMap get props => _cachedTypedProps;
185+
_$$BasicProps get props => _cachedTypedProps;
225186

226187
@override
227188
set props(Map value) {
@@ -238,8 +199,8 @@ class _$Basic2Component extends Basic2Component {
238199
}
239200

240201
@override
241-
_$$BasicProps$JsMap typedPropsFactoryJs(JsBackedMap backingMap) =>
242-
_$$BasicProps$JsMap(backingMap);
202+
_$$BasicProps typedPropsFactoryJs(JsBackedMap backingMap) =>
203+
_$$BasicProps(backingMap);
243204

244205
@override
245206
_$$BasicProps typedPropsFactory(Map backingMap) => _$$BasicProps(backingMap);

0 commit comments

Comments
 (0)