#Flutter Countdown Thread issue

1 messages · Page 1 of 1 (latest)

smoky cloak
#

Hi everyone,

I'm working on a simple app that counts down from 10,000 seconds. When I press the button, I can see it counting down. However, I've implemented a script using the Dart.io library in the background. The script is written in shell and looks like this:

`#!/bin/bash

sleep 30
echo "PURPLE"
`

This means that when I press the countdown button, it should switch to a purple screen after 30 seconds.

I've created two simple screens: one is the main screen, and the other is the purple screen.

The issue I'm facing is that although I can see the countdown working, I can't see it switching to the purple screen after 30 seconds. I'm not sure why this is happening. I suspect it might be related to the UI thread. Can anyone offer some advice?