Shuffle()
- A shuffle is a randomly set in program in list shuffling and modify list .
Example
void main() {
var nums = [1, 2, 3, 4, 5, 6, 6];
print('nums : $nums');
nums.shuffle();
print(nums);
}
Output
nums : [1, 2, 3, 4, 5, 6, 6]
[1, 6, 2, 5, 3, 4, 6]
Exited.