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
Julian Steenbakker
2022-04-25 21:31:14 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c0fbb46beaa9ea36c716a4fa604752f609a10ae0
c0fbb46b
1 parent
79a3de73
style: flutter format
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
lib/src/objects/barcode.dart
lib/src/objects/barcode_utility.dart
lib/src/objects/barcode.dart
View file @
c0fbb46
...
...
@@ -87,8 +87,7 @@ class Barcode {
rawBytes
=
data
[
'rawBytes'
]
as
Uint8List
?,
rawValue
=
data
[
'rawValue'
]
as
String
?,
type
=
BarcodeType
.
values
[
data
[
'type'
]
as
int
],
calendarEvent
=
toCalendarEvent
(
data
[
'calendarEvent'
]
as
Map
?),
calendarEvent
=
toCalendarEvent
(
data
[
'calendarEvent'
]
as
Map
?),
contactInfo
=
toContactInfo
(
data
[
'contactInfo'
]
as
Map
?),
driverLicense
=
toDriverLicense
(
data
[
'driverLicense'
]
as
Map
?),
email
=
toEmail
(
data
[
'email'
]
as
Map
?),
...
...
@@ -139,8 +138,12 @@ class CalendarEvent {
/// Create a [CalendarEvent] from native data.
CalendarEvent
.
fromNative
(
Map
data
)
:
description
=
data
[
'description'
]
as
String
?,
start
=
data
[
'start'
]
!=
null
?
DateTime
.
tryParse
(
data
[
'start'
]
as
String
)
:
null
,
end
=
data
[
'end'
]
!=
null
?
DateTime
.
tryParse
(
data
[
'end'
]
as
String
)
:
null
,
start
=
data
[
'start'
]
!=
null
?
DateTime
.
tryParse
(
data
[
'start'
]
as
String
)
:
null
,
end
=
data
[
'end'
]
!=
null
?
DateTime
.
tryParse
(
data
[
'end'
]
as
String
)
:
null
,
location
=
data
[
'location'
]
as
String
?,
organizer
=
data
[
'organizer'
]
as
String
?,
status
=
data
[
'status'
]
as
String
?,
...
...
lib/src/objects/barcode_utility.dart
View file @
c0fbb46
...
...
@@ -10,7 +10,7 @@ Size toSize(Map data) {
List
<
Offset
>?
toCorners
(
List
?
data
)
{
if
(
data
!=
null
)
{
return
List
.
unmodifiable
(
data
.
map
((
e
)
=>
Offset
((
e
as
Map
)[
'x'
]
as
double
,
e
[
'y'
]
as
double
)),
data
.
map
((
e
)
=>
Offset
((
e
as
Map
)[
'x'
]
as
double
,
e
[
'y'
]
as
double
)),
);
}
else
{
return
null
;
...
...
Please
register
or
login
to post a comment