public void nextStep ( ) { if ( currentStepIndex >= getWidgetCount ( ) - 1 ) { CompleteEvent . fire ( MaterialStepper . this , currentStepIndex + 1 ) ; } else { Widget w = getWidget ( currentStepIndex ) ; if ( w instanceof MaterialStep ) { MaterialStep step = ( MaterialStep ) w ; step . setActive ( false ) ; step . setSuccessText ( step . getDescription ( ) ) ; // next step int nextStepIndex = getWidgetIndex ( step ) + 1 ; if ( nextStepIndex >= 0 ) { for ( int i = nextStepIndex ; i < getWidgetCount ( ) ; i ++ ) { w = getWidget ( i ) ; if ( ! ( w instanceof MaterialStep ) ) { continue ; } MaterialStep nextStep = ( MaterialStep ) w ; if ( nextStep . isEnabled ( ) && nextStep . isVisible ( ) ) { nextStep . setActive ( true ) ; setCurrentStepIndex ( i ) ; NextEvent . fire ( MaterialStepper . this ) ; break ; } } } } } }
Go to next step used by linear stepper .