onChanged(bool value) şeklinde olmalı.
yaptım olmadı.onChanged(bool value) şeklinde olmalı.
class Bildirimler extends StatefulWidget {
@override
_BildirimlerState createState() => _BildirimlerState();
}
class _BildirimlerState extends State<Bildirimler> {
bool valuefirst = false;
bool valuesecond = false;
bool value = false;
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
leading: IconButton(
icon: Icon(Icons.arrow_circle_left_outlined, color: Colors.black),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => Home()));
}),
title: Center(child: Text("Bildirimler", style: TextStyle(color: Colors.black))),
),
body: Container(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
SizedBox(
width: 10,
),
Text(
'Yorumları bildirim olarak gelsin mi',
style: TextStyle(fontSize: 17.0),
),
Checkbox(
value: this.valuesecond,
onChanged: (bool? value) {
setState(() {
this.valuesecond = value;
});
},
),
],
),
Row(
children: <Widget>[
SizedBox(
width: 10,
),
Text(
'Checkbox without Subtitle: ',
style: TextStyle(fontSize: 17.0),
),
Checkbox(
value: this.valuesecond,
onChanged: (bool? value) {
setState(() {
this.valuesecond = false;
});
},
),
],
),
],
)),
),
);
}
}
yaptım olmadı.
class Bildirimler extends StatefulWidget {
@override
_BildirimlerState createState() => _BildirimlerState();
}
class _BildirimlerState extends State<Bildirimler> {
bool valuefirst = false;
bool valuesecond = false;
bool value = false;
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
backgroundColor: Colors.white,
leading: IconButton(
icon: Icon(Icons.arrow_circle_left_outlined, color: Colors.black),
onPressed: () {
Navigator.push(context, MaterialPageRoute(builder: (context) => Home()));
}),
title: Center(child: Text("Bildirimler", style: TextStyle(color: Colors.black))),
),
body: Container(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
SizedBox(
width: 10,
),
Text(
'Yorumları bildirim olarak gelsin mi',
style: TextStyle(fontSize: 17.0),
),
Checkbox(
value: this.valuesecond,
onChanged: (bool? value) {
setState(() {
this.valuesecond = value;
});
},
),
],
),
Row(
children: <Widget>[
SizedBox(
width: 10,
),
Text(
'Checkbox without Subtitle: ',
style: TextStyle(fontSize: 17.0),
),
Checkbox(
value: this.valuesecond,
onChanged: (bool? value) {
setState(() {
this.valuesecond = false;
});
},
),
],
),
],
)),
),
);
}
}
this.valuesecond = false!;
Şimdi hata vermiyor ama şimdide tik atamıyorumHata veren satırı şunla değiştirir misin?
Kod:this.valuesecond = false!;
Bu sitenin çalışmasını sağlamak için gerekli çerezleri ve deneyiminizi iyileştirmek için isteğe bağlı çerezleri kullanıyoruz.