minor fixes
This commit is contained in:
@@ -49,7 +49,10 @@ class _GroupCreateScreenState extends State<GroupCreateScreen> {
|
|||||||
if (parts.length >= 2) {
|
if (parts.length >= 2) {
|
||||||
final name = parts[0].trim();
|
final name = parts[0].trim();
|
||||||
final account = parts[1].trim();
|
final account = parts[1].trim();
|
||||||
final phone = parts[2].trim();
|
String phone = '';
|
||||||
|
if (parts.length > 2) {
|
||||||
|
phone = parts.sublist(2).join(',').trim();
|
||||||
|
}
|
||||||
if (name.isNotEmpty && account.isNotEmpty) {
|
if (name.isNotEmpty && account.isNotEmpty) {
|
||||||
members.add(
|
members.add(
|
||||||
Recipient(
|
Recipient(
|
||||||
@@ -96,10 +99,7 @@ class _GroupCreateScreenState extends State<GroupCreateScreen> {
|
|||||||
AppSnackBar.showSuccess(context, 'Group created successfully.');
|
AppSnackBar.showSuccess(context, 'Group created successfully.');
|
||||||
context.pop(true); // Return true to indicate a new group was created
|
context.pop(true); // Return true to indicate a new group was created
|
||||||
} else {
|
} else {
|
||||||
AppSnackBar.showError(
|
AppSnackBar.showError(context, result.error ?? 'Failed to create group.');
|
||||||
context,
|
|
||||||
result.error ?? 'Failed to create group.',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -678,7 +678,7 @@ class _PayScreenState extends State<PayScreen> with TickerProviderStateMixin {
|
|||||||
onChanged: (String? newValue) {
|
onChanged: (String? newValue) {
|
||||||
if (newValue != null) {
|
if (newValue != null) {
|
||||||
BillProduct product = controller.model.products.firstWhere(
|
BillProduct product = controller.model.products.firstWhere(
|
||||||
(e) => e.uid == newValue,
|
(e) => e.name == newValue,
|
||||||
);
|
);
|
||||||
controller.updateSelectedProduct(product);
|
controller.updateSelectedProduct(product);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user