Specification.fromMap constructor

Specification.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Specification.fromMap(Map<String, dynamic> map) {
  return Specification(
    memory: (map['memory'] is String)
        ? int.tryParse(map['memory']) ?? 0
        : map['memory'] ?? 0,
    cpus: map['cpus'].toDouble(),
    enabled: map['enabled'],
    slug: map['slug'].toString(),
  );
}