import 'package:flutter/material.dart';
import 'package:piring_baru/dashboard/faq.dart';
import 'package:piring_baru/dashboard/faqq.dart';

void main() => runApp(Tanya());

class Tanya extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Kami Menjawab Pertanyaan Anda'),
          backgroundColor: Colors.deepOrange,
        ),
        body: SingleChildScrollView(
          child: Center(
            child: Column(
              children: [
                SizedBox(
                  height: 20.0, // Jarak antara AppBar dan Card pertama
                ),
                Card(
                  elevation: 3, // Tingkat elevasi card
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(10.0),
                  ),
                  margin: EdgeInsets.only(left: 20, right: 20),
                  child: GestureDetector(
                    onTap: () {
                      Navigator.of(context).push(
                        MaterialPageRoute(
                          builder: (context) => TanyaOnline(),
                        ),
                      );
                    },
                    child: Padding(
                      padding:
                          EdgeInsets.all(15.0), // Padding untuk konten card
                      child: Row(
                        children: [
                          // Gambar dari asset
                          Container(
                            width: 50.0, // Lebar gambar
                            height: 50.0, // Tinggi gambar
                            decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular(10.0),
                              image: DecorationImage(
                                image: AssetImage('assets/images/shusi.webp'),
                                fit: BoxFit.cover,
                              ),
                            ),
                          ),
                          SizedBox(
                            width: 40.0,
                          ),
                          Center(
                              child: Text(
                            'Tanya Jawab',
                            style: TextStyle(fontWeight: FontWeight.bold),
                            textAlign: TextAlign.center,
                          ))
                        ],
                      ),
                    ),
                  ),
                ),
                SizedBox(
                  height: 20.0, // Jarak vertikal antara dua Card
                ),
                Card(
                  elevation: 3, // Tingkat elevasi card
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(10.0),
                  ),
                  margin: EdgeInsets.only(left: 20, right: 20),
                  child: GestureDetector(
                    onTap: () {
                      Navigator.of(context).push(
                        MaterialPageRoute(
                          builder: (context) => FAQPage(),
                        ),
                      );
                    },
                    child: Padding(
                      padding:
                          EdgeInsets.all(15.0), // Padding untuk konten card
                      child: Row(
                        children: [
                          // Gambar dari asset
                          Container(
                            width: 50.0, // Lebar gambar
                            height: 50.0, // Tinggi gambar
                            decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular(10.0),
                              image: DecorationImage(
                                image: AssetImage('assets/images/shusi.webp'),
                                fit: BoxFit.cover,
                              ),
                            ),
                          ),
                          SizedBox(
                            width: 40.0,
                          ),
                          Center(
                              child: Text(
                            'FAQ',
                            style: TextStyle(fontWeight: FontWeight.bold),
                            textAlign: TextAlign.center,
                          ))
                        ],
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
