浏览代码

Update actions.cs

/siyaoH-1.17-PlatformMessage
guanghuispark 4 年前
当前提交
c5f516bd
共有 1 个文件被更改,包括 8 次插入6 次删除
  1. 14
      com.unity.uiwidgets/Runtime/widgets/actions.cs

14
com.unity.uiwidgets/Runtime/widgets/actions.cs


D.assert(key != null);
}
public static Intent doNothing = new Intent(DoNothingAction.key);
public const Intent doNothing = new Intent(DoNothingAction.key);
public readonly LocalKey key;
public bool isEnabled(BuildContext context) => true;

public override void invoke(FocusNode node, Intent intent) {
onInvoke.Invoke(node, intent);
}
}

Widget child = null
) : base(key: key, child: child) {
D.assert(actions != null);
this.dispatcher = dispatcher;
this.actions = actions;
}
public readonly ActionDispatcher dispatcher;

public static ActionDispatcher _findDispatcher(Element element) {
D.assert(element.widget is Actions);
Actions action = element.widget as Actions;
ActionDispatcher dispatcher = action.dispatcher;
Actions actions = element.widget as Actions;
ActionDispatcher dispatcher = actions.dispatcher;
if (dispatcher == null) {
bool visitAncestorElement(Element visitedElement) {
if (!(visitedElement.widget is Actions)) {

public override void initState() {
base.initState();
SchedulerBinding.instance.addPostFrameCallback((stamp => {
SchedulerBinding.instance.addPostFrameCallback(((Duration duration) => {
_updateHighlightMode(FocusManager.instance.highlightMode);
}));
FocusManager.instance.addHighlightModeListener(_handleFocusHighlightModeChange);

}
public override void didUpdateWidget(StatefulWidget oldWidget) {
oldWidget =(FocusableActionDetector) oldWidget;
//oldWidget =(FocusableActionDetector) oldWidget;
base.didUpdateWidget(oldWidget);
if (widget.enabled != ((FocusableActionDetector)oldWidget).enabled) {
SchedulerBinding.instance.addPostFrameCallback((TimeSpan timespan)=> {

正在加载...
取消
保存