Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a callback for iOS when the first Flutter frame is rendered (flut…
…ter#6135) Add a `-[FlutterViewController setFlutterViewDidRenderCallback:]` method on iOS so client applications can be notified when the Flutter view has rendered. This can be used for add2app cases to determine when to take an initial screenshot for comparisons in automated tests. The callback is expected to be an Objective-C block (or Swift closure). I chose to support only a single callback because it's much simpler (especially since it does not require a separate method to unregister the callback), and it's not clear that there are use cases that would justify additional complexity. Clients have the flexibility to make their callback invoke other callbacks anyway. I alternatively considered adding a `-[FlutterViewController viewDidRenderFirstFlutterFrame]` method that clients could override in a subclass, but using an Objective-C block seems more flexible and less of a burden. Fixes flutter/flutter#20665
- Loading branch information