Correct "errors".
This commit is contained in:
parent
13c532e87f
commit
2ee8eaecc8
@ -4,7 +4,7 @@ import '/var/config.dart';
|
|||||||
import '/var/secrets.dart';
|
import '/var/secrets.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'dart:convert';
|
//import 'dart:convert';
|
||||||
|
|
||||||
// Generic method to hit a GET request and return the response.
|
// Generic method to hit a GET request and return the response.
|
||||||
Future<String> hitAPI(String url) async {
|
Future<String> hitAPI(String url) async {
|
||||||
@ -16,7 +16,7 @@ Future<String> hitAPI(String url) async {
|
|||||||
String data = "";
|
String data = "";
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
data = response.body;
|
data = response.body;
|
||||||
var decodedData = jsonDecode(data);
|
//var decodedData = jsonDecode(data);
|
||||||
//data = decodedData.toString();
|
//data = decodedData.toString();
|
||||||
//data = jsonEncode(decodedData);
|
//data = jsonEncode(decodedData);
|
||||||
if (debugVerbose) {
|
if (debugVerbose) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Local
|
// Local
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import '/var/secrets.dart';
|
//import '/var/secrets.dart';
|
||||||
import '/var/config.dart';
|
import '/var/config.dart';
|
||||||
import 'helpers/http.dart';
|
import 'helpers/http.dart';
|
||||||
import 'helpers/json.dart';
|
import 'helpers/json.dart';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user