Skip to content

Commit

Permalink
fix a cast from a bad conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
navaronbracke committed Oct 24, 2023
1 parent 31a4ecb commit 8ba3164
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/src/objects/barcode.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ class Barcode {
corners: corners == null
? const <Offset>[]
: List.unmodifiable(
corners.cast<Map<String, double>>().map((Map<String, double> e) {
return Offset(e['x']!, e['y']!);
corners
.cast<Map<Object?, Object?>>()
.map((Map<Object?, Object?> e) {
final double x = e['x']! as double;
final double y = e['y']! as double;

return Offset(x, y);
}),
),
displayValue: data['displayValue'] as String?,
Expand Down

0 comments on commit 8ba3164

Please sign in to comment.