-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from 0xPolygonID/feature/PID-339_android_release
Feature/pid 339 android release
- Loading branch information
Showing
13 changed files
with
262 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ext { | ||
sdkVersion = '2.2.5' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
extension ListRound on List { | ||
List deepDoubleToInt() { | ||
return map((value) { | ||
if (value is Map<String, dynamic>) { | ||
return value.deepDoubleToInt(); | ||
} | ||
|
||
if (value is List) { | ||
return value.deepDoubleToInt(); | ||
} | ||
|
||
return value is double && !value.hasDecimals() ? value.floor() : value; | ||
}).toList(); | ||
} | ||
} | ||
|
||
extension MapRound on Map<String, dynamic> { | ||
Map<String, dynamic> deepDoubleToInt() { | ||
return map((key, value) { | ||
if (value is Map<String, dynamic>) { | ||
return MapEntry(key, value.deepDoubleToInt()); | ||
} | ||
|
||
if (value is List) { | ||
return MapEntry(key, value.deepDoubleToInt()); | ||
} | ||
|
||
return MapEntry( | ||
key, value is double && !value.hasDecimals() ? value.floor() : value); | ||
}); | ||
} | ||
} | ||
|
||
extension DoubleRound on double { | ||
bool hasDecimals() { | ||
return this % 1 != 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.