use dart:math
to create a random number and fill it inside the dice(list).
/// set dice position
/// (0,0) [(0,1)] (0,2) (0,3)
/// [(1,0)] [(1,1)] [(1,2)] [(1,3)]
/// (2,0) [(2,1)] (2,2) (2,3)
/// <pos> > <index>
/// (0,1) > 0
/// (1,0) > 1
/// (1,1) > 2
/// (1,2) > 3
/// (1,3) > 4
/// (2,1) > 5
/// set pair <pos> : <index>
/// (0,1) - (2,1) : 0 - 5
/// (1,0) - (1,2) : 1 - 3
/// (1,1) - (1,3) : 2 - 4
- use user-defined function
- use
while
andfor
loop - use
switch-case
- use
if-else
- use
ternary
( ? : ) - use
final
andlate
- use
List.filled
constructor - use library (dart:math)