Public Access
cleanup: remove unused code blocks that were already commented out
This commit is contained in:
@@ -30,7 +30,6 @@ final _defaultDarkScheme = ColorScheme.fromSeed(
|
|||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
const MyApp({super.key});
|
const MyApp({super.key});
|
||||||
|
|
||||||
// This widget is the root of your application.
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return DynamicColorBuilder(
|
return DynamicColorBuilder(
|
||||||
@@ -63,9 +62,7 @@ class MyHomePage extends StatefulWidget {
|
|||||||
|
|
||||||
class _MyHomePageState extends State<MyHomePage> {
|
class _MyHomePageState extends State<MyHomePage> {
|
||||||
int _counter = 0;
|
int _counter = 0;
|
||||||
//String API_KEY = ApiHandler.accessID;
|
|
||||||
String API_KEY = "no telly";
|
String API_KEY = "no telly";
|
||||||
//Future<Map<String, dynamic>> ?id;
|
|
||||||
List<Station> stationList = [];
|
List<Station> stationList = [];
|
||||||
String id = '';
|
String id = '';
|
||||||
|
|
||||||
@@ -78,37 +75,14 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// This method is rerun every time setState is called, for instance as done
|
|
||||||
// by the _incrementCounter method above.
|
|
||||||
//
|
|
||||||
// The Flutter framework has been optimized to make rerunning build methods
|
|
||||||
// fast, so that you can just rebuild anything that needs updating rather
|
|
||||||
// than having to individually change instances of widgets.
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
//backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
|
||||||
//backgroundColor: Colors.amber,
|
|
||||||
// Here we take the value from the MyHomePage object that was created by
|
|
||||||
// the App.build method, and use it to set our appbar title.
|
|
||||||
title: Text(widget.title),
|
title: Text(widget.title),
|
||||||
),
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: .center,
|
mainAxisAlignment: .center,
|
||||||
children: [
|
children: [
|
||||||
// const Text('You have pushed the button this many times:'),
|
|
||||||
// Text(
|
|
||||||
// '$_counter',
|
|
||||||
// style: Theme.of(context).textTheme.headlineMedium,
|
|
||||||
// ),
|
|
||||||
// Text('API key from ENV is $API_KEY'),
|
|
||||||
// MaterialButton(
|
|
||||||
// onPressed: () {
|
|
||||||
// showResult(ApiHandler.findStations('S Biesdorf'));
|
|
||||||
// },
|
|
||||||
// child: Text('Search for \'S Biesdorf\''),
|
|
||||||
// ),
|
|
||||||
// Text(id),
|
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
@@ -182,7 +156,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
|||||||
|
|
||||||
void _search(String? query) {
|
void _search(String? query) {
|
||||||
if (query?.isEmpty ?? true) return;
|
if (query?.isEmpty ?? true) return;
|
||||||
// do something with query
|
|
||||||
setState(() {
|
setState(() {
|
||||||
findStationsByName(query!);
|
findStationsByName(query!);
|
||||||
});
|
});
|
||||||
@@ -201,12 +174,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
|||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// ElevatedButton(
|
|
||||||
// onPressed: () {
|
|
||||||
// showResult(ApiHandler.findStations('S Biesdorf'));
|
|
||||||
// },
|
|
||||||
// child: Text('Search for \'S Biesdorf\''),
|
|
||||||
// ),
|
|
||||||
SearchAnchor(
|
SearchAnchor(
|
||||||
builder: (BuildContext context, SearchController controller) {
|
builder: (BuildContext context, SearchController controller) {
|
||||||
return SearchBar(
|
return SearchBar(
|
||||||
@@ -215,9 +182,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
|||||||
padding: const WidgetStatePropertyAll<EdgeInsets>(
|
padding: const WidgetStatePropertyAll<EdgeInsets>(
|
||||||
EdgeInsets.symmetric(horizontal: 16.0),
|
EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
),
|
),
|
||||||
// onTap: () {
|
|
||||||
// controller.openView();
|
|
||||||
// },
|
|
||||||
onChanged: _onSearchChanged,
|
onChanged: _onSearchChanged,
|
||||||
onSubmitted: _search,
|
onSubmitted: _search,
|
||||||
leading: const Icon(Icons.search),
|
leading: const Icon(Icons.search),
|
||||||
@@ -254,9 +218,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handleStationTapped(Station station) {
|
void _handleStationTapped(Station station) {
|
||||||
// setState(() {
|
|
||||||
// _selectedStation = station;
|
|
||||||
// });
|
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
@@ -370,14 +331,6 @@ class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// ElevatedButton(
|
|
||||||
// onPressed: () {
|
|
||||||
// if (widget.journeyId != null) {
|
|
||||||
// loadJourney(widget.journeyId as int);
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// child: const Text('Finish Route'),
|
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -396,9 +349,6 @@ class _ChooseDeparturePageState extends State<ChooseDeparturePage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handleDepartureTapped(Departure departure) {
|
void _handleDepartureTapped(Departure departure) {
|
||||||
// setState(() {
|
|
||||||
// _selectedDeparture = departure;
|
|
||||||
// });
|
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
@@ -496,9 +446,6 @@ class _ChooseArrivalPageState extends State<ChooseArrivalPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handleArrivalTapped(Departure departure, Departure arrival) async {
|
void _handleArrivalTapped(Departure departure, Departure arrival) async {
|
||||||
// setState(() {
|
|
||||||
// _selectedDeparture = departure;
|
|
||||||
// });
|
|
||||||
departure.dbInsert;
|
departure.dbInsert;
|
||||||
arrival.dbInsert;
|
arrival.dbInsert;
|
||||||
Segment newSegment = await Segment.fromDepartures(departure, arrival);
|
Segment newSegment = await Segment.fromDepartures(departure, arrival);
|
||||||
@@ -768,17 +715,6 @@ class _JourneyOverviewPageState extends State<JourneyOverviewPage> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ElevatedButton(
|
|
||||||
// onPressed: () {
|
|
||||||
// Navigator.push(
|
|
||||||
// context,
|
|
||||||
// MaterialPageRoute(
|
|
||||||
// builder: (context) => ChooseStationPage(),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// child: const Text('Start a route'),
|
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user