diff --git a/lib/pages/operation/reception/reception_page_model.dart b/lib/pages/operation/reception/reception_page_model.dart index 27b2aa7..cbdd25f 100644 --- a/lib/pages/operation/reception/reception_page_model.dart +++ b/lib/pages/operation/reception/reception_page_model.dart @@ -1,3 +1,4 @@ +import 'package:collection/collection.dart'; import 'package:e_scan/backend/api/api_calls.dart'; import 'package:e_scan/backend/objectbox/entities/stock_picking/stock_picking_record_entity.dart'; import 'package:e_scan/backend/objectbox/objectbox_manager.dart'; @@ -96,6 +97,7 @@ class ReceptionPageModel extends StateNotifier { final res = await ApiCalls.getAllStockPiking(); res.when( (data) { + data.sort((a, b) => (b.name ?? '').compareTo((a.name ?? ''))); state = state.copyWith(receptions: data, loadingReceptions: false); }, (error) { @@ -114,6 +116,7 @@ class ReceptionPageModel extends StateNotifier { final res = await ApiCalls.getAllStockPiking(); res.when( (data) { + data.sort((a, b) => (b.name ?? '').compareTo((a.name ?? ''))); state = state.copyWith(receptions: data, loadingReceptions: false); }, (error) { diff --git a/pubspec.yaml.bak b/pubspec.yaml.bak index 04cf6f9..ba485c3 100644 --- a/pubspec.yaml.bak +++ b/pubspec.yaml.bak @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.3.0+9 +version: 0.4.0+10 environment: sdk: ^3.8.1