Service.fromJson constructor
Implementation
factory Service.fromJson(Map<String, dynamic> json) {
return Service(
id: json['id'],
name: json['name'],
description: json['description'],
icon: json['icon'],
isActive: json['is_active'] ?? false,
createdAt: json['created_at'] != null ? DateTime.parse(json['created_at']) : null,
updatedAt: json['updated_at'] != null ? DateTime.parse(json['updated_at']) : null,
);
}