File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ class MetaDataField {
90
90
/// must check the checkbox in order to sign up.
91
91
/// {@endtemplate}
92
92
class BooleanMetaDataField extends MetaDataField {
93
+ /// Whether the checkbox is initially checked.
94
+ final bool value;
95
+
93
96
/// Rich text spans for the label. If provided, this will be used instead of [label] .
94
97
final List <InlineSpan >? richLabelSpans;
95
98
@@ -110,6 +113,7 @@ class BooleanMetaDataField extends MetaDataField {
110
113
/// {@macro boolean_metadata_field}
111
114
BooleanMetaDataField ({
112
115
String ? label,
116
+ this .value = false ,
113
117
this .richLabelSpans,
114
118
this .checkboxSemanticLabel,
115
119
this .isRequired = false ,
@@ -256,7 +260,9 @@ class _SupaEmailAuthState extends State<SupaEmailAuth> {
256
260
_metadataControllers = Map .fromEntries ((widget.metadataFields ?? []).map (
257
261
(metadataField) => MapEntry (
258
262
metadataField.key,
259
- metadataField is BooleanMetaDataField ? false : TextEditingController (),
263
+ metadataField is BooleanMetaDataField
264
+ ? metadataField.value
265
+ : TextEditingController (),
260
266
),
261
267
));
262
268
}
You can’t perform that action at this time.
0 commit comments