create method Null safety

  1. @override
Future<void> create(
  1. {Size? size}
)
override

Creates the platform view with the initial size.

size is the view's initial size in logical pixel. size can be omitted if the concrete implementation doesn't require an initial size to create the platform view.

Implementation

@override
Future<void> create({Size? size}) async {
  assert(_state != _AndroidViewState.disposed, 'trying to create a disposed Android view');

  await _sendCreateMessage(size: size);

  _state = _AndroidViewState.created;
  for (final PlatformViewCreatedCallback callback in _platformViewCreatedCallbacks) {
    callback(viewId);
  }
}