Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have problem in my code #1

Open
Ammar441 opened this issue Apr 22, 2020 · 2 comments
Open

I have problem in my code #1

Ammar441 opened this issue Apr 22, 2020 · 2 comments

Comments

@Ammar441
Copy link

Ammar441 commented Apr 22, 2020

I am creating a project of your own project. I am getting requests from the server. But when I want to amend the request, the server returns the data correctly, but the data is not returned to the modification page. This error returns i am using asp web api
Instance of 'APIResponse'

`Future<APIResponse> getOrder(String orderId) {
return http.get(url + '/Order/'+orderId, headers: {
'Authorization':authorization
}).then((data) {
if (data.statusCode == 200) {
print(data.body);
final jsonData = json.decode(data.body);
return APIResponse(data: Order.fromJson(jsonData));
// return APIResponse(data: Order.fromJson(jsonData).driverName);
}
return APIResponse(error: true, errorMessage: "حدث ");
// return APIResponse<List>(error: true, errorMessage: "حدث خطا");
})
.catchError((e)=>APIResponse(error: true, errorMessage: "حدث "));

}`

V/AudioManager( 5802): playSoundEffect effectType: 0
V/AudioManager( 5802): querySoundEffectsEnabled...
E/flutter ( 5802): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'orderNumber' was called on null.
E/flutter ( 5802): Receiver: null
E/flutter ( 5802): Tried calling: orderNumber
�[38;5;244mE/flutter ( 5802): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)�[39;49m
�[38;5;248mE/flutter ( 5802): #1 _OrderModify.initState.�[39;49m
�[38;5;244mE/flutter ( 5802): #2 _rootRunUnary (dart:async/zone.dart:1134:38)�[39;49m
�[38;5;244mE/flutter ( 5802): #3 _CustomZone.runUnary (dart:async/zone.dart:1031:19)�[39;49m
�[38;5;244mE/flutter ( 5802): #4 _FutureListener.handleValue (dart:async/future_impl.dart:139:18)�[39;49m
�[38;5;244mE/flutter ( 5802): #5 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)�[39;49m
�[38;5;244mE/flutter ( 5802): #6 Future._propagateToListeners (dart:async/future_impl.dart:709:32)�[39;49m
�[38;5;244mE/flutter ( 5802): #7 Future._completeWithValue (dart:async/future_impl.dart:524:5)�[39;49m
�[38;5;244mE/flutter ( 5802): #8 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)�[39;49m
�[38;5;244mE/flutter ( 5802): #9 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)�[39;49m
E/flutter ( 5802): #10 _withClient (package:http/http.dart)
E/flutter ( 5802):
�[38;5;248mE/flutter ( 5802): #11 get�[39;49m
�[38;5;248mE/flutter ( 5802): #12 OrderService.getOrders�[39;49m
�[38;5;248mE/flutter ( 5802): #13 _OrderModify.initState�[39;49m
�[38;5;244mE/flutter ( 5802): #14 StatefulElement._firstBuild�[39;49m
�[38;5;244mE/flutter ( 5802): #15 ComponentElement.mount�[39;49m
�[38;5;244mE/flutter ( 5802): #16 Element.inflateWidget�[39;49m
�[38;5;244mE/flutter ( 5802): #17 Element.updateChild�[39;49m
�[38;5;244mE/flutter ( 5802): #18 SingleChildRenderObjectElement.mount�[39;49m
�[38;5;244mE/flutter ( 5802): #19 Element.inflateWidget�[39;49m
�[38;5;244mE/flutter ( 5802): #20 Element.updateChild�[39;49m
�[38;5;244mE/flutter ( 5802): #21 ComponentElement.performRebuild�[39;49m
�[38;5;244mE/flutter ( 5802): #22 Element.rebuild�[39;49m
�[38;5;244mE/flutter ( 5802): #23 ComponentElement._firstBuild�[39;49m
�[38;5;244mE/flutter ( 5802): #24 ComponentElement.mount�[39;49m
�[38;5;244mE/flutter ( 5802): #25 Element.inflateWidget�[39;49m
�[38;5;244mE/flutter ( 5802): #26 Element.updateChild�[39;49m
�[38;5;244mE/flutter ( 5802): #27 SingleChildRenderObjectElement.mount�[39;49m
�[38;5;244mE/flutter ( 5802): #28 Element.inflateWidget�[39;49m
�[38;5;244mE/flutter ( 5802): #29 Element.updateChild�[39;49m
�[38;5;244mE/flutter ( 5802): #30 SingleChildRenderObjectElement.mount�[39;49m
�[38;5;244mE/flutter ( 5802): #31 Element.inflateWidget�[39;49m
�[38;5;244mE/flutter ( 5802): #32 Element.updateChild�[39;49m
�[38;5;244mE/flutter ( 5802): #33 ComponentElement.performRebuild�[39;49m
�[38;5;244mE/flutter ( 5802): #34 Element.rebuild�[39;49m
�[38;5;244mE/flutter ( 5802): #35 ComponentElement._firstBuild�[39;49m
�[38;5;244mE/flutter ( 5802): #36 StatefulElement._firstBuild�[39;49m
�[38;5;244mE/flutter ( 5802): #37 ComponentElement.mount�[39;49m
�[38;5;244mE/flutter ( 5802): #38 Element.inflateWidget�[39;49m
�[38;5;244mE/flutter ( 5802): #39 Element.updateChild�[39;49m
�[38;5;244mE/flutter ( 5802): #40 SingleChildRenderObjectElement.mount�[39;49m
�[38;5;244mE/flutter ( 5802): #41 Element.inflateWidget�[39;49m
�[38;5;244mE/flutter ( 5802): #42 Element.updateChild�[39;49m
�[38;5;244mE/flutter ( 5802): #43 SingleChildRenderObjectElement.mount�[39;49m
�[38;5;244mE/flutter ( 5802): #44 Element.inflateWidget�[39;49m
�[38;5;244mE/flutter ( 5802): #45 Element.updateChild�[39;49m
�[38;5;244mE/flutter ( 5802): #46 ComponentElement.performRebuild�[39;49m
E/flutter ( 5802): #47 Ele
W/InputMethodManager( 5802): startInputReason = 8
W/IInputConnectionWrapper( 5802): getExtractedText on inactive InputConnection
W/IInputConnectionWrapper( 5802): getTextBeforeCursor on inactive InputConnection
D/ZrHung.AppEyeUiProbe( 5802): stop checker.
W/libEGL ( 5802): EGLNativeWindowType 0x78b9e4d010 disconnect failed
D/ViewRootImplMainActivity: surface should not be released
D/FlutterView( 5802): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@cbc37e7
W/InputMethodManager( 5802): startInputReason = 3
I/ViewRootImpl( 5802): jank_removeInvalidNode all the node in jank list is out of time
W/IInputConnectionWrapper( 5802): getExtractedText on inactive InputConnection
W/IInputConnectionWrapper( 5802): getTextBeforeCursor on inactive InputConnection
W/libEGL ( 5802): EGLNativeWindowType 0x78b9e4e010 disconnect failed
V/ActivityThread( 5802): Handle window ActivityRecord{a45ce8 token=android.os.BinderProxy@3356eca {com.example.request_order/com.example.request_order.MainActivity}} visibility: false
D/ZrHung.AppEyeUiProbe( 5802): Current Activity:false
D/ZrHung.AppEyeUiProbe( 5802): not watching, wait.
E/ ( 5802): [ZeroHung]zrhung_get_config: Get config failed for wp[0x0008]

@kayson91
Copy link

Have the same issue

@SundusAdwan
Copy link

do you still need some help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants