public FocusAttachment attach(BuildContext context, FocusOnKeyCallback onKey = null)
 {
     _context    = context;
     _onKey      = onKey ?? _onKey;
     _attachment = new FocusAttachment(this);
     return(_attachment);
 }
Esempio n. 2
0
 public FocusNode(
     string debugLabel        = "",
     FocusOnKeyCallback onKey = null,
     bool skipTraversal       = false,
     bool canRequestFocus     = true
     )
 {
     _skipTraversal   = skipTraversal;
     _canRequestFocus = canRequestFocus;
     _onKey           = onKey;
     this.debugLabel  = debugLabel;
 }
 public FocusScopeNode(
     string debugLabel        = null,
     FocusOnKeyCallback onKey = null,
     bool skipTraversal       = false,
     bool canRequestFocus     = true
     ) : base(
         debugLabel: debugLabel,
         onKey: onKey,
         canRequestFocus: canRequestFocus,
         skipTraversal: skipTraversal
         )
 {
 }
Esempio n. 4
0
 public FocusScope(
     Key key             = null,
     FocusScopeNode node = null,
     Widget child        = null,
     bool autofocus      = false,
     ValueChanged <bool> onFocusChange = null,
     bool?canRequestFocus     = null,
     bool?skipTraversal       = null,
     FocusOnKeyCallback onKey = null,
     string debugLabel        = null
     ) : base(
         key: key,
         child: child,
         focusNode: node,
         autofocus: autofocus,
         onFocusChange: onFocusChange,
         canRequestFocus: canRequestFocus,
         skipTraversal: skipTraversal,
         onKey: onKey,
         debugLabel: debugLabel)
 {
     D.assert(child != null);
 }
Esempio n. 5
0
 public Focus(
     Key key             = null,
     Widget child        = null,
     FocusNode focusNode = null,
     bool autofocus      = false,
     ValueChanged <bool> onFocusChange = null,
     FocusOnKeyCallback onKey          = null,
     string debugLabel     = null,
     bool?canRequestFocus  = null,
     bool?skipTraversal    = null,
     bool includeSemantics = true
     )  : base(key: key)
 {
     D.assert(child != null);
     this.child            = child;
     this.focusNode        = focusNode;
     this.autofocus        = autofocus;
     this.onFocusChange    = onFocusChange;
     this.onKey            = onKey;
     this.debugLabel       = debugLabel;
     this.canRequestFocus  = canRequestFocus;
     this.skipTraversal    = skipTraversal;
     this.includeSemantics = includeSemantics;
 }