TypeTotal method

dynamic TypeTotal()

Return Total Data From JSON Request

Implementation

TypeTotal() async {
  final base = RetryClient(http.Client());
  try {
    String DataText =
        await base.read(Uri.parse("$BASE_URL/$Category/$EndPoint"));
    if (TypeFunction == "image") {
      return jsonDecode(DataText)["total_image"];
    } else if (TypeFunction == "text") {
      return jsonDecode(DataText)["total_text"];
    }
  } finally {
    base.close();
  }
}