Skip to content

Instantly share code, notes, and snippets.

Last active June 9, 2020 22:31
What would you like to do?
Dartpad Gist to Choose a Random Winner
import 'dart:math';
List<String> contestants = [
String chooseWinner(List<String> contestants) {
int choice =;
return contestants[choice];
void main() {
print("The winner is ${chooseWinner(contestants)}");
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment