Error: Unexpected null value while implementing flutter_google_places [flutter web] - flutter

I am using the https://pub.dev/packages/flutter_google_places package in flutter web to pick the location from google place API
but it throws an error as
Error: XMLHttpRequest error.
or sometimes
Error: Unexpected null value.
I tried to find out a solution and got one temporary solution,
i added one argument in PlacesAutocomplete.show() method as
proxyBaseUrl: kIsWeb
? 'https://cors-anywhere.herokuapp.com/https://maps.googleapis.com/maps/api'
: null,
this link provides me temporary access to google places but after some hours it expires and needs to request again manually from this link, so it is not a workable solution at all.
so, anyone who knows how to implement flutter_google_places in flutter web then kindly helps!!

Try using this version flutter_google_places_hoc081098: ^1.1.0. it seems that one has problems.

Related

Call JavaScript function from dart

Is anyone know how to call JS function from dart ?
I followed steps which linked below.
Firstly, appear this error.
"Error: Not found: 'dart:js' import 'dart:js';"
I followed previous answer which comment this line from js.dart and fixed it.
[export 'dart:js' show allowInterop, allowInteropCaptureThis;].
But now I got another error below.
No top-level method 'callJsFunc' declared. Receiver: top-level Tried calling: callJsFunc()
Is anyone know how to fix this error ?
text
I tried other Flutter SDK version (latest one and 3.0.5) but got same error.
flutter uses dart not javascript.
so... actually you require a separate javascript engine if you want to use javascript with flutter and that can be done with dart ffi unless you are building a web app with flutter.
However, there is a library called flutter_js and you can use it if you need to run javascript.
On the other hand, if you are interested in using embeddable Javascript engine with your flutter project by yourself.
you should check this link out where it shows how to use ffi for attaching an embeddable Javascript engine called Duktape

Flutter debugger not showing error where it occurred in my Flutter app files

Flutter debugger is not showing the error where it occurred in my Flutter app files, instead, it shows the specific flutter file in which the error occurred this has made me unable to track where the error came from in my file. I get this when using flutter in vscode. The error is that I used a null check on a null value.
Flutter does this with a few errors, had the same issue with a declaration error where data from a JSON was int and I declared it as a list. I found that running it and inspecting the console on the HTML page sometimes helps and shows more info. If you could post the specific error it would be easier to help you find a solution.

Kadena Marmalade api errors

Last time I used marmalade(https://kadena-io.github.io/marmalade/), I could see data on it. but I can't see them today.
I was investigating why I could not see any data, and found these api error.
Error Image
This means, server is not working? How can I fix this?

Why is jquery.fileupload-validate raising $.blueimp.fileupload.prototype.options.processQueue.push error?

I am using jquery file upload on a page, and the following error is being raised in the browser console.
TypeError: undefined is not an object (evaluating '$.blueimp.fileupload.prototype.options.processQueue.push')
It appears to be coming from jquery.fileupload-validate.
I have been unable to find much information about this error. From previous experience jquery file upload seems to be very sensitive to the order in which modules are loaded, but again I've been unable to find much in the way of documentation about this.
Has anyone else encountered this error, or can shed some light on load order or other possible causes?
BTW, I am currently loading files in the following order (though have tried others without success)
jquery.fileupload
jquery.fileupload-ui
jquery.fileupload-validate
jquery.fileupload-process
jquery.fileupload-image
jquery.iframe-transport
Try this order:
js/jquery-3.3.1.js
js/jquery.ui.widget.js
js/jquery.iframe-transport.js
js/jquery.fileupload.js
js/jquery.fileupload-process.js
js/jquery.fileupload-image.js
js/jquery.fileupload-validate.js

Google Maps API v2 used to work on Android, now getMyLocation returns always null

I believe I did everything correct because my app used to work before. Then suddenly stop working. I am not able to get current location from Google Map object, it returns always null.
I checked if my api key works on api console, request can be seen so I think it works
I tried uninstalling app, then installing again, it did not help
I tried to create a new key but this did not help neither.
I didn't post my code because I think it is correct, otherwise it wouldn't work at the beginning.​
Logcat-Errors
09-05 19:28:30.222: E/dalvikvm(5179): Could not find class 'gpq', referenced from method gpr.a
09-05 19:28:30.222: E/dalvikvm(5179): Could not find class 'gpq', referenced from method gpr.a
09-05 19:28:30.222: E/dalvikvm(5179): Could not find class 'gpq', referenced from method gpr.a
09-05 19:28:30.342: E/dalvikvm(5179): Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method gls.a
Logcat: http://pastebin.com/RPJLr6F2
EDIT: I found out that cause of the problem is my device (nexus 5,Kitkat 4.4.4), it worked properly on another device(Jelly Bean 4.1)
Looking at your logcat it is clear that your app is using a lot of memory. getMyLocation() is depreciated so use LocationClient instead.
From the documentation of getMyLocation():
Returns the currently displayed user location, or null if there is no location data available.
Null is valid data returned by getMyLocation so you will need to handle it. Just check if the value returned is null.