A convenience class that wraps a number of widgets that are commonly required for an application.

See also: CheckedModeBanner, DefaultTextStyle, MediaQuery, LocaleQuery, Title, Navigator, Overlay, SemanticsDebugger (the widgets wrapped by this one).

The onGenerateRoute argument is required, and corresponds to Navigator.onGenerateRoute.

Inheritance

Static Properties

showPerformanceOverlayOverride bool

If true, forces the performance overlay to be visible in all instances.

read / write

Constructors

WidgetsApp({Key key, @required RouteFactory onGenerateRoute, String title, TextStyle textStyle, @required Color color, NavigatorObserver navigatorObserver, String initialRoute, LocaleChangedCallback onLocaleChanged, bool showPerformanceOverlay: false, bool checkerboardRasterCacheImages: false, bool showSemanticsDebugger: false, bool debugShowCheckedModeBanner: true })

Creates a widget that wraps a number of widgets that are commonly required for an application.

Properties

checkerboardRasterCacheImages bool

Checkerboards raster cache images.

read-only
color Color

The primary color to use for the application in the operating system interface.

read-only
debugShowCheckedModeBanner bool

Turns on a "SLOW MODE" little banner in checked mode to indicate that the app is in checked mode. This is on by default (in checked mode), to turn it off, set the constructor argument to false. In release mode this has no effect.

read-only
initialRoute String

The name of the first route to show.

read-only

The observer for the Navigator created for this app.

read-only
onGenerateRoute RouteFactory

The route generator callback used when the app is navigated to a named route.

read-only
onLocaleChanged LocaleChangedCallback

Callback that is called when the operating system changes the current locale.

read-only
showPerformanceOverlay bool

Turns on a performance overlay. https://flutter.io/debugging/#performanceoverlay

read-only
showSemanticsDebugger bool

Turns on an overlay that shows the accessibility information reported by the framework.

read-only
textStyle TextStyle

The default text style for Text in the application.

read-only
title String

A one-line description of this app for use in the window manager.

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
key Key

Controls how one widget replaces another widget in the tree.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

createState() → _WidgetsAppState

Creates the mutable state for this widget at a given location in the tree.

createElement() StatefulElement

Creates a StatefulElement to manage this widget's location in the tree.

inherited
debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited
toStringShort() String

A short, textual description of this widget.

inherited