Advertisement
jovanovski

Untitled

Jul 26th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.42 KB | None | 0 0
  1. class APIResponse {
  2.   final String stationName;
  3.   final int pollutionValue;
  4.   final String pollutionMetric;
  5.  
  6.   APIResponse({this.stationName, this.pollutionValue, this.pollutionMetric});
  7.  
  8.   factory APIResponse.fromJson(Map<String, dynamic> json) {
  9.     return APIResponse(
  10.       stationName: json['stationName'],
  11.       pollutionValue: json['pollutionValue'],
  12.       pollutionMetric: json['pollutionMetric'],
  13.     );
  14.   }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement