getJsonFile method

Future<bool> getJsonFile(
  1. String url
)

Implementation

Future<bool> getJsonFile(String url) async {
  try {
    final response = await http.get(Uri.parse(url));
    if (response.statusCode == 200) {
      appFile = JsonFile.fromJson(json.decode(response.body));
      return true;
    } else
      return false;
  } on Exception catch (_) {
    print(_);
    return false;
  }
}