I am getting this positional arguments error. I am supposed to provide an argument in that parentheses but I cannot seem to know how.
class SwitchScreen extends StatefulWidget {
@override
SwitchClass createState() => SwitchClass(); // **THE ERROR IS HERE...**
}
class SwitchClass extends State {
bool isSwitched;
SwitchClass(this.isSwitched);
@override
Widget build(BuildContext context) {
return Switch(
value: isSwitched,
activeColor: Colors.blue,
onChanged: (value) {
setState(() {
isSwitched = value;
});
},
);
}
}