WidgetFactory class

Class that handles Widget related operations.

Constructors

WidgetFactory()

Properties

actions ActionFactory
no setter
appContext BuildContext
no setter
appNavigator NavigatorState
no setter
hashCode int
The hash code for this object.
no setterinherited
log → Logger
final
properties PropertyFactory
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildActivityIndicator(BuildContext context) Widget
Builds the generic activity indicator used throughout the app.
buildRoute(WidgetNodeSpec spec, {Map? state}) MaterialPageRoute
Creates a MaterialPageRoute for a given Screen spec.
buildScreen(BuildContext context, WidgetNodeSpec spec, {Map? state}) Widget
Builds a LowderScreen based on its spec.
buildWidget(BuildContext context, Map spec, Map state, Map? parentContext) Widget
Transforms a Map spec to a WidgetNodeSpec spec and executes buildWidgetFromSpec.
buildWidgetFromSpec(BuildContext context, WidgetNodeSpec spec, Map state, Map? parentContext) Widget
Executes a Widget build from a spec.
createWidget(BuildContext context, WidgetNodeSpec spec, Map state, Map? parentContext) Widget
Creates a Widget based on its spec.
getCheckboxValidator(Map spec) CheckboxValidationFunction
Convenience method returning a generic validator for bool input Widgets.
getEvaluatorContext(Object? value, Map state, Map? specContext) Map
Returns a Map with the evaluation context used when sanitizing properties of a NodeSpec. Used to resolve properties that use placeholders as values, like "${state.firstName}" or "${env.api_uri}".
getGlobalBlocConsumer(BlocBuilderFunction builder, {BlocListenerFunction? listener, WidgetNodeSpec? node}) Widget
Convenience method to instantiate a GlobalBlocConsumer and facilitate overriding.
getLocalBlocConsumer(BlocBuilderFunction builder, {BlocListenerFunction? listener}) Widget
Convenience method to instantiate a LocalBlocConsumer and facilitate overriding.
getPropertySchema(String type) Map<String, EditorPropertyType>
Returns a Widget's propery schema.
getStringValidator(Map spec) StringValueValidationFunction
Convenience method returning a generic validator for string input Widgets.
getTemplate(String? id) Map
Returns the Template node with the given id from the Model.
handleDecorator(BuildContext context, Widget widget, WidgetNodeSpec spec) Widget
Handles convenience 'decoration' property.
handleExpanded(BuildContext context, Widget widget, WidgetNodeSpec spec) Widget
Handles convenience 'wrapExpanded' property.
handleHero(BuildContext context, Widget widget, WidgetNodeSpec spec) Widget
Handles convenience 'hero' property.
handleMargin(BuildContext context, Widget widget, WidgetNodeSpec spec) Widget
Handles convenience 'margin' property.
handleSafeArea(BuildContext context, Widget widget, WidgetNodeSpec spec) Widget
Handles convenience 'safeArea' property.
handleVisibility(BuildContext context, Widget widget, WidgetNodeSpec spec) Widget
Handles convenience 'visible' property.
hideActivityIndicator() → void
Hides the activity indicator.
internalBuildScreen(BuildContext context, WidgetNodeSpec spec, Map screenState) Widget
Builds a LowderScreen based on its spec.
loadWidgets(IWidgets widgets) → void
Schema loading
mergeMaps(Map map1, Map map2) → void
Utility method to merge two Maps.
mergeTemplateAndState(WidgetNodeSpec spec, Map template, Map state, Map parentContext) → void
Sanitizes the properties of a spec using template and string evaluation. E.g.: a property valued "${state.firstName}" will have its value replaced with the state's "firstName" key value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postBuild(BuildContext context, Widget widget, WidgetNodeSpec spec) Widget
Handles generic convenience properties from a spec, like decoration, margin or visibility.
preBuild(BuildContext context, WidgetNodeSpec spec, Map state, Map? parentContext) → void
Evaluates properties and applies the template.
showActivityIndicator({BuildContext? context, Map? props}) → void
Shows the activity indicator.
showConfirmation({String? title, String? message, Map? props, BuildContext? context}) Future<bool>
Builds a confirmation dialog with a given title and message.
showMessage({String type = "info", String? message, Map? props, GestureTapCallback? onTap, BuildContext? context}) Future<void>
Builds a dialog displaying message.
toString() String
A string representation of this object.
inherited
tryBuildWidget(BuildContext context, dynamic spec, Map state, Map? parentContext) Widget?
Tries to execute a Widget build from a spec.

Operators

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

Static Properties

activityIndicatorRoute DialogRoute?
getter/setter pair