Public Access
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a3efa61be |
@@ -1,44 +1,17 @@
|
||||
# oeffimaster
|
||||
|
||||
Aggregating information to create your own routes in public transit effortlessly.
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
## Goal of this project
|
||||
Do you ever get a route from google maps and see a 13 minute switch time, for a train that comes every ten minutes? Do you then prompt another app with better results. What if you'd normally have to wait 9 minutes for your train, but the previous train is late, so in reality you can switch with only a minutes worth of waiting? Now you can get an earlier train for the next connection, and suddenly the 3rd-fastest connection in google's algorithm becomes the fastest, and you saved 10 minutes - or could have, if you knew.
|
||||
My app will not solve this issue.
|
||||
As someone who is familiar with good chunks of the cities public transport network, I often enough *think* I can get faster to my target than the routing served by commonplace apps, but I have a hard time of knowing that for sure. Other apps allow some degree of comparing routes to one another, but it's not a priority, and editing any part of it is not supported at all.
|
||||
Oeffimaster aims to make that type of information easily accessible and aggregate it in the most helpful way, allowing comparison and editing of routes.
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
## Usage
|
||||
I am currently providing artifacts for linux and android. To make your own builds, you will need an api key for your network.
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
## Build the project
|
||||
- [Learn Flutter](https://docs.flutter.dev/get-started/learn-flutter)
|
||||
- [Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Flutter learning resources](https://docs.flutter.dev/reference/learning-resources)
|
||||
|
||||
### Get the API key
|
||||
For the VBB network in Berlin/Brandenburg
|
||||
|
||||
1. Installing flutter: https://docs.flutter.dev/install/quick
|
||||
2. Get an API key for VBB: https://unternehmen.vbb.de/digitale-services/api/
|
||||
It will take some time, but they will send you an API key and the url to access it.
|
||||
this should work for other public transit networks using the HAFAS api, but you will have to test this yourself
|
||||
|
||||
### The build part
|
||||
Create a `.env` in the project root and add the following to it
|
||||
|
||||
```env
|
||||
VBB_API_KEY={YOUR_API_KEY}
|
||||
VBB_API_URL={YOUR_API_URL}
|
||||
```
|
||||
|
||||
For local builds and connected devices simply run `flutter run` in your terminal.
|
||||
|
||||
To build for linux:
|
||||
```bash
|
||||
flutter build linux -DVBB_API_KEY={API_KEY} -DVBB_API_URL={API_URL}
|
||||
|
||||
```
|
||||
|
||||
To build for android:
|
||||
```
|
||||
flutter build apk -DVBB_API_KEY={API_KEY} -DVBB_API_URL={API_URL}
|
||||
```
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
android:label="oeffimaster"
|
||||
android:name="${applicationName}"
|
||||
|
||||
+16
-59
@@ -335,25 +335,16 @@ class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
// ElevatedButton(
|
||||
// onPressed: () {
|
||||
// if (widget.journeyId != null) {
|
||||
// loadJourney(widget.journeyId as int);
|
||||
// }
|
||||
// },
|
||||
// child: const Text('Finish Route'),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
if (widget.journeyId != null) {
|
||||
loadJourney(widget.journeyId as int);
|
||||
}
|
||||
},
|
||||
tooltip: 'Finish route',
|
||||
child: const Icon(Icons.check),
|
||||
child: const Text('Finish Route'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -543,32 +534,8 @@ class _JourneyDetailPageState extends State<JourneyDetailPage> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text('Connection Details \n$duration')),
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
height: 400,
|
||||
child: SegmentList(journey: widget.singleJourney),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.only(bottom: 60.0),
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => JourneyOverviewPage(),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: const Text('View all Journeys'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -635,16 +602,6 @@ class _JourneyOverviewPageState extends State<JourneyOverviewPage> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 30, top: 50),
|
||||
width: 500.0,
|
||||
height: 100.0,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.contain,
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text("Your Journeys"),
|
||||
),
|
||||
),
|
||||
FutureBuilder(
|
||||
future: loadJourneys(),
|
||||
builder: (context, snapshot) {
|
||||
@@ -697,17 +654,17 @@ class _JourneyOverviewPageState extends State<JourneyOverviewPage> {
|
||||
);
|
||||
},
|
||||
),
|
||||
// ElevatedButton(
|
||||
// onPressed: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => ChooseStationPage(),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// child: const Text('Start a route'),
|
||||
// ),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ChooseStationPage(),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: const Text('Start a route'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user