import 'package:flutter/material.dart';
import 'package:flutter_provisioning_for_iot/screens/bluetooth_screen.dart';
import 'package:flutter_provisioning_for_iot/screens/cloud_service_ui.dart';
import '../screens/main_page.dart';
import '../screens/settings.dart';

class Sidebar extends StatelessWidget {
  const Sidebar({Key? key}) : super(key: key);


  @override
  Widget build(BuildContext context) {
    return Drawer(
      child: ListView(
        children: <Widget>[
          const DrawerHeader(
            decoration: BoxDecoration(
                color: Colors.white
            ),
            child: Center(
                child: Image(
                    image: AssetImage('assets/logo/m&m_logo.png')
                ),
            ),
          ),
          ListTile(
            title: const Text("Main Page"),
            onTap: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) => const MainPage()));
            },
          ),
          ListTile(
            title: const Text("Settings"),
            onTap: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => const Settings()));
            },
          ),
          ListTile(
            title: const Text("Bluetooth Test"),
            onTap: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) => const BluetoothScreen()));
            },
          ),
          ListTile(
            title: const Text("Cloud Service"),
            onTap: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) => const CloudService()));
            },
          )

        ],
      ),
    );
  }
}
