BaseCNToolbar class
@Deprecated - Use BaseToolbar instead
BaseCNToolbar has been renamed to BaseToolbar for consistency. BaseToolbar provides the same native iOS rendering via CNToolbar and Material Design fallback.
Additionally, the public API now uses BaseToolbarAction instead of CNToolbarAction.
Migration:
// Old
BaseCNToolbar(
leading: [
CNToolbarAction(icon: CNSymbol('star'), onPressed: () {}),
],
)
// New
BaseToolbar(
leading: [
BaseToolbarAction(icon: CNSymbol('star'), onPressed: () {}),
],
)
The API is almost identical - just rename:
- BaseCNToolbar → BaseToolbar
- CNToolbarAction → BaseToolbarAction
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BaseStatelessWidget
- BaseToolbar
- BaseCNToolbar
- Annotations
-
- @Deprecated('Use BaseToolbar with BaseToolbarAction instead. BaseCNToolbar will be removed in a future version.')
Constructors
-
BaseCNToolbar({Key? key, List<
CNToolbarAction> ? leading, List<CNToolbarAction> ? middle, List<CNToolbarAction> ? trailing, String? title, Color? tint, bool transparent = false, double? height, double? pillHeight, BaseToolbarAlignment middleAlignment = BaseToolbarAlignment.center, Color? backgroundColor, CNSearchConfig? searchConfig, CNSymbol? contextIcon, BaseParam? baseParam}) -
BaseCNToolbar.search({Key? key, List<
CNToolbarAction> ? leading, List<CNToolbarAction> ? trailing, required CNSearchConfig searchConfig, CNSymbol? contextIcon, Color? tint, bool transparent = false, double? height, double? pillHeight, Color? backgroundColor, BaseParam? baseParam}) - Factory constructor for search-enabled toolbar
Properties
- backgroundColor → Color?
-
Background color (Material only)
finalinherited
- baseParam → BaseParam?
-
Personalization parameters, gets platform parameters first, then mode parameters
finalinherited
- contextIcon → CNSymbol?
-
Context icon for search toolbar
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Custom toolbar height
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
leading
→ List<
BaseToolbarAction> ? -
Leading toolbar actions (typically back button, share)
finalinherited
-
middle
→ List<
BaseToolbarAction> ? -
Middle toolbar actions (main actions)
finalinherited
- middleAlignment → BaseToolbarAlignment
-
Alignment for middle section
finalinherited
- pillHeight → double?
-
Custom pill button height (iOS only)
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchConfig → CNSearchConfig?
-
Search configuration for search-enabled toolbar
finalinherited
- tint → Color?
-
Tint color for icons and text
finalinherited
- title → String?
-
Optional title text
finalinherited
-
trailing
→ List<
BaseToolbarAction> ? -
Trailing toolbar actions (typically settings, more)
finalinherited
- transparent → bool
-
Whether the toolbar should be transparent with blur effect
finalinherited
Methods
-
beforeBuild(
BuildContext context) → void -
Called before build
inherited
-
beforeBuildByCupertino(
BuildContext context) → void -
Called before buildByCupertino
inherited
-
beforeBuildByCupertinoNative(
BuildContext context) → void -
Called before buildByCupertinoNative (native iOS implementation)
inherited
-
beforeBuildByMaterial(
BuildContext context) → void -
Called before buildByMaterial
inherited
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
buildByCupertino(
BuildContext context) → Widget -
build on cupertino mode (Flutter implementation)
inherited
-
buildByCupertinoNative(
BuildContext context) → Widget -
build on cupertino mode with native iOS components (cupertino_native package)
This is called when baseParam.nativeIOS = true
Default implementation falls back to buildByCupertino()
inherited
-
buildByMaterial(
BuildContext context) → Widget -
build on material mode
inherited
-
commonBuild(
BuildContext context, BaseParam? baseParam) → dynamic -
inherited
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
getBuildMode(
BaseParam? baseParam) → WidgetBuildMode -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
-
valueOf(
String key, dynamic value) → dynamic -
inherited
-
valueOfBaseParam(
BaseParam? baseParam, String key, dynamic value) → dynamic -
No reflection available in Dart
First get value from platform, then from mode, finally from value itself
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited