CustomToolbarItem class final
A custom toolbar button backed by a Dart onPressed callback. Works on Android, iOS, and Web.
id must be unique across the toolbar. onPressed is invoked on the Dart side when the user taps the button. title is the label / tooltip.
icon is best-effort per platform (Web: a URL, data-URI, or inline SVG string; native platforms currently render title). className / selected / disabled are honored on Web; native ignores className and uses disabled where the platform allows.
- Inheritance
-
- Object
- ToolbarItem
- CustomToolbarItem
Constructors
- CustomToolbarItem({required String id, String? title, String? icon, String? className, VoidCallback? onPressed, bool? selected, bool? disabled})
-
const
Properties
- className → String?
-
CSS class applied to the button (Web only).
final
- disabled → bool?
-
Whether the button is disabled.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String?
-
Button icon — best-effort per platform (Web: URL/data-URI/SVG string).
final
- id → String
-
Unique id for the item.
final
- onPressed → VoidCallback?
-
Invoked (on the Dart side) when the button is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected → bool?
-
Whether the button renders in a selected/active state (Web).
final
- title → String?
-
Label / tooltip.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited