vscreenFocusNextIndexList property
List<int>
get
vscreenFocusNextIndexList
Implementation
List<int> get vscreenFocusNextIndexList {
final current = focusPageCurrentPT;
if(current != null){
final currentVScreen = findVirtualScreen(current);
if(currentVScreen != null){
final currentSingleNextPT = currentVScreen.vscreenFocusNextIndexList;
if(currentSingleNextPT.isNotEmpty){
/// 1.如果翻页成功,则返回 [ 当前指针, ... 翻页递归指针数组 ]
return [ _currentFocusIndex, ...currentSingleNextPT ];
}
}
}
/// 2. 如果翻页失败,执行 3.叶子节点 操作
/// 如果是 叶子节点,3. 检查翻页边界
final next = focusPageNextPT;
if(next != null){
final nextVScreen = findVirtualScreen(next);
if(nextVScreen != null){
final currentSingleNode = nextVScreen.vscreenFocusCurrentIndexList;
if(currentSingleNode.isNotEmpty){
/// 4. 如果是树枝节点,基于当前节点递归向下执行当前页初始化(RL/LR),返回 [ 翻页指针, ...初始化递归指针数组 ]
return [ focusPageNextIndex, ...currentSingleNode ];
}
}
/// 5. 如果是叶子节点,返回 [ 翻页指针 ]
return [ focusPageNextIndex ];
}
/// 6. 如果为空表示超越边界,返回 [ 空数组 ]
return [];
}