Flutlab neden hata veriyor?

Nazo_2004

Decapat
Katılım
8 Temmuz 2021
Mesajlar
259
Daha fazla  
Cinsiyet
Erkek
Flutlab neden bana hata veriyor?

dsad.PNG
 
Allah rızası için şu kodları yazılı olarak ver. Her konunda söylüyorum, halen resimli olarak koyuyorsun. Şu kodları kopyalayıp buraya yapıştırmak bu kadar zor olmamalı.
 
onChanged(bool value) şeklinde olmalı.
yaptım olmadı.

Kod:
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;
                    });
                  },
                ),
              ],
            ),
          ],
        )),
      ),
    );
  }
}
 
Son düzenleme:
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;
});
},
),
],
),
],
)),
),
);
}
}

Hata veren satırı şunla değiştirir misin?

Kod:
this.valuesecond = false!;
 
Son düzenleme:

Yeni konular

Geri
Yukarı