writeCard method
Writes data to a magnetic card.
The data parameter specifies the data to write to the card.
Returns true if the write operation was successful, false otherwise.
Throws an exception if the write operation fails.
Implementation
Future<bool> writeCard(TrackData data) async {
try {
return await MSRXPlatform.instance.writeCard(data);
} on PlatformException catch (e) {
throw Exception("Failed to write card: ${e.message}");
}
}