Category.fromMap constructor

Category.fromMap(
  1. dynamic categoryMap
)

Implementation

factory Category.fromMap(dynamic categoryMap){
  return Category(
    name: categoryMap["name"] as String,
    slug: categoryMap["slug"] as String
  );
}