canUpdate property

bool get canUpdate

Implementation

bool get canUpdate {
  if (localVersion == null || storeVersion == null) return false;
  final local = localVersion!.split('.').map(int.parse).toList();
  final store = storeVersion!.split('.').map(int.parse).toList();

  for (var i = 0; i < store.length; i++) {
    if (i >= local.length) return true; // store has more version segments
    if (store[i] > local[i]) return true;
    if (local[i] > store[i]) return false;
  }
  return false;
}