Line Divider In Popup Menu Items
Complete Code For Line Divider In Popup Menu Items In Flutter
main.dart
import 'package:flutter/material.dart'; void main(){ runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: MyHomePage() ); } } class MyHomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, appBar: AppBar( backgroundColor: Colors.orange[900], title: Text("Line Divider In PopupMenuItems"), ), body: Center( child: PopupMenuButton( child: Text("Show Popup Menu",style: TextStyle(color: Colors.white),), itemBuilder: (context) { var list = List<PopupMenuEntry<Object>>(); list.add( PopupMenuItem( child: Text("HTML"), ), ); list.add( PopupMenuDivider( height: 20, ), ); list.add( PopupMenuItem( child: Text("CSS"), ), ); list.add( PopupMenuDivider( height: 20, ), ); list.add( PopupMenuItem( child: Text("BOOTSTRAP"), ), ); return list; }), )); } }