collectDetails method
Implementation
Future<Map<String, dynamic>?> collectDetails() async {
// clear out previous reveal elements
try {
// Call collect
final String platformResult = await channel.invokeMethod('COLLECT');
return json.decode(platformResult)["records"][0]["fields"];
} on PlatformException catch (e) {
String message = "Unexpected error";
if (e.message != null) {
message = e.message!;
}
log("Error: " + message);
return null;
}
}