mardi 18 décembre 2018

How do you add a label (title text) to a Checkbox in Flutter?

I am playing with Checkbox to see how it works, but I don't see a title option with it.

Checkbox(
  title: Text("Checkbox label"),  // The named parameter 'title' isn't defined.
  value: true,
  onChanged: (newValue) { },
);

Do I have to create my own widget to add a title to it?

This is a Q&A self-answer. My answer is below.




Aucun commentaire:

Enregistrer un commentaire