JadeApp class
The root widget of a jade_ui application.
JadeApp wraps Flutter's WidgetsApp and adds the app-level infrastructure
a jade_ui app needs — the jade Theme, localized component strings, hero
transitions, desktop scroll behavior, and a default text style — while
letting WidgetsApp provide the MediaQuery (via View), Localizations,
Directionality, focus traversal, shortcuts, and the navigator.
void main() => runApp(
JadeApp(
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
home: const HomePage(),
),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- JadeApp
Constructors
-
JadeApp({Key? key, ThemeData? theme, ThemeData? darkTheme, ThemeMode themeMode = ThemeMode.system, Widget? home, Map<
String, WidgetBuilder> routes = const <String, WidgetBuilder>{}, RouteFactory? onGenerateRoute, RouteFactory? onUnknownRoute, String? initialRoute, PageRouteFactory? pageRouteBuilder, TransitionBuilder? builder, Locale? locale, Iterable<Locale> supportedLocales = const <Locale>[Locale('en')], Iterable<LocalizationsDelegate> ? localizationsDelegates, LocaleListResolutionCallback? localeListResolutionCallback, LocaleResolutionCallback? localeResolutionCallback, String? title, GenerateAppTitle? onGenerateTitle, Color? color, TextStyle? textStyle, String? fontFamily, Color? accent, Color? success, Color? warning, Color? danger, ScrollBehavior? scrollBehavior, bool debugShowCheckedModeBanner = true, Map<Type, Action< ? actions, Map<Intent> >ShortcutActivator, Intent> ? shortcuts, SystemUiOverlayStyle? statusBarStyle}) -
Creates a jade app.
const
-
JadeApp.router({Key? key, ThemeData? theme, ThemeData? darkTheme, ThemeMode themeMode = ThemeMode.system, RouterConfig<
Object> ? routerConfig, RouteInformationProvider? routeInformationProvider, RouteInformationParser<Object> ? routeInformationParser, RouterDelegate<Object> ? routerDelegate, BackButtonDispatcher? backButtonDispatcher, TransitionBuilder? builder, Locale? locale, Iterable<Locale> supportedLocales = const <Locale>[Locale('en')], Iterable<LocalizationsDelegate> ? localizationsDelegates, LocaleListResolutionCallback? localeListResolutionCallback, LocaleResolutionCallback? localeResolutionCallback, String? title, GenerateAppTitle? onGenerateTitle, Color? color, TextStyle? textStyle, String? fontFamily, Color? accent, Color? success, Color? warning, Color? danger, ScrollBehavior? scrollBehavior, bool debugShowCheckedModeBanner = true, Map<Type, Action< ? actions, Map<Intent> >ShortcutActivator, Intent> ? shortcuts, SystemUiOverlayStyle? statusBarStyle}) -
Creates a jade app whose navigation is driven by a Router, such as
go_router. Return JadePage or FadePage from the router's page builders so pages get jade transitions.const
Properties
- accent → Color?
-
Brand color seeded into the
accentrole of both theme and darkTheme.final -
actions
→ Map<
Type, Action< ?Intent> > -
Actions that are available across the app.
final
- backButtonDispatcher → BackButtonDispatcher?
-
Reports system back presses to a JadeApp.router.
final
- builder → TransitionBuilder?
-
Wraps the navigator in custom widgets (e.g. a theme scope or shell).
final
- color → Color?
-
Primary color the system uses to identify the app, for example in task switchers. Defaults to white.
final
- danger → Color?
-
Base color seeded into the
dangerrole of both theme and darkTheme with Colors.withStatus. When null, the theme's role is used unchanged.final - darkTheme → ThemeData?
-
The dark ThemeData, used when themeMode resolves to dark.
final
- debugShowCheckedModeBanner → bool
-
Whether to show the debug banner in debug builds.
final
- fontFamily → String?
-
Default font family for text that doesn't declare one.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- home → Widget?
-
The widget shown for the app's default route.
final
- initialRoute → String?
-
Name of the first route to show.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → Locale?
-
Locale used by the app. When null the platform locale is matched against supportedLocales.
final
- localeListResolutionCallback → LocaleListResolutionCallback?
-
Chooses the app locale from the platform's list of preferred locales.
final
- localeResolutionCallback → LocaleResolutionCallback?
-
Chooses the app locale from the platform's preferred locale.
final
-
localizationsDelegates
→ Iterable<
LocalizationsDelegate> ? -
Delegates for localized resources. They are used in addition to the delegate for jade's own strings.
final
-
Key for the app's Navigator.
final
-
Observers that are notified of navigation changes.
final
- onGenerateRoute → RouteFactory?
-
Generates routes for names that routes does not define.
final
- onGenerateTitle → GenerateAppTitle?
-
Generates the app title from the current context.
final
- onUnknownRoute → RouteFactory?
-
Called when no route could be built for a name.
final
- pageRouteBuilder → PageRouteFactory?
-
Builds the PageRoute for routes created from home and routes.
final
-
routeInformationParser
→ RouteInformationParser<
Object> ? -
Parses route information into the app state of a JadeApp.router.
final
- routeInformationProvider → RouteInformationProvider?
-
Supplies route information from the platform to a JadeApp.router.
final
-
routerConfig
→ RouterConfig<
Object> ? -
Router configuration of a JadeApp.router, such as a
GoRouter.final -
routerDelegate
→ RouterDelegate<
Object> ? -
Builds the navigator of a JadeApp.router from the app state.
final
-
routes
→ Map<
String, WidgetBuilder> -
The app's route table, keyed by route name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollBehavior → ScrollBehavior?
-
Scroll behavior of the app. Defaults to JadeScrollBehavior.
final
-
shortcuts
→ Map<
ShortcutActivator, Intent> ? -
Keyboard shortcuts that are available across the app.
final
- statusBarStyle → SystemUiOverlayStyle?
-
Fixed system status bar content style. When null, the style follows the
active theme brightness: light icons in dark mode, dark icons in light.
final
- success → Color?
-
Base color seeded into the
successrole of both theme and darkTheme with Colors.withStatus. When null, the theme's role is used unchanged.final -
supportedLocales
→ Iterable<
Locale> -
Locales the app supports. Defaults to English.
final
- textStyle → TextStyle?
-
Default text style of the app. Defaults to the theme's small body style.
final
- theme → ThemeData?
-
The light ThemeData.
final
- themeMode → ThemeMode
-
How the active theme is chosen.
final
- title → String?
-
Title the system shows for the app.
final
- warning → Color?
-
Base color seeded into the
warningrole of both theme and darkTheme with Colors.withStatus. When null, the theme's role is used unchanged.final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< JadeApp> -
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