CarpenterApp class
Корневой виджет приложения Carpenter.
CarpenterApp собирает стандартный верхний слой без повторяющегося
бойлерплейта: WidgetsApp, CarpenterScope, typed runtime registry,
shell pipeline и route renderer. Низкоуровневые компоненты остаются
публичными, но обычному приложению достаточно этого одного входа.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CarpenterApp
Constructors
-
CarpenterApp({Key? key, Widget? child, CarpenterConfig config = const CarpenterConfig(), Carpenter? carpenter, CarpenterAppBuilder? builder, String title = 'Carpenter', GenerateAppTitle? onGenerateTitle, TextStyle? textStyle, bool debugShowCheckedModeBanner = false, bool useFrame = true, CarpenterTopPanelBuilder? topPanelBuilder, CarpenterTopPanelBuilder? desktopTopPanelBuilder, bool useSafeArea = true, EdgeInsetsGeometry? framePadding, Color? backgroundColor, List<
CarpenterCommand< commands = const [], CarpenterHotkeyCommandCallback? onHotkeyCommand, CarpenterHotkeyController? hotkeyController, bool enableHotkeys = true, bool trackPressedKeys = true, bool autofocusHotkeys = true, TargetPlatform? platform, Locale? locale, RouterConfig<void> >Object> ? routerConfig, Iterable<LocalizationsDelegate> ? localizationsDelegates, LocaleListResolutionCallback? localeListResolutionCallback, LocaleResolutionCallback? localeResolutionCallback, Iterable<Locale> supportedLocales = const [Locale('en', 'US')], Map<ShortcutActivator, Intent> ? shortcuts, Map<Type, Action< ? actions, String? restorationScopeId, List<Intent> >CarpenterShell> shells = const [], List<CarpenterModule> modules = const [], List<CarpenterRoute> routes = const [], Widget missingRouteBuilder(BuildContext context, Object? node)?}) -
Создает корневое приложение Carpenter.
const
Properties
-
actions
→ Map<
Type, Action< ?Intent> > -
final
- autofocusHotkeys → bool
-
Автофокус hotkey-ветки.
final
- backgroundColor → Color?
-
Цвет фона app frame и
WidgetsApp.final - builder → CarpenterAppBuilder?
-
Дополнительная сборка содержимого внутри
CarpenterScope.final - carpenter → Carpenter?
-
Готовый runtime, если приложение хочет управлять его жизненным циклом само.
final
- child → Widget?
-
Основное содержимое приложения.
final
-
commands
→ List<
CarpenterCommand< void> > -
Глобальные hotkey-команды приложения.
final
- config → CarpenterConfig
-
Декларация visual runtime. Игнорируется, если передан готовый
carpenter.final - debugShowCheckedModeBanner → bool
-
Показывать debug banner Flutter.
final
- desktopTopPanelBuilder → CarpenterTopPanelBuilder?
-
Desktop-override верхней панели.
final
- enableHotkeys → bool
-
Включить глобальный
CarpenterHotkeyScope.final - framePadding → EdgeInsetsGeometry?
-
Отступ вокруг app frame.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hotkeyController → CarpenterHotkeyController?
-
Внешний контроллер hotkey-состояния.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → Locale?
-
Локаль
WidgetsApp.final - localeListResolutionCallback → LocaleListResolutionCallback?
-
final
- localeResolutionCallback → LocaleResolutionCallback?
-
final
-
localizationsDelegates
→ Iterable<
LocalizationsDelegate> ? -
final
- missingRouteBuilder → Widget Function(BuildContext context, Object? node)?
-
UI для отсутствующего route declaration.
final
-
modules
→ List<
CarpenterModule> -
Feature modules, подключенные к приложению.
final
- onGenerateTitle → GenerateAppTitle?
-
Динамический заголовок
WidgetsApp.final - onHotkeyCommand → CarpenterHotkeyCommandCallback?
-
Callback выполнения глобальной hotkey-команды.
final
- platform → TargetPlatform?
-
Platform override для frame и hotkeys.
final
- restorationScopeId → String?
-
final
-
routerConfig
→ RouterConfig<
Object> ? -
Внешняя Router API конфигурация. Например,
GoRouter.final -
routes
→ List<
CarpenterRoute> -
Root routes, если приложение хочет объявить их без модуля.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shells
→ List<
CarpenterShell> -
App-level middleware shell-и.
final
-
shortcuts
→ Map<
ShortcutActivator, Intent> ? -
final
-
supportedLocales
→ Iterable<
Locale> -
final
- textStyle → TextStyle?
-
Базовый text style для
WidgetsApp.final - title → String
-
Заголовок
WidgetsApp.final - topPanelBuilder → CarpenterTopPanelBuilder?
-
Верхняя панель по умолчанию.
final
- trackPressedKeys → bool
-
Отслеживать текущие зажатые клавиши.
final
- useFrame → bool
-
Оборачивать содержимое в
CarpenterAppFrame.final - useSafeArea → bool
-
Использовать ли
SafeAreaвнутри app frame.final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
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