2022-10-18 15:07:13 +02:00
|
|
|
# Flutter Demo GPS-App
|
2022-10-17 16:53:45 +02:00
|
|
|
|
2022-10-18 15:07:13 +02:00
|
|
|
This is a sample application that demonstrates some of the features which can be found in many Flutter apps, e.g.
|
2022-10-17 16:53:45 +02:00
|
|
|
- Provider and BLoC pattern
|
|
|
|
- Accessing the GPS sensor
|
2022-10-18 15:07:13 +02:00
|
|
|
- Streams as data provider
|
2022-10-17 16:53:45 +02:00
|
|
|
- Localization
|
|
|
|
- Own Widgets
|
2022-10-18 15:07:13 +02:00
|
|
|
- Storing files
|
|
|
|
- ...
|
2022-10-17 16:53:45 +02:00
|
|
|
|
|
|
|
## Getting Started
|
|
|
|
`gps_bloc_app.dart` and `gps_provider_app.dart` are two implementations of the GPS app.
|
2022-10-18 15:07:13 +02:00
|
|
|
The first uses the BLoC pattern, the latter the provider pattern.
|
|
|
|
Both can be executed from the IDE and the command line, e.g.
|
|
|
|
|
|
|
|
`flutter run lib/gps_provider_app.dart`
|
|
|
|
|
|
|
|
To build an app for Android or iOS, one of these files hast to be linked or renamed to `main.dart`.
|
|
|
|
|
|
|
|
|
|
|
|
Tested with Flutter (Channel stable, 3.3.4, on Ubuntu 22.04.1) and
|
|
|
|
|
|
|
|
- Android
|
|
|
|
- Linux
|
|
|
|
- Web \
|
|
|
|
Note: ensure that browser provides GPS coordinates
|
|
|
|
- Google Chrome works
|
|
|
|
- Ungoogled Chromium does not
|
2022-10-17 16:53:45 +02:00
|
|
|
|