I am trying to implement a checkbox for my project but it is not outputting. Below is a sniper of my code
class _MyAppState extends State<MaterialApp> {
bool _myBoolean = false;
@override
Widget build(BuildContext context) {
return Center(
child: Checkbox(
value: _myBoolean,
onChanged: (value) {
setState(() {
_myBoolean = value; // rebuilds with new value
});
},
),
);
}
}
Please do assist me on this