File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ class MetaDataField {
9090/// must check the checkbox in order to sign up.
9191/// {@endtemplate}
9292class BooleanMetaDataField extends MetaDataField {
93+ /// Whether the checkbox is initially checked.
94+ final bool value;
95+
9396 /// Rich text spans for the label. If provided, this will be used instead of [label] .
9497 final List <InlineSpan >? richLabelSpans;
9598
@@ -110,6 +113,7 @@ class BooleanMetaDataField extends MetaDataField {
110113 /// {@macro boolean_metadata_field}
111114 BooleanMetaDataField ({
112115 String ? label,
116+ this .value = false ,
113117 this .richLabelSpans,
114118 this .checkboxSemanticLabel,
115119 this .isRequired = false ,
@@ -256,7 +260,9 @@ class _SupaEmailAuthState extends State<SupaEmailAuth> {
256260 _metadataControllers = Map .fromEntries ((widget.metadataFields ?? []).map (
257261 (metadataField) => MapEntry (
258262 metadataField.key,
259- metadataField is BooleanMetaDataField ? false : TextEditingController (),
263+ metadataField is BooleanMetaDataField
264+ ? metadataField.value
265+ : TextEditingController (),
260266 ),
261267 ));
262268 }
You can’t perform that action at this time.
0 commit comments