FleuryApp class

The app-scale shell: it installs the app's theme, its commands with their keyboard shortcuts, a StatusController for status items, typed extensions, focus traversal, and the app's semantic node, labeled title; then it shows home in a root Navigator, or your own child shell.

Pass home for the standard app shell. Fleury installs a root Navigator below every app-owned scope, so all pushed routes retain the same theme, commands, status, extensions, and data sources.

Pass child instead when the app owns a custom shell, including its own navigation. Exactly one of home and child must be provided.

Descendants reach the app through FleuryApp.of, which returns its FleuryAppController.

Inheritance
Available extensions

Constructors

FleuryApp({Key? key, required String title, List<AppCommand> commands = const <AppCommand>[], List<Object> extensions = const <Object>[], AppStatusBuilder? status, ThemeData? theme, Widget? home, Widget? child})
const

Properties

child → Widget?
Explicit custom shell escape hatch.
final
commands → List<AppCommand>
App-wide commands: named actions that shortcuts, command palettes, agents, and tests can run on any screen.
final
extensions → List<Object>
App-owned objects that descendants and commands look up by type, such as a workspace or a service client: FleuryApp.extension in a widget, FleuryCommandContext.appExtension in a command. The first entry assignable to the requested type wins.
final
hashCode → int
The hash code for this object.
no setterinherited
home → Widget?
Initial route for Fleury's standard root Navigator.
final
key → Key?
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → AppStatusBuilder?
Builds the status items the app derives from its own state, such as the current branch or a connection's health. An AppStatusBar placed in the app displays them; FleuryApp draws none itself.
final
theme → ThemeData?
App-wide theme installed above the standard or custom shell.
final
title → String
The app's name, used as the label of the app's semantic node (SemanticRole.app), which is how agents and tests identify the app. It isn't shown in the app's UI, and it doesn't set the terminal's window or tab title.
final

Methods

animate({Duration? duration, Curve? curve, Object? trigger, bool repeat = false}) → Animate

Available on Widget, provided by the AnimateExtension extension

Starts an Animate chain over this widget. duration / curve apply to the whole chain. With no trigger it plays on mount; with a non-null trigger it rests on mount and replays whenever the token changes.
createElement() → StatefulElement
Creates the Element that will mount this widget into the tree.
inherited
createState() → State<FleuryApp>
Creates the mutable state for this widget at the current location in the tree. Called exactly once per StatefulElement instance.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

dataSource<T extends Object>(BuildContext context) → T
Like maybeDataSource, but throws a StateError when no data source matches.
extension<T extends Object>(BuildContext context) → T
Like maybeExtension, but throws a StateError when no extension matches.
maybeDataSource<T extends Object>(BuildContext context) → T?
The first data source assignable to T among those the nearest app's FleuryAppExtensions contribute, or null when none is or there is no FleuryApp above context.
maybeExtension<T extends Object>(BuildContext context) → T?
The first of the nearest app's extensions assignable to T, or null when none is or there is no FleuryApp above context.
maybeOf(BuildContext context) → FleuryAppController?
Like of, but null when there is no FleuryApp above context.
of(BuildContext context) → FleuryAppController
The controller of the nearest FleuryApp above context.