-
Notifications
You must be signed in to change notification settings - Fork 384
Description
getting the following error when trying to connect http
this code is working ok on simulator
Launching lib\main.dart on SM G610F in debug mode...
√ Built build\app\outputs\apk\debug\app-debug.apk.
Connecting to VM Service at ws://127.0.0.1:49790/roXGeUG_a5Q=/ws
D/libGLESv2(13078): STS_GLApi : DTS, ODTC are not allowed for Package : com.example.httprequest_test
V/InputMethodManager(13078): Starting input: tba=android.view.inputmethod.EditorInfo@f5d52fb nm : com.example.httprequest_test ic=null
D/InputMethodManager(13078): startInputInner - Id : 0
I/InputMethodManager(13078): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport(13078): Input channel constructed: fd=97
D/InputTransport(13078): Input channel destroyed: fd=87
D/SurfaceView(13078): windowStopped(true) false 67ebe94 of ViewRootImpl@8fd48a6[MainActivity]
D/SurfaceView(13078): BG show() Surface(name=Background for - SurfaceView - com.example.httprequest_test/com.example.httprequest_test.MainActivity@67ebe94@0) io.flutter.embedding.android.FlutterSurfaceView{67ebe94 V.E...... ........ 0,0-1080,1920}
D/SurfaceView(13078): surfaceDestroyed 1 #1 io.flutter.embedding.android.FlutterSurfaceView{67ebe94 V.E...... ........ 0,0-1080,1920}
D/SurfaceView(13078): onWindowVisibilityChanged(8) false 67ebe94 of ViewRootImpl@8fd48a6[MainActivity]
D/SurfaceView(13078): BG show() Surface(name=Background for - SurfaceView - com.example.httprequest_test/com.example.httprequest_test.MainActivity@67ebe94@0) io.flutter.embedding.android.FlutterSurfaceView{67ebe94 V.E...... .......D 0,0-1080,1920}
D/OpenGLRenderer(13078): eglDestroySurface = 0xe688ac70, 0xcdacd800
D/ViewRootImpl@8fd48a6MainActivity: Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true
D/ViewRootImpl@8fd48a6MainActivity: MSG_WINDOW_FOCUS_CHANGED 0
--------------------------------------------This is the Code--------------------------------
using version: http: ^0.12.2
try {
var response = await http
.get('https://www.googleapis.com/books/v1/volumes?q={http}');
if (response.statusCode != 200) {
print(response.statusCode.toString());
return 1;
} else {
print( response.body);
}
} catch (ex) {
print(ex.toString());
}
}