Showing
3 changed files
with
7 additions
and
48 deletions
| @@ -6,8 +6,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev | @@ -6,8 +6,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev | ||
| 6 | version: 0.0.1 | 6 | version: 0.0.1 |
| 7 | 7 | ||
| 8 | environment: | 8 | environment: |
| 9 | - sdk: ">=3.1.0 <4.0.0" | ||
| 10 | - flutter: ">=3.13.0" | 9 | + sdk: ">=3.2.0 <4.0.0" |
| 10 | + flutter: ">=3.16.0" | ||
| 11 | 11 | ||
| 12 | # Dependencies specify other packages that your package needs in order to work. | 12 | # Dependencies specify other packages that your package needs in order to work. |
| 13 | # To automatically upgrade your package dependencies to the latest versions | 13 | # To automatically upgrade your package dependencies to the latest versions |
lib/src/web/media.dart
deleted
100644 → 0
| 1 | -// // This is here because dart doesn't seem to support this properly | ||
| 2 | -// // https://stackoverflow.com/questions/61161135/adding-support-for-navigator-mediadevices-getusermedia-to-dart | ||
| 3 | - | ||
| 4 | -@JS('navigator.mediaDevices') | ||
| 5 | -library media_devices; | ||
| 6 | - | ||
| 7 | -import 'package:js/js.dart'; | ||
| 8 | - | ||
| 9 | -@JS('getUserMedia') | ||
| 10 | -external Future<dynamic> getUserMedia(UserMediaOptions constraints); | ||
| 11 | - | ||
| 12 | -@JS() | ||
| 13 | -@anonymous | ||
| 14 | -class UserMediaOptions { | ||
| 15 | - external VideoOptions get video; | ||
| 16 | - | ||
| 17 | - external factory UserMediaOptions({VideoOptions? video}); | ||
| 18 | -} | ||
| 19 | - | ||
| 20 | -@JS() | ||
| 21 | -@anonymous | ||
| 22 | -class VideoOptions { | ||
| 23 | - external String get facingMode; | ||
| 24 | - // external DeviceIdOptions get deviceId; | ||
| 25 | - external Map get width; | ||
| 26 | - external Map get height; | ||
| 27 | - | ||
| 28 | - external factory VideoOptions({ | ||
| 29 | - String? facingMode, | ||
| 30 | - DeviceIdOptions? deviceId, | ||
| 31 | - Map? width, | ||
| 32 | - Map? height, | ||
| 33 | - }); | ||
| 34 | -} | ||
| 35 | - | ||
| 36 | -@JS() | ||
| 37 | -@anonymous | ||
| 38 | -class DeviceIdOptions { | ||
| 39 | - external String get exact; | ||
| 40 | - | ||
| 41 | - external factory DeviceIdOptions({String? exact}); | ||
| 42 | -} |
| @@ -16,16 +16,17 @@ screenshots: | @@ -16,16 +16,17 @@ screenshots: | ||
| 16 | path: example/screenshots/overlay.png | 16 | path: example/screenshots/overlay.png |
| 17 | 17 | ||
| 18 | environment: | 18 | environment: |
| 19 | - sdk: ">=3.1.0 <4.0.0" | ||
| 20 | - flutter: ">=3.13.0" | 19 | + sdk: ">=3.2.0 <4.0.0" |
| 20 | + flutter: ">=3.16.0" | ||
| 21 | 21 | ||
| 22 | dependencies: | 22 | dependencies: |
| 23 | flutter: | 23 | flutter: |
| 24 | sdk: flutter | 24 | sdk: flutter |
| 25 | flutter_web_plugins: | 25 | flutter_web_plugins: |
| 26 | sdk: flutter | 26 | sdk: flutter |
| 27 | - js: ">=0.6.3 <0.8.0" | ||
| 28 | - plugin_platform_interface: ^2.0.2 | 27 | + js: ^0.6.3 |
| 28 | + plugin_platform_interface: ^2.0.2 | ||
| 29 | + web: ^0.3.0 | ||
| 29 | 30 | ||
| 30 | dev_dependencies: | 31 | dev_dependencies: |
| 31 | flutter_test: | 32 | flutter_test: |
-
Please register or login to post a comment