data_classes
data_classes copied to clipboard
Optional named constructor parameters
Would it be possible to add support for optional named constructor parameters by specifying a default value in the base Mutable class?
For example this class:
@GenerateDataClass()
class MutableState {
String a = "";
String b;
}
Would generate the this constructor:
const ProfileConfirmState({
this.a = "",
@required this.b
}) : assert(a != null),
assert(b != null);