There are multiple ways and also it depends weather you have one or multiple checkboxes. Here is the one way... Create a bool variable and make it true when onChanged Event called in Checkbox or to toggle you can use isChecked = !isChecked; With this you can easily toogle with values and pass the final value when form submitted
Great tutorials, thanks for taking your time to teach us.
You welcome 😁
Your videos are extremely helpful. You are a good teacher. ❤
Thank you 😊
Best Lectures i have ever seen.🥰
Thank you 🤩
got it. love you :P
Can you provide source code to this part I cannot catch it. I am new to it and really like the way you are teaching.
I'll try to share the code ASAP please mail me at support@codingwithT.com ☺️. Thank you for your kind words 😎🤠.
How to pass the data from the checkboxlistetile ?thanks for the tuto
There are multiple ways and also it depends weather you have one or multiple checkboxes.
Here is the one way...
Create a bool variable and make it true when onChanged Event called in Checkbox or to toggle you can use isChecked = !isChecked;
With this you can easily toogle with values and pass the final value when form submitted
Brother teach us to create vpn app a to z🙏🙏plz
Great suggestion bro. Actually I'm about to start an e-commerce app but after that I'll create vpn app.
No worries 🤠😊
Bravo
Thank you 😊
sir y can u show entire code sir.......
It's visible bro
class CustomCheckBox extends StatefulWidget {
final bool tristate, value;
final String text;
const CustomCheckBox(
{Key? key,
required this.tristate,
required this.value,
required this.text})
: super(key: key);
@override
State createState() =>
_CustomCheckBoxState(tristate, value, text);
}
class _CustomCheckBoxState extends State {
final bool tristate;
bool? checkBoxValue;
final String text;
_CustomCheckBoxState(this.tristate, this.checkBoxValue, this.text);
@override
Widget build(BuildContext context) {
return Column(
children: [
Row(
children: [
Checkbox(
tristate: tristate,
value: checkBoxValue,
onChanged: (value) {
setState(() {
checkBoxValue = value;
});
}),
Text(
text,
style: const TextStyle(color: Colors.blueAccent),
),
],
),
],
);
}
}
here is my assignment @codingwithtea. Please share your feedback
I'll check that shortly. 😃✌️