JsonSemanticsBuilder class

Builder that can build an Semantics widget. See the fromDynamic for the format.

Inheritance

Constructors

JsonSemanticsBuilder({AttributedString? attributedDecreasedValue, AttributedString? attributedHint, AttributedString? attributedIncreasedValue, AttributedString? attributedLabel, AttributedString? attributedValue, bool? button, bool? checked, Map<CustomSemanticsAction, VoidCallback>? customSemanticsActions, bool container = false, int? currentValueLength, String? decreasedValue, bool? enabled, bool excludeSemantics = false, bool explicitChildNodes = false, bool? focusable, bool? focused, bool? header, bool? hidden, String? hint, bool? image, bool? inMutuallyExclusiveGroup, String? increasedValue, bool? keyboardKey, String? label, bool? link, bool? liveRegion, int? maxValueLength, bool? multiline, bool? namesRoute, bool? obscured, VoidCallback? onCopy, VoidCallback? onCut, VoidCallback? onDecrease, VoidCallback? onDidGainAccessibilityFocus, VoidCallback? onDidLoseAccessibilityFocus, VoidCallback? onDismiss, VoidCallback? onIncrease, VoidCallback? onLongPress, String? onLongPressHint, ValueChanged<bool>? onMoveCursorBackwardByCharacter, ValueChanged<bool>? onMoveCursorForwardByCharacter, VoidCallback? onPaste, VoidCallback? onScrollDown, VoidCallback? onScrollLeft, VoidCallback? onScrollRight, VoidCallback? onScrollUp, ValueChanged<TextSelection>? onSetSelection, ValueChanged<String>? onSetText, VoidCallback? onTap, String? onTapHint, bool? readOnly, bool? scopesRoute, bool? selected, bool? slider, SemanticsSortKey? sortKey, SemanticsTag? tagForChildren, TextDirection? textDirection, bool? textField, bool? toggled, String? value})

Properties

attributedDecreasedValue AttributedString?
final
attributedHint AttributedString?
final
attributedIncreasedValue AttributedString?
final
attributedLabel AttributedString?
final
attributedValue AttributedString?
final
button bool?
final
checked bool?
final
container bool
final
currentValueLength int?
final
customSemanticsActions Map<CustomSemanticsAction, VoidCallback>?
final
decreasedValue String?
final
enabled bool?
final
excludeSemantics bool
final
explicitChildNodes bool
final
focusable bool?
final
focused bool?
final
hashCode int
The hash code for this object.
no setterinherited
final
hidden bool?
final
hint String?
final
image bool?
final
increasedValue String?
final
inMutuallyExclusiveGroup bool?
final
keyboardKey bool?
final
label String?
final
final
liveRegion bool?
final
maxValueLength int?
final
multiline bool?
final
namesRoute bool?
final
numSupportedChildren int
finalinherited
obscured bool?
final
onCopy VoidCallback?
final
onCut VoidCallback?
final
onDecrease VoidCallback?
final
onDidGainAccessibilityFocus VoidCallback?
final
onDidLoseAccessibilityFocus VoidCallback?
final
onDismiss VoidCallback?
final
onIncrease VoidCallback?
final
onLongPress VoidCallback?
final
onLongPressHint String?
final
onMoveCursorBackwardByCharacter ValueChanged<bool>?
final
onMoveCursorForwardByCharacter ValueChanged<bool>?
final
onPaste VoidCallback?
final
onScrollDown VoidCallback?
final
onScrollLeft VoidCallback?
final
onScrollRight VoidCallback?
final
onScrollUp VoidCallback?
final
onSetSelection ValueChanged<TextSelection>?
final
onSetText ValueChanged<String>?
final
onTap VoidCallback?
final
onTapHint String?
final
preferredSizeWidget bool
finalinherited
readOnly bool?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopesRoute bool?
final
selected bool?
final
slider bool?
final
sortKey SemanticsSortKey?
final
tagForChildren SemanticsTag?
final
textDirection TextDirection?
final
textField bool?
final
toggled bool?
final
value String?
final

Methods

build({required ChildWidgetBuilder? childBuilder, required BuildContext context, required JsonWidgetData data}) Widget
Builds the widget. If there are dynamic keys on the data object, and the widget is not a PreferredSizeWidget, then the returned widget will be wrapped by a stateful widget that will rebuild if any of the dynamic args change in value.
inherited
buildCustom({ChildWidgetBuilder? childBuilder, required BuildContext context, required JsonWidgetData data, Key? key}) Widget
Custom builder that subclasses must override and implement to return the actual Widget to be placed on the tree.
override
getChild(JsonWidgetData? data, {int index = 0}) JsonWidgetData
Returns a non-null child for widgets that must always have child widgets. This allows the widget to be built and rendered even if the child is missing.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(JsonWidgetData data) → void
Called when a JSON widget is removed from the tree due to a conditional. Custom widgets may need to implement this to clean up values that may have been placed on the JsonWidgetRegistry by the widget.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromDynamic(dynamic map, {JsonWidgetRegistry? registry}) JsonSemanticsBuilder?
Builds the builder from a Map-like dynamic structure. This expects the JSON format to be of the following structure:

Constants

kNumSupportedChildren → const int
type → const String