getHostInfo method Null safety

Future<Map<String, dynamic>> getHostInfo()

Implementation

Future<Map<String, dynamic>> getHostInfo() async {
  final url = 'http://$_tvHostname:8001/api/v2/';
  BaseOptions options = new BaseOptions(connectTimeout: 1000);
  final dio = Dio(options);
  final Response response = await dio.get(url);
  return response.data;
}