CarpenterWorkspaceShell class final
Contextual application chrome: workspace navigation beside header and page.
The application supplies only the current workspace's navigation. It owns routing, permissions, persistence, search, unread counts and all operations. onWorkspacePressed opens an application-owned catalogue; searchAction opens a palette without implying a business-data search backend.
Desktop can collapse or hide its navigation. Tablet keeps a rail and opens a modal drawer; mobile keeps the entire page width. Drawer dismissal consumes Escape and restores focus without unmounting body. Larger text influences the default viewport policy. actions remain accessible on every width, wrapping below the location when they cannot fit beside it.
This additive, experimental composition does not replace
CarpenterApplicationShell or change application routes.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CarpenterWorkspaceShell
Constructors
-
CarpenterWorkspaceShell({Key? key, required String applicationLabel, required String workspaceLabel, required Widget body, required VoidCallback? onWorkspacePressed, String workspaceCaption = 'Все разделы', Object workspaceIcon = GravityIcons.layoutCells, List<
CarpenterBreadcrumb> breadcrumbs = const [], CarpenterActionDescriptor? searchAction, List<Widget> actions = const [], Widget? activity, Widget? notice, Widget? nativeTitleBar, bool sidebarExpanded = true, ValueChanged<bool> ? onSidebarExpandedChanged, bool sidebarOpen = false, ValueChanged<bool> ? onSidebarOpenChanged, bool sidebarVisible = true, ValueChanged<bool> ? onSidebarVisibleChanged, CarpenterViewportPolicy viewportPolicy = const CarpenterViewportPolicy(accountForTextScale: true)}) -
Creates a caller-controlled workspace. Labels default to Russian;
optional slots are absent until the caller supplies real state.
const
Properties
-
actions
→ List<
Widget> -
Global actions such as inbox and profile. These wrap instead of disappearing.
final
- activity → Widget?
-
Ongoing activity, such as a call; remains outside the scrolling page.
final
- applicationLabel → String
-
Product name in expanded navigation; does not navigate on activation.
final
- body → Widget
-
Stable page region. Loading and errors belong inside this caller-owned slot.
final
-
Hierarchical current location. Ancestor callbacks are application-owned.
final
-
Optional page-wide status footer, separate from navigation's footer.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- nativeTitleBar → Widget?
-
Optional host-owned title bar above all regions. Web hosts omit this slot.
final
-
Current workspace's items, selection, optional footer and pinned sections.
Header slots are composed below the workspace switcher when supplied.
final
- notice → Widget?
-
Current connection or update notice; no status is inferred by the shell.
final
-
onSidebarExpandedChanged
→ ValueChanged<
bool> ? -
Proposes a new desktop preference; callers persist it when appropriate.
final
-
onSidebarOpenChanged
→ ValueChanged<
bool> ? -
Receives opening, dismissal and navigation-selection visibility requests.
final
-
onSidebarVisibleChanged
→ ValueChanged<
bool> ? -
Restores navigation from concentration mode; callers own persistence.
final
- onWorkspacePressed → VoidCallback?
-
Opens the caller's workspace catalogue; null disables the switcher.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchAction → CarpenterActionDescriptor?
-
Shared search trigger, including its actual platform shortcut if supplied.
This shell binds the shortcut to the same enabled action it renders.
final
-
Desktop expanded-versus-rail preference. Defaults to expanded.
final
-
Controlled temporary drawer visibility on tablet and mobile.
final
-
Whether desktop reserves navigation space. Mobile still has a menu button.
final
- viewportPolicy → CarpenterViewportPolicy
-
Available-room policy, accounting for enlarged text by default.
final
- workspaceCaption → String
-
Supporting text explaining the workspace switcher's action.
final
- workspaceIcon → Object
-
Semantic icon for the current workspace; uses the standard icon facade.
final
- workspaceLabel → String
-
Human-readable current workspace, independent from version and route IDs.
final
Methods
-
build(
BuildContext context) → Widget -
Composes theme-scaled navigation and chrome around the stable page slot.
override
-
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
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited