create method Null safety

Future<void> create()

Creates the Android View.

Throws an AssertionError if view was already disposed.

Implementation

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

  await _sendCreateMessage();

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