refactor: update JSON parsing to ensure type safety for ID fields in models
This commit is contained in:
@@ -69,9 +69,9 @@ class StoreModel extends Equatable {
|
||||
|
||||
factory StoreModel.fromJson(Map<String, dynamic> json) {
|
||||
return StoreModel(
|
||||
id: json['id'],
|
||||
id: json['id'] as String,
|
||||
nome: json['nome'],
|
||||
companyId: json['company_id'],
|
||||
companyId: json['company_id'] as String,
|
||||
isActive: json['is_active'] ?? true,
|
||||
isPaid: json['is_paid'] ?? false,
|
||||
paymentExpiration: json['payment_expiration'] != null
|
||||
|
||||
Reference in New Issue
Block a user