| @@ -8,6 +8,7 @@ import 'package:farm_tpf/utils/const_string.dart'; | |||
| import 'package:flutter/material.dart'; | |||
| import 'package:flutter_bloc/flutter_bloc.dart'; | |||
| import 'package:get/get.dart'; | |||
| import 'package:farm_tpf/utils/formatter.dart'; | |||
| class ResourceHelperScreen extends StatefulWidget { | |||
| final String type; | |||
| @@ -133,7 +134,13 @@ class ItemInfinityWidget extends StatelessWidget { | |||
| child: Card( | |||
| child: Material( | |||
| child: RadioListTile( | |||
| title: Text(item.tbSuppliesName.toString()), | |||
| title: Row( | |||
| children: [ | |||
| Expanded(child: Text(item.tbSuppliesName.toString())), | |||
| Text( | |||
| "${item.quantity.formatNumtoStringDecimal()} ${item.unit}") | |||
| ], | |||
| ), | |||
| subtitle: Text(item.tbWarehouseName.toString()), | |||
| value: item, | |||
| groupValue: item.isSelected == false ? null : item, | |||
| @@ -142,6 +149,8 @@ class ItemInfinityWidget extends StatelessWidget { | |||
| Get.snackbar("Vật tư đã hết", "Vui lòng chọn vật tư khác", | |||
| snackPosition: SnackPosition.BOTTOM); | |||
| } else { | |||
| //close nackbar if open | |||
| if (Get.isSnackbarOpen) Get.back(); | |||
| Navigator.of(context).pop(value); | |||
| } | |||
| }), | |||