AppConfig constructor
- required AppBuilder buildApp,
- TransitionBuilder? additionalBuilder,
- required WrapperBuilder defaultTextStyleBuilder,
- required ThemeBrightnessBuilder themeBrightnessBuilder,
A constructor which defines an AppConfig using callbacks.
When passing the buildApp function, the builder parameter should be
passed to the builder attribute of the app widget.
The home parameter should be passed to the home attribute of the app
widget, or if a .router constructor is used, it should be used such
that it is opened as the initial route.
If additionalBuilder is provided, it will be integrated into the
builder parameter and thus can be used similar to how you would use
the builder attribute of a MaterialApp or CupertinoApp for example.
Additionally the widgets from the AddonLayer.affiliationTransition
layer are integrated into the builder parameter of the passed buildApp
function.
The widgets built inside the additionalBuilder can be assumed to be
descendants of the widgets in the AddonLayer.affiliationTransition
layer.
The themeBrightnessBuilder parameter should return the current
Brightness for the app theme.
Implementation
factory AppConfig({
required AppBuilder buildApp,
TransitionBuilder? additionalBuilder,
required WrapperBuilder defaultTextStyleBuilder,
required ThemeBrightnessBuilder themeBrightnessBuilder,
}) => _CallbackAppConfig(
buildApp: buildApp,
additionalBuilder: additionalBuilder,
defaultTextStyleBuilder: defaultTextStyleBuilder,
themeBrightnessBuilder: themeBrightnessBuilder,
);