BlogPost.fromJson constructor

BlogPost.fromJson(
  1. String source
)

This is will help us to create object from json input

Implementation

factory BlogPost.fromJson(String source) =>
    BlogPost.fromMap(json.decode(source));