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
2024-04-09 11:43:18 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
71de394990741ca402f7cf5279dd5ab4567a3c89
71de3949
1 parent
1c7ebe26
remove redundant cleanup code
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
lib/src/web/mobile_scanner_web.dart
lib/src/web/mobile_scanner_web.dart
View file @
71de394
...
...
@@ -339,24 +339,5 @@ class MobileScannerWeb extends MobileScannerPlatform {
await
stop
();
await
_barcodesController
.
close
();
await
_settingsController
.
close
();
// Finally, remove the video element from the DOM.
try
{
final
HTMLCollection
?
divChildren
=
_divElement
?.
children
;
// Since the exact element is unknown, remove all children.
// In practice, there should only be one child, the single video element.
if
(
divChildren
!=
null
&&
divChildren
.
length
>
0
)
{
for
(
int
i
=
0
;
i
<
divChildren
.
length
;
i
++)
{
final
Node
?
child
=
divChildren
.
item
(
i
);
if
(
child
!=
null
)
{
_divElement
?.
removeChild
(
child
);
}
}
}
}
catch
(
_
)
{
// The video element was no longer a child of the container element.
}
}
}
...
...
Please
register
or
login
to post a comment