setBlurBackground method
void
setBlurBackground()
override
Implementation
@override
void setBlurBackground(int level, Function(int code, String message)? errorCallback) async {
try {
if (!kIsWeb && (Platform.isIOS || Platform.isAndroid)) {
await methodChannel.invokeMethod("setBlurBackground", {'level': level});
} else {
errorCallback!(-1, 'This platform is not supported');
}
} on PlatformException catch (error) {
errorCallback!(int.fromEnvironment(error.code), error.message!);
} on Exception catch (error) {
errorCallback!(-1, error.toString());
}
}