Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.1 kB
0
Indexable
Never
                showDialog(
                  context: context,
                  builder: (context) => AlertDialog(
                    title: Column(
                      children: [
                        Icon(
                          Icons.check_circle,
                          color: Colors.green,
                        ),
                        Text(
                          'Pesanan Diterima',
                          style: TextStyle(
                            color: Colors.green,
                            fontSize: 20,
                            fontWeight: FontWeight.bold,
                            fontStyle: FontStyle.italic,
                          ),
                        ),
                      ],
                    ),
                    content: Text(
                        'Pesanan anda $nama_item sebanyak $jumlah_item dengan ukuran $ukuran akan diproses'),
                    actions: [
                      TextButton(
                        onPressed: () {
                          Navigator.of(context).pop();
                          setState(() {
                            jumlah_item = 0;
                            ukuran = null;
                          });
                        },
                        child: Text(
                          'Oke',
                          style: TextStyle(
                            color: Colors.green,
                          ),
                        ),
                      ),
                      TextButton(
                        onPressed: () {
                          Navigator.of(context).pop();
                        },
                        child: Text(
                          'Batal',
                          style: TextStyle(
                            color: Colors.red,
                          ),
                        ),
                      ),
                    ],
                  ),
                );
              },
        child: Icon(
          Icons.shopping_cart,
          size: 40,
        ),
      ),