title: How to dynamically change UiKitView (iOS Platform View) Flutter?
body: <p>I'm trying to blur video with using Flutter.</p>
  
  <p>BackdropFilter works on android, but it doesn't work on ios device maybe because videoView itself use UiKitView. So I tried to make own blur widget with UiKitView, and it successfully blur video, <strong>but now I want to dynamically change blur level with "radius" value.</strong></p>
  
  <p>I tested with Slider and setState, but it doesn't change blur level. Is there any way to rebuild UiKitView from Flutter side?</p>
  
  <p><strong>This is my main screen with Stack</strong></p>
  
  <pre><code>child: Stack(
            children: &lt;Widget&gt;[
              videoView(),
              blurView(),
              radiusSlider(),
            ],
          ),
  </code></pre>
  
  <p>T<strong>his is slider which dynamically change radius value</strong></p>
  
  <pre><code>  Widget radiusSlider() {
      return Slider(
        activeColor: Colors.indigoAccent,
        min: 0.0,
        max: 30.0,
        onChanged: (newVal) {
          setState(() =&gt; radius = newVal.toInt());
        },
        value: radius.toDouble(),
      );
    }
  </code></pre>
  
  <p><strong>This is blur widget with platform view. I want to dynamically change this widget with radius value</strong></p>
  
  <pre><code>  Widget blurView() {
      if (radius &lt;= 15) {
        return Positioned.fill(
          child: Container(
            child: UiKitView(
              viewType: 'BlurVideo',
              creationParams: &lt;String, dynamic&gt;{
                "radius": 10,
              },
              creationParamsCodec: StandardMessageCodec(),
            ),
          ),
        );
      } else {
        return Positioned.fill(
          child: Container(
            child: UiKitView(
              viewType: 'BlurVideo',
              creationParams: &lt;String, dynamic&gt;{
                "radius": 30,
              },
              creationParamsCodec: StandardMessageCodec(),
            ),
          ),
        );
      }
    }
  </code></pre>
  
  <p><strong>This is my AppDelegate.swift file</strong></p>
  
  <pre><code>import UIKit
  import Flutter
  import VisualEffectView
  
  @UIApplicationMain
  @objc class AppDelegate: FlutterAppDelegate {
    override func application(
      _ application: UIApplication,
      didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -&gt; Bool {
      let viewFactory = BlurViewFactory()
      registrar(forPlugin: "Blur").register(viewFactory, withId: "BlurVideo" )
  
      GeneratedPluginRegistrant.register(with: self)
      return super.application(application, didFinishLaunchingWithOptions: launchOptions)
    }
  }
  
  public class BlurViewFactory: NSObject, FlutterPlatformViewFactory {
      public func createArgsCodec() -&gt; FlutterMessageCodec &amp; NSObjectProtocol {
          return FlutterStandardMessageCodec.sharedInstance()
      }
      public func create(
          withFrame frame: CGRect,
          viewIdentifier viewId: Int64,
          arguments args: Any?
          ) -&gt; FlutterPlatformView {
          return BlurView(frame, viewId: viewId, args: args)
      }
  }
  
  public class BlurView : NSObject, FlutterPlatformView {
      let frame: CGRect
      let viewId: Int64
      let radius: CGFloat
  
      init(_ frame: CGRect, viewId: Int64, args: Any?) {
          self.frame = frame
          self.viewId = viewId
          let params = args as! NSDictionary
          self.radius = params["radius"] as! CGFloat
      }
  
      public func view() -&gt; UIView {
          let view = UIView()
          let visualEffectView = VisualEffectView(frame: view.bounds)
          visualEffectView.blurRadius = self.radius
          visualEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
          view.addSubview(visualEffectView)
          return view
      }
  }
  </code></pre>