getCrossFadeState static method
Gets the current CrossfadeState
Throws a PlatformException getting the crossfadeState failed Throws a MissingPluginException if the method is not implemented on the native platforms.
Implementation
static Future<CrossfadeState?> getCrossFadeState() async {
try {
var crossfadeStateJson =
await (_channel.invokeMethod<String>(MethodNames.getCrossfadeState));
if (crossfadeStateJson == null) {
return null;
}
var crossfadeStateMap =
jsonDecode(crossfadeStateJson) as Map<String, dynamic>;
var crossfadeState = CrossfadeState.fromJson(crossfadeStateMap);
return crossfadeState;
} on Exception catch (e) {
_logException(MethodNames.getCrossfadeState, e);
rethrow;
}
}