backToPrimary method

Future backToPrimary()

Use this method to go back to the primary CupertinoStackView in the Cupertino StackView system.

Implementation

Future backToPrimary() async {
  while (_map.length != 1) {
    _navigatorState.currentState!.pop();
    _contexts.remove(currentNavigation);
    _map.removeAt(0);
    _organise();
    await Future.delayed(duration);
  }
}