@@ -18,7 +18,7 @@ abstract class Built<V extends Built<V, B>, B extends Builder<V, B>> {
1818 ///
1919 /// The implementation of this method will be generated for you by the
2020 /// built_value generator.
21- V rebuild (Function (B ) updates);
21+ V rebuild (void Function (B ) updates);
2222
2323 /// Converts the instance to a builder [B] .
2424 ///
@@ -43,7 +43,7 @@ abstract class Builder<V extends Built<V, B>, B extends Builder<V, B>> {
4343 /// Applies updates.
4444 ///
4545 /// [updates] is a function that takes a builder [B] .
46- void update (Function (B )? updates);
46+ void update (void Function (B )? updates);
4747
4848 /// Builds.
4949 ///
@@ -117,15 +117,16 @@ class BuiltValue {
117117 /// to serialize with `@BuiltValueField(serialize: true)` .
118118 final bool defaultSerialize;
119119
120- const BuiltValue (
121- {this .instantiable = true ,
122- this .nestedBuilders = true ,
123- this .autoCreateNestedBuilders = true ,
124- this .comparableBuilders = false ,
125- this .generateBuilderOnSetField = false ,
126- this .wireName,
127- this .defaultCompare = true ,
128- this .defaultSerialize = true });
120+ const BuiltValue ({
121+ this .instantiable = true ,
122+ this .nestedBuilders = true ,
123+ this .autoCreateNestedBuilders = true ,
124+ this .comparableBuilders = false ,
125+ this .generateBuilderOnSetField = false ,
126+ this .wireName,
127+ this .defaultCompare = true ,
128+ this .defaultSerialize = true ,
129+ });
129130}
130131
131132/// Annotation that was used to mark nullable Built Value fields.
@@ -156,20 +157,23 @@ class BuiltValueField {
156157 /// indicates the name is to be taken from the literal field name.
157158 final String ? wireName;
158159
159- /// Whether the field overrides the `nestedBuilders` setting from the class. Defaults to `null` which
160- /// indicates the setting is to be taken from the `nestedBuilders` setting on the class.
160+ /// Whether the field overrides the `nestedBuilders` setting from the class.
161+ /// Defaults to `null` which indicates the setting is to be taken from the
162+ /// `nestedBuilders` setting on the class.
161163 final bool ? nestedBuilder;
162164
163- /// Whether the field overrides the `autoCreateNestedBuilders` setting from the class. Defaults to `null` which
164- /// indicates the setting is to be taken from the `autoCreateNestedBuilders` setting on the class.
165+ /// Whether the field overrides the `autoCreateNestedBuilders` setting from
166+ /// the class. Defaults to `null` which indicates the setting is to be taken
167+ /// from the `autoCreateNestedBuilders` setting on the class.
165168 final bool ? autoCreateNestedBuilder;
166169
167- const BuiltValueField (
168- {this .compare,
169- this .serialize,
170- this .wireName,
171- this .nestedBuilder,
172- this .autoCreateNestedBuilder});
170+ const BuiltValueField ({
171+ this .compare,
172+ this .serialize,
173+ this .wireName,
174+ this .nestedBuilder,
175+ this .autoCreateNestedBuilder,
176+ });
173177}
174178
175179/// Optionally, annotate a Built Value `Serializer` getters with this to
@@ -187,8 +191,10 @@ class BuiltValueSerializer {
187191
188192 final bool serializeNulls;
189193
190- const BuiltValueSerializer (
191- {this .custom = false , this .serializeNulls = false });
194+ const BuiltValueSerializer ({
195+ this .custom = false ,
196+ this .serializeNulls = false ,
197+ });
192198}
193199
194200/// Memoized annotation for Built Value getters.
@@ -235,8 +241,11 @@ class BuiltValueEnumConst {
235241 /// the fallback, if available, rather than throwing an exception.
236242 final bool fallback;
237243
238- const BuiltValueEnumConst (
239- {this .wireName, this .wireNumber, this .fallback = false });
244+ const BuiltValueEnumConst ({
245+ this .wireName,
246+ this .wireNumber,
247+ this .fallback = false ,
248+ });
240249}
241250
242251/// Optionally, annotate methods with this to cause them to be called by
@@ -275,8 +284,10 @@ class BuiltValueHook {
275284 /// ```
276285 final bool finalizeBuilder;
277286
278- const BuiltValueHook (
279- {this .initializeBuilder = false , this .finalizeBuilder = false });
287+ const BuiltValueHook ({
288+ this .initializeBuilder = false ,
289+ this .finalizeBuilder = false ,
290+ });
280291}
281292
282293/// Enum Class base class.
@@ -319,7 +330,7 @@ typedef BuiltValueToStringHelperProvider = BuiltValueToStringHelper Function(
319330/// are [IndentingBuiltValueToStringHelper] , which is the default, and
320331/// [FlatBuiltValueToStringHelper] .
321332BuiltValueToStringHelperProvider newBuiltValueToStringHelper =
322- ( String className) => IndentingBuiltValueToStringHelper (className) ;
333+ IndentingBuiltValueToStringHelper . new ;
323334
324335/// Interface for built_value toString() output helpers.
325336///
@@ -422,7 +433,8 @@ class BuiltValueNullFieldError extends Error {
422433
423434 @override
424435 String toString () =>
425- 'Tried to construct class "$type " with null for non-nullable field "$field ".' ;
436+ 'Tried to construct class "$type " with null for non-nullable field '
437+ '"$field ".' ;
426438}
427439
428440/// [Error] indicating that a built_value class constructor was called with
0 commit comments