decodeError method
Mapping communication error structure.
Implementation
Map<String, dynamic> decodeError(PlatformException error) {
if (error.details != null && error.details is Map<dynamic, dynamic>) {
final mapped = error.details.cast<String, dynamic>();
return mapped;
}
return {};
}