Flutter : map dependencie crashes the app - flutter

I'm trying to use google map with flutter so i'm using the dependencie "google_maps_flutter"
version: "0.5.18"
The problem is when I add the line below (in my pubsec.yaml)-->
google_maps_flutter: ^0.5.16
dependecies img
the app crashes.
Below is the picture of the error. I've tried to look what 15.0.1 and 16.0.1 were refering to but I have no idea.
error img
Good to know :
When I add the above line the following code is automatically added.
changes in the pubsec.lock file after adding above line

Apparently the error was in my dependencie (pubsec.yaml file) It seems location and google_maps_flutter aren't compatible. Either I had to remove one to make the other work.
Edit :
The plugin "geocoder: ^0.1.2" does work. I can successfully display location (lat & long) from typing addresses or by passing lat & long as parameters.
geocoder docs : https://pub.dev/packages/geocoder

Related

Flutter File_picker MissingPluginException

I'm trying to install file picker except that when my button is clicked or the file picker function is assigned, I have this error that appears: "MissingPluginException (MissingPluginException(No implementation found for method any on channel miguelruivo.flutter.plugins.filepicker))"
I couldn't find anything about it
image_picker and file_picker don't work well with the ios simulator. You have to use a real device instead.
in your project path use this command
flutter clean

Why local package widgets not showing up time to time?

I have a ui package, this package simply contains some(10+) widgets and they are all just a widgets. None of them some complex controller or etc so when I use them, I can't miss the something like initializers or etc.
So my problem is, after the installation an app(which is contains a lot of witget from that package) everything working correctly like the image.
But if I change the current app on android/real device(and without debug mode), like switching the chrome and spend some time at the browser, after returning the app, all widgets showing off, they are simply dissappering. Like the image;
So my question is simple, why can it be happen? By the way, the divider as shown the middle of the page,is not part of the package, it is located in app/lib folder.
and lastly, I don't give any change but I have 57 svg file in the package but I am not call all of them at same time and their total size just 833,5kb, but maybe it can be related?
I don't have any native knowledge but if anyone can point me some tips, I will be glad.
Not really sure if it's a bug related to the new version of Flutter (3.0.2) but upgrading ext.kotlin_version inside android/build.gradle to 1.7.0 do the trick.

Is there a way to specify the file name in advance for the picture taken with the flutter camera plugin?

Hi I am using the flutter camera plugin and it works fine, the main issue I am having is that I can't find a way to tell the plugin the image file name when taking the picturee, in android using Kotlin this would be something like:
photoUri = FileProvider.getUriForFile(requireActivity(), "io.awesomedomain", photoFile) // build uri on the app storage space and specific file name -> photoFile.
captureImageIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri) // define the pic name before picture is actually taken by the camera.
startActivityForResult(captureImageIntent, REQUEST_PHOTO) // start the camera
I am currently just renaming the picture file name after the picture XFile returns from the flutter camera plugin but this doesn't feel optimal so I am wondering if I am missing something. Is it possible to specify the file name in advance to the flutter camera plugin?
I am currently using the latest available version at the moment: camera: ^0.7.0+2
OK, it looks like I had a misunderstanding of the Camera plugin, I noticed that the returned XFile places the picture in the cache directory and actually provides a method to save the picture to a more definitive storage xfile.saveTo so I did:
var appDir = appDocDirectory.parent.path; // get app directory
file.saveTo('$appDir${Platform.pathSeparator}files${Platform.pathSeparator}${weightPicture.pictureFileName}');
So the picture is properly saved under $myAppDir/files/picName.jpg where the files is a directory I configured to have permission to write to and the picName is defined by the application as I wanted.

MobileFirst 7.1 BusyIndicator showing weird characters

I'm developing an hybrid app on MobileFirst 7.1, with Ionic libraries.
In a .js file I globally define
var busyIndicator = new WL.BusyIndicator ("content", {text: "DUMMY TEXT"});
but when I call for it to show, i.e.
busyIndicator.show();
I always get the same message, ignoring the text I put in the text field:
Image link here
I'm testing this on Android devices (Huawei P7 Ascend, Samsung Galaxy J5, both with Android 5.1). On the Android Mobile Simulator the message displays just fine.
p.s. "content" matches my html id, I tried putting null instead of "content" but to no avail.
A workaround
define in some common .js file
function showMyIndicator() {
busyIndicator.__options.text="Custom loading text";
busyIndicator.show();
}
and call showMyIndicator() each time you would call busyIndicator.show().
busyIndicator.hide() can be called normally (although you might want to define some 'hideMyIndicator()' function for homogeneity).
What is happening?
It appears that, as soon as I load (jQuery $.load() ) some new content in order to change page, the text fileld of the busyIndicator object defaults to "[(')ههههههه Loading]", which is defined in every native project inside messages.json.
That file is full of those weird signs, no idea about why.
Update
There's something corrupted in my project which causes those .json files to be generated with wrong characters, a freshly generated project didn't show the same issues so creating a new one and move the resources in there might do the trick.

cordova 2.2 mapkit - map is not showing up

I am trying to put mapkit in my phonegap (Cordova 2.2) application. I am following all the instructions but when I build the application then I get the white screen with the buttons "show,hide,shrink,zoom,clear" in the bottom of my simulator screen.
Can anyone please help me to how to show the map?
I was having same issue, problem was that I have not entered the plugin name mapkitview in the phonegap.plist file
Also in the js file, sometimes if you have downloaded the older version of plugin, you need to switch between phonegap and cordova as javascript variables.