import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData(primarySwatch: Colors.blue), home: MyHomePage(), ); } } class MyHomePage extends StatefulWidget { @override State createState() { return _MyHomePage(); } } class _MyHomePage extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Flutter Demo'), actions: [ // Popup Menu (DropDown) PopupMenuButton( itemBuilder: (context) => [ PopupMenuItem( child: Row( children: [ Icon(Icons.share, color: Colors.black), Text('Share'), ], ), ), PopupMenuItem( child: Row( children: [ Icon(Icons.download, color: Colors.black), Text('Download'), ], ), ), PopupMenuItem( child: Row( children: [ Icon(Icons.save, color: Colors.black), Text('Save'), ], ), ), PopupMenuItem( child: Row( children: [ Icon(Icons.settings, color: Colors.black), Text('Settings'), ], ), ), ], child: Icon(Icons.more_vert), ), ], ), body: Center( child: ElevatedButton( onPressed: () { // Show AlertDialog on button press showDialog( context: context, builder: (context) { return AlertDialog( title: Text( 'Email Sent', style: TextStyle(color: Colors.red), ), content: Text('Your email has been successfully sent.'), actions: [ TextButton( onPressed: () { Navigator.pop(context); }, child: Text('OK'), ), ], ); }, ); }, child: Text('Send Email'), ), ), ); } }