Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2023-11-16 17:00:01 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5b60e607b5a020515635bdb882b6a25b86d3107f
5b60e607
1 parent
ee94bb8b
depend on package:web
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
48 deletions
example/pubspec.yaml
lib/src/web/media.dart
pubspec.yaml
example/pubspec.yaml
View file @
5b60e60
...
...
@@ -6,8 +6,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version
:
0.0.1
environment
:
sdk
:
"
>=3.1.0
<4.0.0"
flutter
:
"
>=3.13.0"
sdk
:
"
>=3.2.0
<4.0.0"
flutter
:
"
>=3.16.0"
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
...
...
lib/src/web/media.dart
deleted
100644 → 0
View file @
ee94bb8
// // This is here because dart doesn't seem to support this properly
// // https://stackoverflow.com/questions/61161135/adding-support-for-navigator-mediadevices-getusermedia-to-dart
@JS
(
'navigator.mediaDevices'
)
library
media_devices
;
import
'package:js/js.dart'
;
@JS
(
'getUserMedia'
)
external
Future
<
dynamic
>
getUserMedia
(
UserMediaOptions
constraints
);
@JS
()
@anonymous
class
UserMediaOptions
{
external
VideoOptions
get
video
;
external
factory
UserMediaOptions
({
VideoOptions
?
video
});
}
@JS
()
@anonymous
class
VideoOptions
{
external
String
get
facingMode
;
// external DeviceIdOptions get deviceId;
external
Map
get
width
;
external
Map
get
height
;
external
factory
VideoOptions
({
String
?
facingMode
,
DeviceIdOptions
?
deviceId
,
Map
?
width
,
Map
?
height
,
});
}
@JS
()
@anonymous
class
DeviceIdOptions
{
external
String
get
exact
;
external
factory
DeviceIdOptions
({
String
?
exact
});
}
pubspec.yaml
View file @
5b60e60
...
...
@@ -16,16 +16,17 @@ screenshots:
path
:
example/screenshots/overlay.png
environment
:
sdk
:
"
>=3.1.0
<4.0.0"
flutter
:
"
>=3.13.0"
sdk
:
"
>=3.2.0
<4.0.0"
flutter
:
"
>=3.16.0"
dependencies
:
flutter
:
sdk
:
flutter
flutter_web_plugins
:
sdk
:
flutter
js
:
"
>=0.6.3
<0.8.0"
plugin_platform_interface
:
^2.0.2
js
:
^0.6.3
plugin_platform_interface
:
^2.0.2
web
:
^0.3.0
dev_dependencies
:
flutter_test
:
...
...
Please
register
or
login
to post a comment