onCenterTextTap method
void
onCenterTextTap()
Handles tap on the center text, resetting the wheel to the first item.
Implementation
void onCenterTextTap() {
data.value = angleListPi[0]; // Reset angle.
topIndex.value = 0; // Reset index.
widget.onChangeIndex(topIndex.value);
// Switch to linear layout if the style is set to linear.
if (widget.navigationStyle == NavigationStyle.linear) {
isLinearLayout.value = true;
}
}