Flutter Container hata veriyor

Nazo_2004

Decapat
Katılım
8 Temmuz 2021
Mesajlar
259
Daha fazla  
Cinsiyet
Erkek
Flutter Container neden hata veriyor?
Bu arada ben Container button olarak kullanmak istiyorum.

Kod:
[ATTACH type="full"]1444303[/ATTACH]

//// Kodlar ////

class Bildirim extends StatefulWidget {
  final String name;
  Bildirim({required this.name});
  /* String? name = "";
  Bildirim({this.name});*/
  _BildirimState createState() => _BildirimState();
}
class _BildirimState extends State<Bildirim> {
  bool _isChecked = false;
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 400,
      height: 80,
      child: Row(
        children: [
          SizedBox(width: 5),
          Container(
            width: 40,
            height: 40,
            decoration: BoxDecoration(
              color: Colors.grey[300],
              shape: BoxShape.circle,
            ),
            child: Stack(children: [
              Container(
                  width: 40,
                  height: 40,
                  decoration: BoxDecoration(
                    border: Border.all(width: 4, color: Theme.of(context).scaffoldBackgroundColor),
                    boxShadow: [
                      BoxShadow(
                        spreadRadius: 2,
                        blurRadius: 10,
                        color: Colors.black.withOpacity(0.1),
                      ),
                    ],
                    shape: BoxShape.circle,
                  ),
                  child: GestureDetector(onTap: () {
                    Navigator.push(context, MaterialPageRoute(builder: (context) => BildirimProfile()));
                  }))
            ]),
          ),
          SizedBox(width: 5),
          Text(widget.name, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 10)),
          Container(
            child: GestureDetector(onTap: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) => UserPosts(name: "asd")));
            }),
          ),
        ],
      ),
    );
  }
}
 

Dosya Ekleri

  • 1657206120199.png
    1657206120199.png
    16,7 KB · Görüntüleme: 28
Son düzenleyen: Moderatör:

Yeni konular

Geri
Yukarı