DashboardPage class
Page definition model for automatic sidebar and page generation
This model makes it easy to define all your dashboard pages in a single list. The sidebar automatically generates menu items and handles page navigation.
Example:
final pages = [
DashboardPage(
icon: Icons.dashboard,
title: 'Dashboard',
route: 'dashboard',
builder: (context) => DashboardScreen(),
),
DashboardPage(
icon: Icons.settings,
title: 'Settings',
route: 'settings',
builder: (context) => SettingsScreen(),
),
];
Constructors
- DashboardPage({required IconData icon, required String title, required String route, required WidgetBuilder builder, String? description})
-
const
Properties
- builder → WidgetBuilder
-
final
- description → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData
-
final
- route → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMenuItem(
) → DashboardMenuItem -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited