Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
auto_track_plugin
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
Dubhe
2024-04-28 17:53:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-04-28 17:53:03 +0800
Commit
c2cacb41b1b61fe7d4e81293c790082917510413
c2cacb41
1 parent
5e49600f
perf: change baseDeviceInfo to _baseDeviceInfo
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
lib/auto_track/config/manager.dart
lib/auto_track/config/manager.dart
View file @
c2cacb4
...
...
@@ -15,14 +15,14 @@ class AutoTrackConfigManager {
PackageInfo
.
fromPlatform
().
then
((
value
)
=>
_appVersion
=
value
.
version
);
DeviceInfoPlugin
().
deviceInfo
.
then
((
value
)
{
_deviceInfo
=
value
.
data
;
baseDeviceInfo
=
value
;
_
baseDeviceInfo
=
value
;
});
}
String
_appVersion
=
''
;
String
get
appVersion
=>
_appVersion
;
BaseDeviceInfo
?
baseDeviceInfo
;
BaseDeviceInfo
?
_
baseDeviceInfo
;
String
_deviceId
=
''
;
String
get
deviceId
=>
_deviceId
;
...
...
@@ -37,10 +37,10 @@ class AutoTrackConfigManager {
void
updateConfig
(
AutoTrackConfig
config
)
{
_config
=
config
;
if
(
baseDeviceInfo
is
IosDeviceInfo
)
{
_deviceId
=
md5
.
convert
(
utf8
.
encode
(
'
${(baseDeviceInfo as IosDeviceInfo).identifierForVendor}
#
${config.appKey}
'
)).
toString
();
}
else
if
(
baseDeviceInfo
is
AndroidDeviceInfo
)
{
_deviceId
=
md5
.
convert
(
utf8
.
encode
(
'
${(baseDeviceInfo as AndroidDeviceInfo).serialNumber}
#
${config.appKey}
'
)).
toString
();
if
(
_baseDeviceInfo
is
IosDeviceInfo
)
{
_deviceId
=
md5
.
convert
(
utf8
.
encode
(
'
${(_baseDeviceInfo as IosDeviceInfo).identifierForVendor}
#
${config.appKey}
'
)).
toString
();
}
else
if
(
_baseDeviceInfo
is
AndroidDeviceInfo
)
{
_deviceId
=
md5
.
convert
(
utf8
.
encode
(
'
${(_baseDeviceInfo as AndroidDeviceInfo).serialNumber}
#
${config.appKey}
'
)).
toString
();
}
else
{
_deviceId
=
''
;
}
...
...
Please
register
or
login
to post a comment