Flutter Apps, GPS location tracking

With the new post about Flutter Apps on the Librem 5 (thank you!), I was wondering if anyone has recommendations for a Flutter app that has gps location tracking for turn-by-turn navigation.

1 Like

I feel like you meant me. :stuck_out_tongue: You’re welcome! Couldn’t find any ready to go solution so far. Maybe you, I or someone else has time to test wether aquiring a GPS fix itself is possible with Flutter on Librem 5 right now?

It should be a matter of 1) following my tutorial for the virtual build machine and 2) build the flutter-geolocator linux example app and test that on the Librem 5 the same way as mentioned in the former tutorial.

1 Like

Great. Thank you! I think this might be a bit beyond my skill level, but I may give it a try. If I do, I will report back.

If you want to try that and have questions, feel free to ask!
Maybe I’ll also have time to try that in the meantime…

Speaking of location, I tried the maps icon on my L5 and tried to get directions for somewhere.

But then it wants you to sign up for “grasshopper” which means a name, a passphrase, and a country location.

I thought one of the purposes of apps on the L5 were not to ask these things?

Bit offtopic, isn’t it :stuck_out_tongue:

1 Like

Back at the top of this post, the post talks about GPS navigation and turn by turn navigation.

What did I miss besides flutter?

OP is specifically asking for a Flutter app recommendation I’d insist on. There are many other topics for turn-by-turn navigation itself. And the maps icon on your Librem 5 does get you to GNOME Maps which does not even do turn-by-turn :stuck_out_tongue:

Sorry for offending the topic cops then.

2 Likes

That offense is right under incorrect pronoun use, you’re lucky… this time.

1 Like

Hey @flanders51

I tried compiling the flutter-geolocator example app for the Librem 5!

SSH to build machine

flutter upgrade # Get newest Flutter version
cd ~/development
git clone https://github.com/Baseflow/flutter-geolocator.git
cd flutter-geolocator/geolocator_linux/example
nano pubspec.yaml # Observed upstream issue

Compiling failed due to some upstream issue I observed. Change:

  assets:
    - res/images/baseflow_logo_def_light-02.png
    - res/images/poweredByBaseflowLogoLight@3x.png
    - packages/baseflow_plugin_template/logo.png
    - packages/baseflow_plugin_template/poweredByBaseflow.png

to:

  assets:
    - res/images/baseflow_logo_def_light-02.png
    - res/images/poweredByBaseflowLogoLight@3x.png
    - packages/baseflow_plugin_template/assets/logo.png
    - packages/baseflow_plugin_template/assets/poweredByBaseflow.png

Build:

flutter build linux --release

Another error: ERROR: Compilation to SkSL failed.. Seems to be a Flutter upstream error for the current version: https://github.com/flutter/flutter/issues/116703 on ARM64.

So I downgraded Flutter again:

cd ~/development/flutter
git checkout 3.3.10
flutter doctor
cd ~/development/flutter-geolocator/geolocator_linux/example
flutter build linux --release

SUCCESS!

Copy the files to local machine: scp -P 2222 -r <USERNAME>@localhost:~/development/flutter-geolocator/geolocator_linux/example/build/linux/arm64/release/bundle/ ./flutter-geolocator/

Copied the build files to the Librem 5, make it executable via chmod +x example, start with ./example et voila:

Was about 5 km away from my real location. So it seems it uses Geoclue correctly. The exact position is depending on a correct GPS fix. :slight_smile:

1 Like

This is really cool. Can you make us all an app now?

You mean publishing the build here so that other’s can test? :thinking:

I did not see a map there. I thought maybe it was only a test to determine if GPS worked.

Yes, it is! Just a test app wether GPS could generally work with Flutter apps on Librem 5. :slight_smile: And it seems to work but I haven’t been under clear sky with it.

Don’t know wether there exist some turn-by-turn navigation Flutter apps so far…

Understood. Still very cool.

1 Like