how to sort list by id dart code example Example: sort a custom list flutter someObjects.sort((a, b) => a.someProperty.compareTo(b.someProperty));