A sample Flutter application to start learning the power of Situm Flutter Plugin.
This folder contains the necessary source code for an example application using the Situm Flutter plugin.
The first step is to download this repo:
git clone https://github.com/situmtech/flutter.git situm_flutterAnd then install the plugin dependencies alongside the example app as follows:
cd situm_flutter/example
flutter pub getThe bundled example app uses Swift Package Manager for iOS dependencies.
Note
This limitation only affects local development of this repository and the
bundled example app when using Swift Package Manager. Apps that consume
situm_flutter from pub.dev are not affected.
When running this example app on iOS with Swift Package Manager, make sure the
repository directory is named situm_flutter. Some Flutter versions generate
local Swift package overrides using the plugin directory name, and a different
checkout folder name can cause Swift package resolution failures.
Also check out the project code signing before you run the example.
This example provides you with a template on lib/config.dart.example:
Warning Rename
config.dart.exampletoconfig.dart.
Now populate it with your credentials:
const situmApiKey = "YOUR-SITUM-API-KEY";
const buildingIdentifier = "YOUR-SITUM-BUILDING-IDENTIFIER";From the example folder, execute the following command which works on both Android and iOS devices:
flutter runImportant
In case you are not able to compile our example app, you could try to set your flutter and java versions to the specified at mise.toml. If you install mise, this versioning tool will switch automatically to the correct versions you need.
Tip
If a release build (flutter build apk) fails in a Gradle lint task with a Java error such as
NoSuchMethodError, the JDK used by Flutter is probably too old. Debug runs (flutter run) do not run
that lint, so the problem only shows up in release builds.
Flutter does not always use the java from your PATH or JAVA_HOME (for example, it may pick the JDK
bundled with Android Studio). To check and change it:
flutter doctor -v | grep -i java # JDK that Flutter is using
flutter config --jdk-dir <path-to-jdk> # use a recent JDK (21 or later)You can also run the app from your IDE:
- On Android: open
example/android/with Android Studio. - On iOS: open
example/ios/Runner.xcworkspacewith XCode.
More information on how to use the official Flutter plugin and the set of APIs, the functions, parameters and results each function accepts and provides can be found in our SDK API Reference and Wayfinding API Reference.
In case you want to learn how to use our plugin, you may want to take a look at our code samples of the basics functionalities:
- Basic SDK and Wayfinding functionality: showcases how to initialize the Situm SDK (refer to the flutter sdk quickstart guide for more information) and how to use some basic features like positioning and obtaining the information of a given building. It also shows how to use the Situm Wayfinding module (refer to the flutter wayfinding quickstart guide for more information).
We use SemVer for versioning.
Please refer to CHANGELOG.md for a list of notables changes for each version of the library.
You can also see the tags on this repository.
You will need to sign a Contributor License Agreement (CLA) before making a submission. Learn more here.
This project is licensed under the MIT - see the LICENSE file for details.
More info is available at our Developers Page.
For any question or bug report, please send an email to support@situm.es

