toJSON method

Map<String, dynamic> toJSON()

Transforms this instance into a JSON object.

Implementation

Map<String,dynamic> toJSON() {
	return {
		'type': runtimeType.toString(),
		'from': from,
		'to': to,
		'cost': cost
	};
}