Repository: flutter
Issue: Creating an empty `Vertices` object causes an exception on web (canvaskit)
Labels: c: regression,c: crash,engine,platform-web,c: rendering,e: web_canvaskit,P1,team-web,triaged-web

## Description

If you attempt to create a Vertices object which doesn't have any vertices in it, the following exception is thrown, which didn't use to be the case.  This is currently blocking the Flutter roll, see cl/705912913 for details.

```
DartError: TypeError: null: type 'Null' is not a subtype of type 'JavaScriptObject'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 307:3  throw_
errors.dart:307
dart-sdk/lib/_internal/js_dev_runtime/private/profile.dart 117:39            _failedAsCheck
profile.dart:117
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1554:3                         _generalAsCheckImplementation
rti.dart:1554
dart-sdk/lib/_internal/js_shared/lib/js_util_patch.dart 110:3                callMethod$
js_util_patch.dart:110
lib/_engine/engine/canvaskit/canvaskit_api.dart 95:8                         CanvasKitExtension.MakeVertices
canvaskit_api.dart:95
lib/_engine/engine/canvaskit/vertices.dart 82:45                             __
vertices.dart:82
lib/_engine/engine/canvaskit/vertices.dart 66:23                             raw
vertices.dart:66
lib/_engine/engine/canvaskit/renderer.dart 124:18                            createVerticesRaw
renderer.dart:124
lib/ui/canvas.dart 45:28                                                     raw
canvas.dart:45
packages/manual_tests/simple_test.dart 7:41                                  main
simple_test.dart:7
web_entrypoint.dart 24:31                                                    <fn>
web_entrypoint.dart:24
lib/ui_web/ui_web/initialization.dart 41:15                                  <fn>
initialization.dart:41
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 622:19          <fn>
async_patch.dart:622
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 647:23          <fn>
async_patch.dart:647
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 593:31          <fn>
async_patch.dart:593
dart-sdk/lib/async/zone.dart 1849:54                                         runUnary
zone.dart:1849
dart-sdk/lib/async/future_impl.dart 208:18                                   handleValue
future_impl.dart:208
dart-sdk/lib/async/future_impl.dart 932:44                                   handleValueCallback
future_impl.dart:932
dart-sdk/lib/async/future_impl.dart 961:13                                   _propagateToListeners
future_impl.dart:961
dart-sdk/lib/async/future_impl.dart 712:5                                    [_completeWithValue]
future_impl.dart:712
dart-sdk/lib/async/future_impl.dart 792:7                                    callback
future_impl.dart:792
dart-sdk/lib/async/schedule_microtask.dart 40:11                             _microtaskLoop
schedule_microtask.dart:40
dart-sdk/lib/async/schedule_microtask.dart 49:5                              _startMicrotaskLoop
schedule_microtask.dart:49
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 186:7           <fn>
async_patch.dart:186
```

Here's a simple reproduction case:

```dart
import 'dart:typed_data';
import 'dart:ui' as ui;

import 'package:flutter/material.dart';

void main() {
  final ui.Vertices verts = ui.Vertices.raw(
    VertexMode.triangles,
    Float32List(0),
    indices: Uint16List(0),
    textureCoordinates: Float32List(0),
  );
  print('$verts');

  runApp(const SizedBox.shrink());
}
```