toJson method
Converts the Matrix3x3
to a JSON map.
Returns a Map<String, dynamic>
representing the JSON serialization of the matrix.
Implementation
@override
Map<String, dynamic> toJson() {
final result = <String, List<double>>{
'values': [],
};
for (var i = 0; i < 9; i++) {
result['values']!.add(values[i]);
}
return result;
}