Google is committed to advancing racial equity for Black communities. See how.

createView method

*[<Null safety>](https://dart.dev/null-safety)*

Future<void> createView (int viewId, {bool hitTestable = true, bool focusable = true, dynamic viewOcclusionHint = Rect.zero})

Creates a platform view with viewId and given properties.

Implementation

Future<void> createView(
  int viewId, {
  bool hitTestable = true,
  bool focusable = true,
  Rect viewOcclusionHint = Rect.zero,
}) async {
  final Map<String, dynamic> args = <String, dynamic>{
    'viewId': viewId,
    'hitTestable': hitTestable,
    'focusable': focusable,
    'viewOcclusionHintLTRB': <double>[
      viewOcclusionHint.left,
      viewOcclusionHint.top,
      viewOcclusionHint.right,
      viewOcclusionHint.bottom
    ],
  };
  return platformViewChannel.invokeMethod('View.create', args);
}