DEV Community

Alexandre Freire
Alexandre Freire

Posted on

1

Função Equivalente ao setTimeout para o Flutter

Um cronômetro de contagem regressiva que pode ser configurado para disparar uma vez ou repetidamente.

O temporizador diminui da duração especificada para 0. Quando o temporizador atinge 0 chama a função de retorno de chamada especificada.

var timer = Timer(Duration(seconds: 1), () => print('done'));
Enter fullscreen mode Exit fullscreen mode

Fonte: https://api.dartlang.org/stable/2.4.0/dart-async/Timer-class.html

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay