fix : ui fix after release 1.3.3
This commit is contained in:
@@ -82,10 +82,7 @@ class SegmentationLogic extends GetxController {
|
||||
void validateForm() {
|
||||
var weight = int.tryParse(weightController.text.clearComma.trim());
|
||||
isSubmitButtonEnabled.value =
|
||||
selectedProduct.value != null &&
|
||||
weightController.text.isNotEmpty &&
|
||||
weight! > 0
|
||||
;
|
||||
selectedProduct.value != null && weightController.text.isNotEmpty && weight! > 0;
|
||||
}
|
||||
|
||||
Future<void> getAllSegmentation([bool isLoadingMore = false]) async {
|
||||
@@ -155,7 +152,7 @@ class SegmentationLogic extends GetxController {
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
model: SegmentationModel(
|
||||
key: selectedSegment.value?.key,
|
||||
weight: int.tryParse(weightController.text) ?? 0,
|
||||
weight: int.tryParse(weightController.text.clearComma) ?? 0,
|
||||
),
|
||||
),
|
||||
onSuccess: (result) {
|
||||
@@ -170,13 +167,16 @@ class SegmentationLogic extends GetxController {
|
||||
|
||||
Future<bool> createSegment() async {
|
||||
var res = true;
|
||||
SegmentationModel segmentationModel = SegmentationModel(
|
||||
productKey: selectedProduct.value?.key,
|
||||
|
||||
weight: int.tryParse(weightController.text.clearComma) ?? 0,
|
||||
);
|
||||
iLog(segmentationModel.toString());
|
||||
safeCall(
|
||||
call: () async => await rootLogic.chickenRepository.createSegmentation(
|
||||
token: rootLogic.tokenService.accessToken.value!,
|
||||
model: SegmentationModel(
|
||||
key: selectedProduct.value?.key,
|
||||
weight: int.tryParse(weightController.text) ?? 0,
|
||||
),
|
||||
model: segmentationModel,
|
||||
),
|
||||
onSuccess: (result) {
|
||||
res = true;
|
||||
|
||||
Reference in New Issue
Block a user