[camera_web] Update camera_web to support Dart's new async requestFullscreen API
No version change: No change to plugin functionality
diff --git a/packages/camera/camera_web/lib/src/camera_web.dart b/packages/camera/camera_web/lib/src/camera_web.dart
index 0021ee4..5fbd820 100644
--- a/packages/camera/camera_web/lib/src/camera_web.dart
+++ b/packages/camera/camera_web/lib/src/camera_web.dart
@@ -380,7 +380,10 @@
// Full-screen mode may be required to modify the device orientation.
// See: https://w3c.github.io/screen-orientation/#interaction-with-fullscreen-api
- documentElement.requestFullscreen();
+ // Recent versions of Dart changed requestFullscreen to return a Future instead of void.
+ // This wrapper allows use of both the old and new APIs.
+ dynamic fullScreen() => documentElement.requestFullscreen();
+ await fullScreen();
await orientation.lock(orientationType.toString());
} else {
throw PlatformException(