0

I'm using 4 images in each screen. By setting the timer I can see the screen changing within 4 seconds automatically. In each screen below I have given a button for alter dialog box. When I click on button it will show the alert dialog box, the background images screen is moving to another screen. I want to stop background screen when dialog box appears.

Is there any way to achieve this?

Thanks in advance.

1 Answers1

0

You need to cancel your timer when alert appears. If you cant reference to it inside here:

 onHomeButtonClick: () {
   _showcontent();// method for altert dailog box                                                                                     
                        },

You can pass a variable like var shouldContinue = True somewhere before and switch it to false when button is clicked

Kozubi
  • 529
  • 3
  • 12