NavigationMenuContent constructor

const NavigationMenuContent({
  1. Key? key,
  2. required Widget title,
  3. Widget? content,
  4. Widget? leading,
  5. Widget? trailing,
  6. VoidCallback? onPressed,
})

Creates a NavigationMenuContent with the specified properties.

The title parameter is required as it provides the primary label for the navigation option. All other parameters are optional and enhance the content's functionality and appearance.

Parameters:

  • title (Widget, required): The primary title text
  • content (Widget?, optional): Descriptive text below title
  • leading (Widget?, optional): Icon or widget before title
  • trailing (Widget?, optional): Widget after title and content
  • onPressed (VoidCallback?, optional): Action when item is pressed

Example:

NavigationMenuContent(
  leading: Icon(Icons.settings),
  title: Text('Settings'),
  content: Text('Manage application preferences'),
  trailing: Icon(Icons.arrow_forward_ios, size: 16),
  onPressed: _openSettings,
)

Implementation

const NavigationMenuContent({
  super.key,
  required this.title,
  this.content,
  this.leading,
  this.trailing,
  this.onPressed,
});