KiteApp class

Root application widget for Kite.

Supports both:

KiteApp(
  home: const HomePage(),
)

and Router 2.0:

KiteApp.router(
  routerConfig: router,
)

Both modes share:

  • Kite responsive lifecycle protection
  • Material theme
  • ScaffoldMessenger
  • Material/Cupertino localization
  • HeroController
  • Kite debug grid
  • Kite debug banner
Inheritance
Available extensions

Constructors

KiteApp({Key? key, GlobalKey<NavigatorState>? navigatorKey, GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey, Widget? home, Map<String, WidgetBuilder> routes = const <String, WidgetBuilder>{}, String? initialRoute, RouteFactory? onGenerateRoute, InitialRouteListFactory? onGenerateInitialRoutes, RouteFactory? onUnknownRoute, List<NavigatorObserver> navigatorObservers = const <NavigatorObserver>[], PageRouteFactory? pageRouteBuilder, TransitionBuilder? builder, String title = '', GenerateAppTitle? onGenerateTitle, NotificationListenerCallback<NavigationNotification>? onNavigationNotification, Color? color, ThemeData? theme, ThemeData? darkTheme, ThemeMode themeMode = ThemeMode.system, Duration themeAnimationDuration = kThemeAnimationDuration, Curve themeAnimationCurve = Curves.linear, Locale? locale, Iterable<LocalizationsDelegate>? localizationsDelegates, LocaleListResolutionCallback? localeListResolutionCallback, LocaleResolutionCallback? localeResolutionCallback, Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')], bool showPerformanceOverlay = false, bool showSemanticsDebugger = false, bool debugShowCheckedModeBanner = true, bool debugGrid = false, bool debugShowKiteBanner = false, Map<ShortcutActivator, Intent>? shortcuts, Map<Type, Action<Intent>>? actions, String? restorationScopeId, ScrollBehavior scrollBehavior = const MaterialScrollBehavior()})
Creates a classic Navigator-based Kite application.
const
KiteApp.router({required RouterConfig<Object>? routerConfig, Key? key, GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey, TransitionBuilder? builder, String title = '', GenerateAppTitle? onGenerateTitle, NotificationListenerCallback<NavigationNotification>? onNavigationNotification, Color? color, ThemeData? theme, ThemeData? darkTheme, ThemeMode themeMode = ThemeMode.system, Duration themeAnimationDuration = kThemeAnimationDuration, Curve themeAnimationCurve = Curves.linear, Locale? locale, Iterable<LocalizationsDelegate>? localizationsDelegates, LocaleListResolutionCallback? localeListResolutionCallback, LocaleResolutionCallback? localeResolutionCallback, Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')], bool showPerformanceOverlay = false, bool showSemanticsDebugger = false, bool debugShowCheckedModeBanner = true, bool debugGrid = false, bool debugShowKiteBanner = false, Map<ShortcutActivator, Intent>? shortcuts, Map<Type, Action<Intent>>? actions, String? restorationScopeId, ScrollBehavior scrollBehavior = const MaterialScrollBehavior()})
Creates a Router 2.0 Kite application.
const

Properties

actions Map<Type, Action<Intent>>?
final
builder TransitionBuilder?
Inserts an application-level widget above the active Navigator/Router.
final
color Color?
final
darkTheme ThemeData?
final
debugGrid bool
Shows Kite's visual layout grid.
final
debugShowCheckedModeBanner bool
Flutter's regular DEBUG banner.
final
debugShowKiteBanner bool
Shows a small KITE banner in the top-left corner.
final
hashCode int
The hash code for this object.
no setterinherited
home Widget?
final
initialRoute String?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
locale Locale?
final
localeListResolutionCallback LocaleListResolutionCallback?
final
localeResolutionCallback LocaleResolutionCallback?
final
localizationsDelegates Iterable<LocalizationsDelegate>?
final
final
final
onGenerateInitialRoutes InitialRouteListFactory?
final
onGenerateRoute RouteFactory?
final
onGenerateTitle GenerateAppTitle?
final
onNavigationNotification NotificationListenerCallback<NavigationNotification>?
final
onUnknownRoute RouteFactory?
final
pageRouteBuilder PageRouteFactory?
final
restorationScopeId String?
final
routerConfig RouterConfig<Object>?
final
routes Map<String, WidgetBuilder>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaffoldMessengerKey GlobalKey<ScaffoldMessengerState>?
final
scrollBehavior ScrollBehavior
final
shortcuts Map<ShortcutActivator, Intent>?
final
showPerformanceOverlay bool
final
showSemanticsDebugger bool
final
supportedLocales Iterable<Locale>
final
theme ThemeData?
final
themeAnimationCurve Curve
final
themeAnimationDuration Duration
final
themeMode ThemeMode
final
title String
final

Methods

absorbPointer({bool absorbing = true}) Widget

Available on Widget, provided by the WidgetExtensions extension

align(AlignmentGeometry alignment, {double? widthFactor, double? heightFactor}) Widget

Available on Widget, provided by the WidgetExtensions extension

aspectRatio(double ratio) Widget

Available on Widget, provided by the WidgetExtensions extension

centered({double? widthFactor, double? heightFactor}) Widget

Available on Widget, provided by the WidgetExtensions extension

clipRadius(BorderRadiusGeometry borderRadius, {Clip clipBehavior = Clip.antiAlias}) Widget

Available on Widget, provided by the WidgetExtensions extension

constrained({double minWidth = 0, double maxWidth = double.infinity, double minHeight = 0, double maxHeight = double.infinity}) Widget

Available on Widget, provided by the WidgetExtensions extension

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<KiteApp>
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
expanded({int flex = 1}) Widget

Available on Widget, provided by the WidgetExtensions extension

flexible({int flex = 1, FlexFit fit = FlexFit.loose}) Widget

Available on Widget, provided by the WidgetExtensions extension

gesture({VoidCallback? onTap, VoidCallback? onDoubleTap, VoidCallback? onLongPress, GestureTapDownCallback? onTapDown, GestureTapUpCallback? onTapUp, HitTestBehavior behavior = HitTestBehavior.deferToChild}) Widget

Available on Widget, provided by the WidgetExtensions extension

height(double value) Widget

Available on Widget, provided by the WidgetExtensions extension

hero(Object tag) Widget

Available on Widget, provided by the WidgetExtensions extension

ignorePointer({bool ignoring = true}) Widget

Available on Widget, provided by the WidgetExtensions extension

inkWell({VoidCallback? onTap, VoidCallback? onLongPress, BorderRadius? borderRadius, bool enableFeedback = true}) Widget

Available on Widget, provided by the WidgetExtensions extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onTap(VoidCallback? callback, {HitTestBehavior behavior = HitTestBehavior.opaque}) Widget

Available on Widget, provided by the WidgetExtensions extension

opacity(double value, {bool alwaysIncludeSemantics = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

padding(EdgeInsetsGeometry value) Widget

Available on Widget, provided by the WidgetExtensions extension

paddingAll(double value) Widget

Available on Widget, provided by the WidgetExtensions extension

paddingHorizontal(double value) Widget

Available on Widget, provided by the WidgetExtensions extension

paddingOnly({double left = 0, double top = 0, double right = 0, double bottom = 0}) Widget

Available on Widget, provided by the WidgetExtensions extension

paddingSymmetric({double horizontal = 0, double vertical = 0}) Widget

Available on Widget, provided by the WidgetExtensions extension

paddingVertical(double value) Widget

Available on Widget, provided by the WidgetExtensions extension

safeArea({bool left = true, bool top = true, bool right = true, bool bottom = true, EdgeInsets minimum = EdgeInsets.zero, bool maintainBottomViewPadding = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

semantics({String? label, String? hint, bool? button, bool? enabled}) Widget

Available on Widget, provided by the WidgetExtensions extension

showIf(bool condition) Widget

Available on Widget, provided by the WidgetExtensions extension

sized({double? width, double? height}) Widget

Available on Widget, provided by the WidgetExtensions extension

sliver() Widget

Available on Widget, provided by the WidgetExtensions extension

toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
tooltip(String message, {Duration? waitDuration}) Widget

Available on Widget, provided by the WidgetExtensions extension

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
visible(bool value, {Widget replacement = const SizedBox.shrink()}) Widget

Available on Widget, provided by the WidgetExtensions extension

when(bool condition, Widget wrapper(Widget child)) Widget

Available on Widget, provided by the WidgetExtensions extension

Applies wrapper only when condition is true.
width(double value) Widget

Available on Widget, provided by the WidgetExtensions extension

Operators

operator ==(Object other) bool
The equality operator.
inherited