NmApp class

A MaterialApp wired to NmTheme, library localizations and a persisted NmLocaleController.

Pass routerConfig to use the router variant.

Inheritance

Constructors

NmApp({Key? key, NmTheme theme = const NmTheme(), required NmLocaleController localeController, List<Locale> supportedLocales = NmL10n.mustLocales, Iterable<LocalizationsDelegate> localizationsDelegates = const [], String title = '', GenerateAppTitle? onGenerateTitle, Widget? home, RouterConfig<Object>? routerConfig, GlobalKey<NavigatorState>? navigatorKey, TransitionBuilder? builder, bool debugShowCheckedModeBanner = false})
Creates an NmApp.
const

Properties

builder → TransitionBuilder?
Wraps every route (fonts, overlays …).
final
debugShowCheckedModeBanner → bool
Shows the debug banner.
final
hashCode → int
The hash code for this object.
no setterinherited
home → Widget?
First screen (with a navigator).
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
localeController → NmLocaleController
Language choice (system default, persisted).
final
localizationsDelegates → Iterable<LocalizationsDelegate>
App-level delegates (e.g. the app's own AppLocalizations).
final
Key of the root navigator.
final
onGenerateTitle → GenerateAppTitle?
Localized title, preferred over title.
final
routerConfig → RouterConfig<Object>?
Router configuration, instead of home.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportedLocales → List<Locale>
Locales the app offers. Library strings fall back to English for any locale the library does not translate.
final
theme → NmTheme
Palette, style, density and light / dark mode.
final
title → String
Title for the OS task switcher.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<NmApp>
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

Static Methods

delegates([Iterable<LocalizationsDelegate> app = const []]) → List<LocalizationsDelegate>
All delegates an app needs for library + Material/Cupertino strings.