404: Something's gone wrong :-(
46 | 47 |You've tried to visit a page that doesn't exist. Luckily this site 49 | has other pages.
50 |If you were looking for something specific, try searching: 51 |
54 | 55 | 56 |You've tried to visit a page that doesn't exist. Luckily this site 49 | has other pages.
50 |If you were looking for something specific, try searching: 51 |
54 | 55 | 56 |Creates a Debouncer that executes a function after a certain length of time in milliseconds
60 |Debouncer({this.milliseconds});
67 | A callback function to execute
61 |VoidCallback? action;
67 |
68 |
69 | A length of time in milliseconds used to delay a function call
61 |final int? milliseconds;
67 |
68 |
69 | run(VoidCallback action) {
69 | if (_timer != null) {
70 | _timer!.cancel();
71 | }
72 | _timer = Timer(Duration(milliseconds: milliseconds!), action);
73 | }
74 | A controller for an editable text field
61 |final TextEditingController controller;
67 |
68 |
69 | Creates a StatefulElement
to manage this widget's location in the tree.
It is uncommon for subclasses to override this method.
70 |@override
77 | StatefulElement createElement() => StatefulElement(this);
78 | Creates the mutable state for this widget at a given location in the tree.
69 |Subclasses should override this method to return a newly created
70 | instance of their associated State
subclass:
@override
72 | State<MyWidget> createState() => _MyWidgetState();
73 |
74 | The framework can call this method multiple times over the lifetime of
75 | a StatefulWidget
. For example, if the widget is inserted into the tree
76 | in multiple locations, the framework will create a separate State
object
77 | for each location. Similarly, if the widget is removed from the tree and
78 | later inserted into the tree again, the framework will call createState
79 | again to create a fresh State
object, simplifying the lifecycle of
80 | State
objects.
@override
88 | _TextFieldSearchState createState() => _TextFieldSearchState();
89 | Returns a list of DiagnosticsNode
objects describing this node's
69 | children.
Children that are offstage should be added with style
set to
71 | DiagnosticsTreeStyle.offstage
to indicate that they are offstage.
The list must not contain any null entries. If there are explicit null
73 | children to report, consider new DiagnosticsNode.message
or
74 | DiagnosticsProperty<Object>
as possible DiagnosticsNode
objects to
75 | provide.
Used by toStringDeep, toDiagnosticsNode and toStringShallow.
77 |See also:
78 |RenderTable.debugDescribeChildren
, which provides high quality custom
80 | descriptions for its child nodes.@protected
89 | List<DiagnosticsNode> debugDescribeChildren() => const <DiagnosticsNode>[];
90 | Used for customizing the display of the TextField
61 |final InputDecoration? decoration;
67 |
68 |
69 | An optional future or async function that should return a list of selectable elements
61 |final Function? future;
67 |
68 |
69 | The value selected on tap of an element within the list
61 |final Function? getSelectedValue;
67 |
68 |
69 | A default list of values that can be used for an initial list of elements to select from
61 |final List? initialList;
67 |
68 |
69 | Controls how one widget replaces another widget in the tree.
61 |If the runtimeType and key properties of the two widgets are
62 | operator==, respectively, then the new widget replaces the old widget by
63 | updating the underlying element (i.e., by calling Element.update
with the
64 | new widget). Otherwise, the old element is removed from the tree, the new
65 | widget is inflated into an element, and the new element is inserted into the
66 | tree.
In addition, using a GlobalKey
as the widget's key allows the element
68 | to be moved around the tree (changing parent) without losing state. When a
69 | new widget is found (its key and type do not match a previous widget in
70 | the same location), but there was a widget with that same global key
71 | elsewhere in the tree in the previous frame, then that widget's element is
72 | moved to the new location.
Generally, a widget that is the only child of another widget does not need 74 | an explicit key.
75 |See also:
76 |Key
and GlobalKey
.final Key? key;
85 |
86 |
87 | A string used for display of the selectable elements
61 |final String label;
67 |
68 |
69 | The minimum length of characters to be entered into the TextField before executing a search
61 |final int minStringLength;
67 |
68 |
69 | The equality operator.
71 |The default behavior for all Objects is to return true if and
72 | only if this object and other
are the same object.
Override this method to specify a different equality relation on 74 | a class. The overriding method must still be an equivalence relation. 75 | That is, it must be:
76 |Total: It must return a boolean for all arguments. It should never throw.
79 |Reflexive: For all objects o
, o == o
must be true.
Symmetric: For all objects o1
and o2
, o1 == o2
and o2 == o1
must
85 | either both be true, or both be false.
Transitive: For all objects o1
, o2
, and o3
, if o1 == o2
and
89 | o2 == o3
are true, then o1 == o3
must be true.
The method should also be consistent over time, 93 | so whether two objects are equal should only change 94 | if at least one of the objects was modified.
95 |If a subclass overrides the equality operator, it should override 96 | the hashCode method as well to maintain consistency.
97 |@override
104 | @nonVirtual
105 | bool operator ==(Object other) => super == other;
106 | Used for customizing the style of the text within the TextField
61 |final TextStyle? textStyle;
67 |
68 |
69 | Returns a debug representation of the object that is used by debugging
71 | tools and by DiagnosticsNode.toStringDeep
.
Leave name
as null if there is not a meaningful description of the
73 | relationship between the this node and its parent.
Typically the style
argument is only specified to indicate an atypical
75 | relationship between the parent and the node. For example, pass
76 | DiagnosticsTreeStyle.offstage
to indicate that a node is offstage.
@override
84 | DiagnosticsNode toDiagnosticsNode({ String? name, DiagnosticsTreeStyle? style }) {
85 | return DiagnosticableTreeNode(
86 | name: name,
87 | value: this,
88 | style: style,
89 | );
90 | }
91 | A string representation of this object.
70 |Some classes have a default textual representation,
71 | often paired with a static parse
function (like int.parse).
72 | These classes will provide the textual representation as
73 | their string representation.
Other classes have no meaningful textual representation
75 | that a program will care about.
76 | Such classes will typically override toString
to provide
77 | useful information when inspecting the object,
78 | mainly for debugging or logging.
@override
86 | String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) {
87 | String? fullString;
88 | assert(() {
89 | fullString = toDiagnosticsNode(style: DiagnosticsTreeStyle.singleLine).toString(minLevel: minLevel);
90 | return true;
91 | }());
92 | return fullString ?? toStringShort();
93 | }
94 | Returns a string representation of this node and its descendants.
67 |prefixLineOne
will be added to the front of the first line of the
68 | output. prefixOtherLines
will be added to the front of each other line.
69 | If prefixOtherLines
is null, the prefixLineOne
is used for every line.
70 | By default, there is no prefix.
minLevel
specifies the minimum DiagnosticLevel
for properties included
72 | in the output.
The toStringDeep method takes other arguments, but those are intended 74 | for internal use when recursing to the descendants, and so can be ignored.
75 |See also:
76 |String toStringDeep({
88 | String prefixLineOne = '',
89 | String? prefixOtherLines,
90 | DiagnosticLevel minLevel = DiagnosticLevel.debug,
91 | }) {
92 | return toDiagnosticsNode().toStringDeep(prefixLineOne: prefixLineOne, prefixOtherLines: prefixOtherLines, minLevel: minLevel);
93 | }
94 | A short, textual description of this widget.
69 |@override
76 | String toStringShort() {
77 | final String type = objectRuntimeType(this, 'Widget');
78 | return key == null ? type : '$type-$key';
79 | }
80 |