BloomApp class
Root application widget for Bloom applications.
Wraps ui.BloomApp.router, initializes the BloomLifecycleManager,
attaches SSR/prerender signaling hooks, and wires GoRouter navigation.
Example:
void main() => runApp(
BloomApp(
title: 'My App',
routes: [
BloomRouter.route(path: '/', builder: (context, match) => const HomeScreen()),
],
),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BloomApp
Constructors
-
BloomApp({Key? key, String? title, RouterConfig<
Object> ? routerConfig, List<RouteBase> ? routes, String initialLocation = '/', BloomTheme? theme, BloomTheme? darkTheme, BloomThemeMode themeMode = ui.BloomThemeMode.system, Locale? locale, Iterable<LocalizationsDelegate> ? localizationsDelegates, Iterable<Locale> ? supportedLocales, bool debugShowCheckedModeBanner = false, Widget? home}) -
Creates a BloomApp root widget.
const
Properties
- darkTheme → BloomTheme?
-
Dark theme definition.
final
- debugShowCheckedModeBanner → bool
-
Whether to show the debug banner in the top-right corner.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- home → Widget?
-
Fallback home widget when routes and routerConfig are not specified.
final
- initialLocation → String
-
Initial route location (defaults to
'/').final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → Locale?
-
Active application locale.
final
-
localizationsDelegates
→ Iterable<
LocalizationsDelegate> ? -
Localization delegates for internationalization.
final
-
routerConfig
→ RouterConfig<
Object> ? -
Custom RouterConfig instance. If omitted, constructed automatically from routes.
final
-
routes
→ List<
RouteBase> ? -
List of GoRouter route declarations used to build the default router.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedLocales
→ Iterable<
Locale> ? -
Supported locales list.
final
- theme → BloomTheme?
-
Light theme definition.
final
- themeMode → BloomThemeMode
-
Active theme mode (system, light, or dark).
final
- title → String?
-
Application title string displayed in task switchers and web document titles.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BloomApp> -
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