xwidget library

Classes

Analytics
Captures, aggregates, persists, and flushes analytics events to the XWidget Cloud analytics server.
AnalyticsNavigatorObserver
A NavigatorObserver that automatically tracks navigation events for XWidget Cloud analytics.
Children
CloudResources
Loads resources from XWidget Cloud's content server.
Controller
Base class for all controllers.
ControllerWidget
A StatefulWidget that creates and manages a Controller instance.
ControllerWidgetInflater
Dependencies
DynamicBuilder<T>
DynamicBuilderInflater
DynamicBuilderState<T>
ELGrammarDefinition
Grammar definition for the Expression Language (EL).
ELParser
ELParserDefinition
EventListener
EventListenerInflater
EventListenerState
Expression<T>
Base class for all expressions in the expression language.
Fragment
FragmentPlaceholder
FragmentResourceBundle
Inflater<T>
The base class for all inflaters.
InflaterDef
A class annotation for custom widget inflaters.
ItemInflater
ListInflater
LocalResources
Loads resources from Flutter's asset bundle.
MapEntryInflater
MapInflater
MaterialStatePropertyOf<T>
MediaQueryWidget
MediaQueryWidgetInflater
Model
Models
ModelValueNotifier
A ValueNotifier that holds a single value.
ParamInflater
PathInfo
A simple dot/bracket notation path parser.
PathResolution
PropertyTransformer<T>
PropertyTranslation
ResolvedRoute
The result of resolving a navigation target to a route.
ResourceBundle
Resources
Base class for resource loading configurations.
Session
Tag
The base class for all tags.
TranslatedProperty
TypeConverters
ValueListener
ValueListenerInflater
ValueListenerState
ValueResourceBundle
XRouter
Minimal singleton router for XWidget applications.
XWidget
XWidgetConfig
Framework-wide runtime configuration.
XWidgetUtils

Extensions

ColorExt on Color
ListBrackets on List
ListExt on List<E>
MapBrackets on Map<String, dynamic>
A simple utility for retrieving data using dot/bracket notation. As long as your data follows a simple convention you can use a simplified dot/bracket notation to locate any piece of data in your hierarchy. Searches return null if no data is found or if the path string is invalid.
MapExt on Map<K, V>

Constants

millisDays → const int
millisHours → const int
millisMins → const int
millisSecs → const int

Functions

abs(dynamic value) num?
Returns the absolute value of value.
ceil(dynamic value) int?
Returns the smallest integer greater than or equal to value.
clamp(dynamic value, dynamic lower, dynamic upper) → dynamic
Clamps a value to the range lower..upper.
contains(dynamic value, dynamic searchValue) bool
Returns true if value contains searchValue.
containsKey(Map? map, dynamic searchKey) bool
Returns true if map contains the given searchKey.
containsValue(Map? map, dynamic searchValue) bool
Returns true if map contains the given searchValue.
createMaterialColor(Color color) MaterialColor
deepEquals(dynamic obj1, dynamic obj2) bool
Performs a deep equality comparison between obj1 and obj2.
deepHashCode(dynamic value) int
Computes a deep hash code for value.
defaultBottomSheetScrimBuilder(BuildContext context, Animation<double> animation) Widget
diffDateTime(DateTime left, DateTime right) Duration
Returns the absolute difference between two DateTimes.
endsWith(String? value, String searchValue) bool
Returns true if value ends with searchValue.
first(dynamic value) → dynamic
Returns the first element of value.
floor(dynamic value) int?
Returns the largest integer less than or equal to value.
isBlank(String? value) bool
Returns true if value is null or consists only of whitespace.
isEmpty(dynamic value) bool
Returns true if value is empty or null.
isFalse(dynamic value) bool
Returns true if value evaluates to boolean false.
isFalseOrNull(dynamic value) bool
Returns true if value is null or evaluates to boolean false.
isNotBlank(String? value) bool
Returns true if value is not blank.
isNotEmpty(dynamic value) bool
Returns true if value is not empty.
isNotNull(dynamic value) bool
Returns true if value is not null.
isNull(dynamic value) bool
Returns true if value is null.
isTrue(dynamic value) bool
Returns true if value evaluates to boolean true.
isTrueOrNull(dynamic value) bool
Returns true if value is null or evaluates to boolean true.
last(dynamic value) → dynamic
Returns the last element of value.
length(dynamic value) int
Returns the length of value.
mapsEqual(Map a, Map b) bool
Compares two maps a and b for shallow equality.
matches(String? value, String regExp) bool
Returns true if value fully matches the given regExp.
max(dynamic a, dynamic b) → dynamic
Returns the larger of two values.
min(dynamic a, dynamic b) → dynamic
Returns the smaller of two values.
nonNullType(Type type) String
Returns the non‑nullable form of a Type.
now() DateTime
Returns the current UTC DateTime.
nowUtc() DateTime
Returns this DateTime value in the UTC time zone.
parseAlignment(String? value) Alignment?
parseAlignmentDirectional(String? value) AlignmentDirectional?
parseAlignmentGeometry(String? value) AlignmentGeometry?
parseBool(String? value) bool?
Parses a string into a bool.
parseBorderRadius(String? value) BorderRadius?
parseColor(String? value) Color?
Parses a hex string into a Color.
parseCurve(String? value) Curve?
parseDateTime(String? value) DateTime?
Parses a string into a DateTime.
parseDouble(String? value) double?
Parses a string into a double.
parseDuration(String? value) Duration?
Parses a string into a Duration.
parseEdgeInsets(String? value) EdgeInsets?
parseEdgeInsetsGeometry(String? value) EdgeInsetsGeometry?
parseEnum<T extends Enum>(List<T> values, String? value) → T?
Parses a string into an enum constant of type T.
parseEvent(String value) Enum
parseFontWeight(String? value) FontWeight?
parseIcon(String? value) IconData?
parseInputBorder(String? value) InputBorder?
parseInt(String? value, {int? radix}) int?
Parses a string into an int.
parseKey(String? value) Key?
parseListOfDoubles(String? value) List<double>?
Parses a comma‑separated string into a list of doubles.
parseListOfInts(String? value) List<int>?
Parses a comma‑separated string into a list of ints.
parseListOfStrings(String? value) List<String>?
Parses a comma‑separated string into a list of strings.
parseLocale(String? value) Locale?
parseMaterialColor(String? value) MaterialColor?
parseOffset(String? value) Offset?
parseRadius(String? value) Radius?
parseRect(String? value) Rect?
parseSize(String? value) Size?
parseTextDecoration(String? value) TextDecoration?
parseTextInputType(String? value) TextInputType?
parseVisualDensity(String? value) VisualDensity?
parseWidgetStateColor(String? value) WidgetStateProperty<Color>?
parseWidgetStateDouble(String? value) WidgetStateProperty<double>?
parseWidgetStateEdgeInsets(String? value) WidgetStateProperty<EdgeInsetsGeometry>?
parseWidgetStateSize(String? value) WidgetStateProperty<Size>?
randomDouble() double
Generates a non-negative random floating point value uniformly distributed in the range from 0.0, inclusive, to 1.0, exclusive.
randomInt(int max) int
Generates a non-negative random integer uniformly distributed in the range from 0, inclusive, to max, exclusive.
registerFunction(String name, Function func) → void
Registers a global custom func under name, making it callable from any EL expression as a top-level function (e.g., ${myFunc(arg)}).
registerXWidgetEvents(List<Enum> events) → void
replaceAll(String? value, String regExp, String replacement) String?
Replaces all substrings in value that match regExp with replacement.
replaceFirst(String? value, String regExp, String replacement, [int startIndex = 0]) String?
Replaces the first substring in value that matches regExp with replacement.
round(dynamic value) int?
Rounds value to the nearest integer.
startsWith(String? value, String searchFor) bool
Returns true if value starts with searchFor.
substring(String? value, int start, [int end = -1]) String?
Returns a substring of value from start to end.
toBool(dynamic value, [Set? trueValues, Set? falseValues]) bool?
Converts a dynamic value to a bool.
toColor(dynamic value) Color?
Converts a dynamic value to a Color.
toDateTime(dynamic value) DateTime?
Converts a dynamic value to a DateTime.
toDays(dynamic value) int?
Converts a dynamic value to an integer representing days.
toDouble(dynamic value) double?
Converts a dynamic value to an integer representing days.
toDuration(dynamic value, [String? intUnit]) Duration?
Converts a dynamic value to a Duration.
toEnum<T extends Enum>(dynamic value, List<T> values) → T?
Converts a dynamic value to an enum constant of type T.
toHours(dynamic value) int?
Converts a dynamic value to an integer representing hours.
toInt(dynamic value) int?
Converts a dynamic value to an int.
toMillis(dynamic value) int?
Converts a dynamic value to an integer representing milliseconds.
toMinutes(dynamic value) int?
Converts a dynamic value to an integer representing minutes.
toSeconds(dynamic value) int?
Converts a dynamic value to an integer representing seconds.
toString(dynamic value) String?
Converts a dynamic value to a String.
tryParseBool(String? value) bool?
Attempts to parse value into a bool. Returns null instead of throwing if parsing fails.
tryParseDateTime(String? value) DateTime?
Attempts to parse value into a DateTime. Returns null instead of throwing if parsing fails.
tryParseDouble(String? value) double?
Attempts to parse value into a double. Returns null instead of throwing if parsing fails.
tryParseDuration(String? value) Duration?
Attempts to parse value into a Duration. Returns null instead of throwing if parsing fails.
tryParseEnum<T extends Enum>(List<T> values, String? value) → T?
Attempts to parse value into an enum constant of type T. Returns null instead of throwing if parsing fails.
tryParseInt(String? value) int?
Attempts to parse value into an int. Returns null instead of throwing if parsing fails.
tryToBool(dynamic value) bool?
Attempts to convert value to a bool. Returns null instead of throwing if conversion fails.
tryToColor(dynamic value) Color?
Attempts to convert value to a Color. Returns null instead of throwing if conversion fails.
tryToDateTime(dynamic value) DateTime?
Attempts to convert value to a DateTime. Returns null instead of throwing if conversion fails.
tryToDays(dynamic value) int?
Attempts to convert value to days. Returns null instead of throwing if conversion fails.
tryToDouble(dynamic value) double?
Attempts to convert value to a double. Returns null instead of throwing if conversion fails.
tryToDuration(dynamic value, [String? unit]) Duration?
Attempts to convert value to a Duration. Returns null instead of throwing if conversion fails.
tryToEnum<T extends Enum>(List<T> values, dynamic value) → T?
Attempts to convert value to an enum constant of type T. Returns null instead of throwing if conversion fails.
tryToHours(dynamic value) int?
Attempts to convert value to hours. Returns null instead of throwing if conversion fails.
tryToInt(dynamic value) int?
Attempts to convert value to an int. Returns null instead of throwing if conversion fails.
tryToMillis(dynamic value) int?
Attempts to convert value to milliseconds. Returns null instead of throwing if conversion fails.
tryToMinutes(dynamic value) int?
Attempts to convert value to minutes. Returns null instead of throwing if conversion fails.
tryToSeconds(dynamic value) int?
Attempts to convert value to seconds. Returns null instead of throwing if conversion fails.
typeOf<T>() Type
Returns the Type of generic parameter T.

Typedefs

BuilderFunction<T> = Widget Function(BuildContext context, Dependencies dependencies, T initValue)
EventListenerCallback<T extends Enum> = void Function(T event, dynamic payload)
InitializerFunction = dynamic Function(BuildContext context, Dependencies dependencies)
ModelFactory<T extends Model> = T Function(Map<String, dynamic> data, {bool? immutable, PropertyTranslation? translation})
RouteCallback = void Function(int index, String? name, Map<String, dynamic> params)
Callback invoked by the router to change the visible page in a multi-view widget. The implementation determines the widget type: PageController.jumpToPage for PageView, State.setState with an index for IndexedStack, TabController.animateTo for TabBarView.
TypeConverter<T> = T? Function(dynamic value)
UrlSyncCallback = void Function(String path)
Callback invoked when the route changes. Used by the web sync layer to update the browser URL.
XWidgetControllerFactory<T extends Controller> = T Function()