aggiunto trim nei tojson
This commit is contained in:
@@ -99,9 +99,9 @@ class CustomerModel extends Equatable {
|
|||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return {
|
return {
|
||||||
if (id != null) 'id': id,
|
if (id != null) 'id': id,
|
||||||
'nome': nome.toLowerCase(),
|
'nome': nome.toLowerCase().trim(),
|
||||||
'telefono': telefono,
|
'telefono': telefono,
|
||||||
'email': email.toLowerCase(),
|
'email': email.toLowerCase().trim(),
|
||||||
'note': note,
|
'note': note,
|
||||||
if (dataUltimoContatto != null)
|
if (dataUltimoContatto != null)
|
||||||
'data_ultimo_contatto': dataUltimoContatto!.toIso8601String(),
|
'data_ultimo_contatto': dataUltimoContatto!.toIso8601String(),
|
||||||
|
|||||||
@@ -34,8 +34,7 @@ class ModelModel extends Equatable {
|
|||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return {
|
return {
|
||||||
if (id != null) 'id': id,
|
if (id != null) 'id': id,
|
||||||
'name': name.toLowerCase(),
|
'name': name.toLowerCase().trim(),
|
||||||
'name_with_brand': nameWithBrand.toLowerCase(),
|
|
||||||
'brand_id': brandId,
|
'brand_id': brandId,
|
||||||
'is_active': isActive,
|
'is_active': isActive,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user