Public Access
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a3efa61be |
@@ -1,5 +1,4 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
|
||||||
<application
|
<application
|
||||||
android:label="oeffimaster"
|
android:label="oeffimaster"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
|
|||||||
+18
-61
@@ -4,12 +4,12 @@ import 'api_handler.dart';
|
|||||||
import 'transport_helper.dart';
|
import 'transport_helper.dart';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
// import 'package:sqflite_common_ffi/sqflite_ffi.dart'; //for testing on desktop
|
import 'package:sqflite_common_ffi/sqflite_ffi.dart'; //for testing on desktop
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
await dotenv.load();
|
await dotenv.load();
|
||||||
const String dbName = "oeffimasterTransportDb";
|
const String dbName = "oeffimasterTransportDb";
|
||||||
// databaseFactory = databaseFactoryFfi; // for debugging and desktop test
|
databaseFactory = databaseFactoryFfi; // for debugging and desktop test
|
||||||
DbHelper.initDb(dbName);
|
DbHelper.initDb(dbName);
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
}
|
}
|
||||||
@@ -335,25 +335,16 @@ class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// ElevatedButton(
|
ElevatedButton(
|
||||||
// onPressed: () {
|
|
||||||
// if (widget.journeyId != null) {
|
|
||||||
// loadJourney(widget.journeyId as int);
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// child: const Text('Finish Route'),
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
floatingActionButton: FloatingActionButton(
|
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (widget.journeyId != null) {
|
if (widget.journeyId != null) {
|
||||||
loadJourney(widget.journeyId as int);
|
loadJourney(widget.journeyId as int);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tooltip: 'Finish route',
|
child: const Text('Finish Route'),
|
||||||
child: const Icon(Icons.check),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -543,32 +534,8 @@ class _JourneyDetailPageState extends State<JourneyDetailPage> {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text('Connection Details \n$duration')),
|
appBar: AppBar(title: Text('Connection Details \n$duration')),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: SizedBox(
|
|
||||||
height: 400,
|
|
||||||
child: SegmentList(journey: widget.singleJourney),
|
child: SegmentList(journey: widget.singleJourney),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: const EdgeInsets.all(20.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(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
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(
|
FutureBuilder(
|
||||||
future: loadJourneys(),
|
future: loadJourneys(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
@@ -697,17 +654,17 @@ class _JourneyOverviewPageState extends State<JourneyOverviewPage> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ElevatedButton(
|
ElevatedButton(
|
||||||
// onPressed: () {
|
onPressed: () {
|
||||||
// Navigator.push(
|
Navigator.push(
|
||||||
// context,
|
context,
|
||||||
// MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
// builder: (context) => ChooseStationPage(),
|
builder: (context) => ChooseStationPage(),
|
||||||
// ),
|
),
|
||||||
// );
|
);
|
||||||
// },
|
},
|
||||||
// child: const Text('Start a route'),
|
child: const Text('Start a route'),
|
||||||
// ),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user