WidgetExtensions
Static Class
Inheritance
objectExtension Methods
Get<T>(property: ThemeProperty <T>, context: I Theme Provider, listen: bool): T
Resolves the value of the given ThemeProperty using the given IThemeProvider. If the context is null, global theme values will be used as a fallback before resorting to the default value of the property.
RemarksThe returned value may be invalid for struct types. Use WidgetExtensions.TryGet in cases where you need to be sure that the value is valid and intentionally assigned.
Parameters
property:
ThemeProperty <T> - The property that is to be resolved.context:
I Theme Provider - The theme provider to use for resolution.listen:
bool - Whether to listen for theme changes if the context supports it.OffendingElement(collector: Information Collector, widget: I Widget Element): Information Collector
Adds information about the offending element to the collector, including a spacer before for better readability.
OffendingWidget(collector: Information Collector, widget: Widget): Information Collector
Adds information about the offending widget to the collector, including a spacer before for better readability.
OwnerChain(collector: Information Collector, context: Build Context): Information Collector
Adds information about this context's owner chain to the collector, including a spacer before for better readability.
ToBuildable(widget: Widget): I Buildable
Converts a Widget instance to an IBuildable.
ToFactory(widget: Widget, apply: Action <Visual Element>): ElementFactory <Visual Element>
Converts a Widget instance to an ElementFactory.
ToWidget(factory: Element Factory): Widget
Converts a generic ElementFactory to a Widget.
TryGet<T>(property: ThemeProperty <T>, context: I Theme Provider, value: T, listen: bool): bool
Attempts to resolve the value of the given ThemeProperty using the given IThemeProvider. If the context is null, global theme values will be used as a fallback before resorting to the default value of the property.
Parameters
property:
ThemeProperty <T> - The property that is to be resolved.context:
I Theme Provider - The theme provider to use for resolution.value:
T - The resolved value of the property.listen:
bool - Whether to listen for theme changes if the context supports it.WithSpace(collector: Information Collector): Information Collector