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-06-28 13:45:17 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a6520cbf61e79f9509744f35663fda83e829daf8
a6520cbf
1 parent
d827932b
fix PhotoCapabilities static interop
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
lib/src/web/base.dart
lib/src/web/base.dart
View file @
a6520cb
...
...
@@ -125,10 +125,8 @@ mixin InternalTorchDetection on InternalStreamCreation {
final
photoCapabilities
=
await
promiseToFuture
<
PhotoCapabilities
>(
imageCapture
.
getPhotoCapabilities
(),
);
final
fillLightMode
=
photoCapabilities
.
fillLightMode
;
if
(
fillLightMode
!=
null
)
{
return
fillLightMode
;
}
return
photoCapabilities
.
fillLightMode
;
}
}
catch
(
e
)
{
// ImageCapture is not supported by some browsers:
...
...
@@ -162,9 +160,16 @@ class Promise<T> {}
@JS
()
@anonymous
class
PhotoCapabilities
{
@staticInterop
class
PhotoCapabilities
{}
extension
PhotoCapabilitiesExtension
on
PhotoCapabilities
{
@JS
(
'fillLightMode'
)
external
List
<
dynamic
>?
get
_fillLightMode
;
/// Returns an array of available fill light options. Options include auto, off, or flash.
external
List
<
String
>?
get
fillLightMode
;
List
<
String
>
get
fillLightMode
=>
_fillLightMode
?.
cast
<
String
>()
??
<
String
>[];
}
@JS
(
'ImageCapture'
)
...
...
Please
register
or
login
to post a comment