public static FocusOrder of(BuildContext context, bool nullOk = false) { D.assert(context != null); FocusTraversalOrder marker = context.getElementForInheritedWidgetOfExactType <FocusTraversalOrder>()?.widget as FocusTraversalOrder; FocusOrder order = marker?.order; if (order == null && !nullOk) { throw new UIWidgetsError("FocusTraversalOrder.of() was called with a context that " + "does not contain a TraversalOrder widget. No TraversalOrder widget " + "ancestor could be found starting from the context that was passed to " + "FocusTraversalOrder.of().\n" + "The context used was:\n" + $" {context}"); } return(order); }
protected override int doCompare(FocusOrder other) { other = (LexicalFocusOrder)other; return(order.CompareTo(((LexicalFocusOrder)other).order)); }
protected override int doCompare(FocusOrder other) { other = (NumericFocusOrder)other; return(order.CompareTo(((NumericFocusOrder)other).order)); }
protected abstract int doCompare(FocusOrder other);
public FocusTraversalOrder(Key key = null, FocusOrder order = null, Widget child = null) : base(key: key, child: child) { this.order = order; }