updateCowGroups method Null safety
소 그룹의 순서를 변경합니다.
Implementation
Future<List<CowGroup>?> updateCowGroups(List<CowGroup> _) async {
LogManager().addLog("updateCowGroups", screen: runtimeType.toString());
try {
await reqPUT(
path: '/api/cow_groups',
queryParameters: {
"farm_id": farmState.currentFarm!.id,
"ids": "[${_.map((e) => e.id).toList().join(",")}]",
},
body: Uint8List.fromList([]),
);
return _;
} catch (e) {
LogManager().addLog("updateCowGroups call failed: $e", screen: runtimeType.toString());
return null;
}
}