mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
CW-59-New-update-highlight-popup (#863)
* add update pop up * add release notes for monero com * PR comments fixes * Pr coments fixes * minor fixes * update from main * [skip ci] remove unrelated mac os files * add check isNewInstall * update pop-up UI * fix size * Add update popup to desktop dashboard page [skip ci] --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class VersionComparator {
|
||||
static bool isVersion1Greater({required String v1, required String v2}) {
|
||||
int v1Number = getExtendedVersionNumber(v1);
|
||||
int v2Number = getExtendedVersionNumber(v2);
|
||||
return v1Number > v2Number;
|
||||
}
|
||||
|
||||
static int getExtendedVersionNumber(String version) {
|
||||
List<String> stringVersionCells = version.split('.');
|
||||
List<int> intVersionCells = stringVersionCells.map((i) => int.parse(i)).toList();
|
||||
return intVersionCells[0] * 100000 + intVersionCells[1] * 1000 + intVersionCells[2];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user