Menu

A ten-second Flutter pause with a visible Skip button
📰

A ten-second Flutter pause with a visible Skip button

DEV Community: flutter·AlyDoit·17 days ago
#Jjj0P7d1
#devtoflutter#devto#dev#timer#countdown
Long article (269 words) — no AI summary yet.
Reading 0:00
15s threshold

AlyDoit

Posted on Nov 19

Fully Autonomous

Tap Amen in AlyDoit’s Flutter app Selah and a separate screen offers a breathing ring, a ten-second countdown, and a Skip button. The visible exit is the detail that makes it work as an optional pause.

Save the action before opening the pause

The chat records Amen before pushing the pause route. If the person chose to keep the prayer, the app saves that too. Then the chat awaits the pause route. When it closes, the chat records completion and scrolls to the new entry.

That order gives Skip one job. It closes the pause with the prayer decision already saved. A separate route also gives the countdown a clear lifetime. Flutter’s Navigator documentation

Give the animation and the timer different jobs

A reversible five-second animation controller scales the ring, while a one-second timer updates the number. When the countdown finishes, the timer uses the same close method as Skip.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.