Skip to content

Commit

Permalink
More cherry-picking
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Oct 29, 2024
1 parent ad71a5c commit 1c39c34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hive_generator/lib/src/type_adapter_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ class TypeAdapterGenerator extends GeneratorForAnnotation<HiveType> {
if (setterField != null) setters.add(setterField);
}

// Sort by index for deterministic output
getters.sort((a, b) => a.index.compareTo(b.index));
setters.sort((a, b) => a.index.compareTo(b.index));
return _GetAccessorsResult(getters, setters);
}

Expand Down

0 comments on commit 1c39c34

Please sign in to comment.