import 'package:flutter/material.dart';

class MyMegaMenu extends StatelessWidget {
  const MyMegaMenu({super.key});

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: 300,
      height: 120,
      child: DropdownButton<String>(
          value: 'Menu',
          icon: Icon(Icons.av_timer),
          iconSize: 24,
          elevation: 16,
          style: TextStyle(color: Colors.deepPurple),
          underline: Container(
            height: 2,
            color: Colors.deepPurpleAccent,
          ),
          onChanged: (newValue) {},
          items: <String>['Menu', 'Home', 'Profile', 'Settings']
              .map<DropdownMenuItem<String>>((String value) {
            return DropdownMenuItem<String>(
              value: value,
              child: Text(value),
            );
          }).toList()
            ..add(DropdownMenuItem(
              child: ExpansionTile(
                title: Text('Menu'),
                children: [
                  ListTile(
                    title: Text('Submenu 1'),
                  ),
                  ListTile(
                    title: Text('Submenu 2'),
                  ),
                ],
              ),
            ))),
    );
  }
}
