jeudi 20 mai 2021

How To Display a Random Item of a List? [Every 9 seconds]

Is there a way to display a randomQuote every 9 seconds automatically?

Below is a truncated portion of the code that matters:


final List<String> RandomQuotes = [ ... ] // (one hundreds quotes here)

var randomQuote = (RandomQuotes.toList()..shuffle()).first;

:

:

:

... Text(randomQuote, Style:...)



Aucun commentaire:

Enregistrer un commentaire