This is a demo project to show how to add location sharing to a messaging app. The code is contained in the lib
folder.
The companion article to this reposioty can be found here.
If you'd like to run this project locally, there are a few things you will need:
- Flutter SDK (v2.0.0): You can download the Flutter SDK from the Flutter website.
- Stream Chat API key: Developers can create a free account on getstream.io or sign up for Stream's Chat trial.
- Google Maps API: You can get a Google Maps API key from Google Developer Console. The project uses both the Maps API and the Maps JavaScript API (static image API).
Before cloning and attempting to run this project, please make sure you have the above prerequisites installed and configured on your system.
- Clone this project and
cd
into the project directory. - Run
flutter packages get
install the various dependencies. - In
lib/main.dart
replace theSTREAM_KEY
,MAP_KEY
, andUSER_TOKEN
with your own API key and user token. - Run
flutter run
to build and run the project.
Note: This project was built and tested using the iOS simulator. If you are attempting to run this project on Android, please referece the Google Maps API documentation for platform specific instructions.
Happy Hacking!
-- Nash