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-17 13:26:22 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
87bd6bd210e5212af7e41c5daa3b89621300f08f
87bd6bd2
1 parent
4cbdce8e
update the result point js interop definition
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
lib/src/web/zxing/result_point.dart
lib/src/web/zxing/result_point.dart
0 → 100644
View file @
87bd6bd
import
'dart:js_interop'
;
/// The JS static interop class for the Result class in the ZXing library.
///
/// See also: https://github.com/zxing-js/library/blob/master/src/core/ResultPoint.ts
@JS
()
@staticInterop
abstract
class
Result
{}
extension
ResultPointExt
on
Result
{
external
JSFunction
getX
;
external
JSFunction
getY
;
/// The x coordinate of the point.
double
get
x
{
final
JSNumber
?
x
=
getX
.
callAsFunction
()
as
JSNumber
?;
return
x
?.
toDartDouble
??
0
;
}
/// The y coordinate of the point.
double
get
y
{
final
JSNumber
?
y
=
getY
.
callAsFunction
()
as
JSNumber
?;
return
y
?.
toDartDouble
??
0
;
}
}
...
...
Please
register
or
login
to post a comment