Tuples

Introduced in Dart 3, records provide the equivalent of Rust's tuples. Tuples of up to 10 elements are supported, and more can be added by nesting tuples. Tuples can be returned, received as parameters, and stored inside structs.

pub fn my_coordinate() -> (f64, f64);
(double, double) myCoordinate();
final (lat, long) = myCoordinate();