getVideoInputDevices method Null safety

Future<List<MediaDeviceInfo>> getVideoInputDevices()

Implementation

Future<List<MediaDeviceInfo>> getVideoInputDevices() async {
  return (await navigator.mediaDevices.enumerateDevices())
      .where((element) => element.kind == 'videoinput')
      .toList();
}