181186 - Criar PDV Android para rodar em maquinas P.O.S.

This commit is contained in:
felipe.franca committed 2026-11-17 17:43:00 -03:00
commit c9983cbad5
204 files changed
+11453

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
class Customer {
const Customer({
required this.id,
required this.name,
required this.documentMasked,
});
final int id;
final String name;
final String documentMasked;
factory Customer.fromJson(Map<String, dynamic> json) {
final id = json['id'];
final name = json['name'];
if (id is! num || name is! String) {
throw const FormatException('Resposta de cliente inválida.');
}
return Customer(
id: id.toInt(),
name: name,
documentMasked: json['document_masked']?.toString() ?? '',
);
}
}