createCowGroup method Null safety
- CowGroup _
소 그룹을 생성합니다.
Implementation
Future<CowGroup?> createCowGroup(CowGroup _) async {
LogManager().addLog("createCowGroup", screen: runtimeType.toString());
try {
await reqPOST(
path: '/api/cow_groups',
queryParameters: {
"farm_id": farmState.currentFarm!.id,
"name": _.name,
},
body: Uint8List.fromList([]),
);
return _;
} catch (e) {
LogManager().addLog('createCowGroup call failed: $e', screen: runtimeType.toString());
return null;
}
}