Using switch to change dark mode

Hi! I am having trouble in changing to dark mode in my flutter application. I used switch to check the condition and it changed to dark mode in current activity but the theme changed to default again when I go to next activity. I am very new to flutter and I really don’t know what to do :frowning: . Please help me and thanks in advanced.