UiApp class

Material-free application root.

Wraps WidgetsApp and injects UiThemeTokens through a UiTheme host, so the whole tree resolves design tokens via UiThemeTokens.of(context) without any Material Theme. Routes pushed by open_ui_kit overlays (UiSheetScope, UiDialogScope) sit inside the UiTheme, so sheets and dialogs are themed too.

Localization (including RTL text direction for ar/ur) comes from the delegates you pass — include GlobalWidgetsLocalizations.delegate.

Inheritance

Constructors

UiApp({Key? key, Widget? home, UiThemeTokens? lightTokens, UiThemeTokens? darkTokens, UiThemeMode mode = UiThemeMode.system, Locale? locale, Iterable<LocalizationsDelegate> localizationsDelegates = const [], Iterable<Locale> supportedLocales = const [Locale('en')], LocaleResolutionCallback? localeResolutionCallback, LocaleListResolutionCallback? localeListResolutionCallback, String title = '', bool debugShowCheckedModeBanner = true, TransitionBuilder? builder, GlobalKey<NavigatorState>? navigatorKey, List<NavigatorObserver> navigatorObservers = const [], UiMotionDuration pageTransitionDuration = UiMotionDuration.standard, UiMotionDuration pageReverseTransitionDuration = UiMotionDuration.fast, UiNavigationTransitionStyle defaultPageTransitionStyle = UiNavigationTransitionStyle.softShift, bool defaultPageSwipeBackEnabled = true, UiClockController? clockController, UiClockTickMode clockTickMode = UiClockTickMode.minute, Duration? clockTickInterval})
const

Properties

builder TransitionBuilder?
final
clockController UiClockController?
final
clockTickInterval Duration?
final
clockTickMode UiClockTickMode
final
darkTokens UiThemeTokens?
final
debugShowCheckedModeBanner bool
final
defaultPageSwipeBackEnabled bool
App-wide default for whether pushed routes support the progressive iOS edge-swipe-back gesture (see UiCupertinoBackGestureMixin — it only ever attaches on iOS regardless of this flag). A single pushUiPage/UiPageRoute call can still override this per route via its own swipeBackEnabled argument.
final
defaultPageTransitionStyle UiNavigationTransitionStyle
App-wide default for any route UiApp generates itself (e.g. a plain Navigator.pushNamed) and for BuildContext.pushUiPage calls that don't override it. Defaults to UiNavigationTransitionStyle.softShift — the kit's signature push/pop, not a plain cross-fade. A single pushUiPage/UiPageRoute call can still override this per route via its own transitionStyle argument.
final
hashCode int
The hash code for this object.
no setterinherited
home Widget?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lightTokens UiThemeTokens?
final
locale Locale?
final
localeListResolutionCallback LocaleListResolutionCallback?
final
localeResolutionCallback LocaleResolutionCallback?
final
localizationsDelegates Iterable<LocalizationsDelegate>
final
mode UiThemeMode
Appearance policy. Use UiThemeMode.light or UiThemeMode.dark to force a mode; UiThemeMode.system is only the default, not a restriction.
final
final
final
pageReverseTransitionDuration UiMotionDuration
final
pageTransitionDuration UiMotionDuration
Default route timing. Accepts a theme token or an authored custom value.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedLocales Iterable<Locale>
final
title String
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<UiApp>
Creates the mutable state for this widget at a given location in the tree.
override
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