From 63f5a19c3027156297efd36805acd18d4e0437a5 Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Thu, 14 Oct 2021 13:11:30 +0200 Subject: [PATCH] Makes `rebuild` take a void function. It's not very clear whether a value returned by the `updates` parameter to `rebuild` means anything. All examples use `=>` notation which returns the builder. The return type is currently `dynamic`, which *suggests* that the value is used for something, potentially something which cannot even be typed. Marking the parameter as a `void` returning function makes it clear that you should not worry about the return value. --- built_value/lib/built_value.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/built_value/lib/built_value.dart b/built_value/lib/built_value.dart index 99c5b705..55de5b55 100644 --- a/built_value/lib/built_value.dart +++ b/built_value/lib/built_value.dart @@ -18,7 +18,7 @@ abstract class Built, B extends Builder> { /// /// The implementation of this method will be generated for you by the /// built_value generator. - V rebuild(Function(B) updates); + V rebuild(void Function(B) updates); /// Converts the instance to a builder [B]. ///