CarpenterApp class final

High-level Carpenter application host using the current theme/runtime stack.

Inheritance

Constructors

CarpenterApp({Key? key, Widget? child, CarpenterThemeData? theme, RouterConfig<Object>? routerConfig, List<CarpenterShell> shells = const [], List<CarpenterModule> modules = const [], List<CarpenterRoute> routes = const [], Widget missingRouteBuilder(BuildContext context, Object? node)?, List<CarpenterCommand<void>> commands = const [], CarpenterCommandExecutor? commandExecutor, CarpenterHotkeyCommandCallback? onHotkeyCommand, CarpenterHotkeyController? hotkeyController, bool enableHotkeys = true, bool trackPressedKeys = true, bool autofocusHotkeys = true, bool useFrame = false, CarpenterTopPanelBuilder? topPanelBuilder, CarpenterTopPanelBuilder? desktopTopPanelBuilder, bool useSafeArea = true, EdgeInsetsGeometry? framePadding, Color? backgroundColor, TargetPlatform? platform, Locale? locale, String? title, bool debugShowCheckedModeBanner = false})
Creates the high-level Carpenter root, composing optional routing, modules, shells, command execution, hotkeys, and frame capabilities around application content.
const

Properties

autofocusHotkeys bool
Whether an automatically installed hotkey scope requests focus so application shortcuts work without an explicit focus request.
final
backgroundColor Color?
Optional frame background color; theme surface defaults remain authoritative when this is absent.
final
child Widget?
Optional direct application content. Internal declared routes are rendered when this is absent and no external router owns the routed child.
final
commandExecutor CarpenterCommandExecutor?
Optional application-wide execution policy for command surfaces.
final
commands List<CarpenterCommand<void>>
Application-level commands exposed to an automatically installed hotkey shell when hotkeys are enabled.
final
debugShowCheckedModeBanner bool
Whether Flutter shows its checked-mode debug banner for this application root.
final
desktopTopPanelBuilder CarpenterTopPanelBuilder?
Desktop-specific top-panel builder forwarded to an automatically installed frame shell.
final
enableHotkeys bool
Whether CarpenterApp may add a hotkey shell when commands or hotkey hooks are configured and no shell already provides hotkey runtime capability.
final
framePadding EdgeInsetsGeometry?
Optional content padding forwarded to an automatically installed application frame.
final
hashCode int
The hash code for this object.
no setterinherited
hotkeyController CarpenterHotkeyController?
Optional caller-owned hotkey controller forwarded to the automatically installed hotkey shell.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
locale Locale?
Optional locale forwarded to the low-level application root and core runtime capability.
final
missingRouteBuilder Widget Function(BuildContext context, Object? node)?
Optional fallback renderer for an empty or unmatched internal Carpenter route tree.
final
modules List<CarpenterModule>
Feature modules whose routes, shells, and runtime requirements participate in the hosted application.
final
onHotkeyCommand CarpenterHotkeyCommandCallback?
Optional observer invoked before an application hotkey executes its command.
final
platform TargetPlatform?
Optional effective target-platform override shared with the host and automatically installed frame/hotkey shells.
final
routerConfig RouterConfig<Object>?
Optional external Flutter router configuration. When present, CarpenterApp uses Application.router and treats its routed child as authoritative content.
final
routes List<CarpenterRoute>
Routes declared directly by the application; module routes are appended when Carpenter builds the effective route list.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shells List<CarpenterShell>
Application shells supplied directly by the caller before any automatically added hotkey or frame shell.
final
theme CarpenterThemeData?
Carpenter theme passed to the underlying Application; defaults there to the light theme when omitted.
final
title String?
Application title forwarded to the underlying Flutter application root.
final
topPanelBuilder CarpenterTopPanelBuilder?
General top-panel builder forwarded to an automatically installed frame shell.
final
trackPressedKeys bool
Whether an automatically installed hotkey scope records currently pressed hardware keys.
final
useFrame bool
Whether CarpenterApp may add the standard frame shell when no existing shell or module already provides frame runtime capability.
final
useSafeArea bool
Whether an automatically installed application frame keeps its content inside the platform safe area.
final

Methods

build(BuildContext context) Widget
Builds either router or navigator application mode, then hosts effective routes, modules, shells, and optional command execution below the Carpenter theme/root services.
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