toPairAsMap method
Implementation
Map<String, dynamic>? toPairAsMap(P pair,
{TypeMapper? xMapper, TypeMapper? yMapper}) {
if (xMapper == null && yMapper == null) {
return toPair(pair, (X? x, Y? y) => {'x': x, 'y': y});
} else {
xMapper ??= (o) => o;
yMapper ??= (o) => o;
return toPair(pair, (X? x, Y? y) => {'x': xMapper!(x), 'y': yMapper!(y)});
}
}