import 'package:flutter/material.dart';
import 'package:flutter_provisioning_for_iot/bluetooth_test.dart';
import 'main_page.dart';
import '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: Color(0xFF00844D)),
            child: Text("Navigation"),
          ),
          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 BluetoothTest()));
            },
          ),

        ],
      ),
    );
  }
}
