Closed ssp closed 3 years ago
Hi @ssp,
Thank you for your contribution! We need to add a note to our users what does that means when the value is null
, but it should never be null
. May I propose the following changes instead:
static Future<bool> checkConfiguration(ARKitConfiguration configuration) {
return _channel.invokeMethod<bool>('checkConfiguration', {
'configuration': configuration.index,
}).then((value) => value!);
}
What do you think?
Kind regards, Oleksandr
Sorry, plan to fix all cast errors today, so I'll merge it with the proposed change. Feel free to open a new PR if you think that this proposition is wrong. Huge thanks for this PR!
The cast fails because _channel.invokeMethod
returns a Future<T?>, so don’t cast and pass the
? on to the caller.