mercredi 26 juillet 2023

Checkbox and Text not showing in same horizontal line inside WRAP widget in Flutter

I have created 'Rememnber Password' UI in my login screen with below code which is inside Row() widget :

                 Wrap(
                      alignment: WrapAlignment.center,
                      children: [
                        Checkbox(
                          checkColor: Colors.white,
                          value: isChecked,
                          onChanged: (bool? value) {
                            setState(() {
                              isChecked = value!;
                            });
                          },
                        ),
                        Text(
                          "remember_me",
                          style: theme.textTheme.bodySmall,
                        ).tr()
                      ],
                    ),

But the issue is Checkbox looks good in center, but the Text to the right side of the checkbox has some space below it and it looks little up and not vertically in center.

What might be the issue or how can I make the 'Remember Me' text vertically in center?




Aucun commentaire:

Enregistrer un commentaire