Battery.fromJson constructor

Battery.fromJson(
  1. String source
)

fromJson is the method to convert the json to the class.

Implementation

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