save method
Implementation
Future<bool> save() async {
final UTerminalBrandResponse? b = editing;
final List<int> tags = <int>[deviceType.number, connectionType.number];
return await send(
b == null
? UServices.terminal.createBrand(p: UTerminalBrandCreateParams(code: codeController.text.trim(), title: titleController.text.trim(), model: modelController.text.trim(), tags: tags))
: UServices.terminal.updateBrand(
p: UTerminalBrandUpdateParams(id: b.id, code: codeController.text.trim().nullIfEmpty(), title: titleController.text.nullIfEmpty(), model: modelController.text.nullIfEmpty(), tags: tags),
),
read,
) !=
null;
}