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 {
|
||||
const MyApp({super.key});
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DynamicColorBuilder(
|
||||
@@ -63,9 +62,7 @@ class MyHomePage extends StatefulWidget {
|
||||
|
||||
class _MyHomePageState extends State<MyHomePage> {
|
||||
int _counter = 0;
|
||||
//String API_KEY = ApiHandler.accessID;
|
||||
String API_KEY = "no telly";
|
||||
//Future<Map<String, dynamic>> ?id;
|
||||
List<Station> stationList = [];
|
||||
String id = '';
|
||||
|
||||
@@ -78,37 +75,14 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
|
||||
@override
|
||||
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(
|
||||
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),
|
||||
),
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: .center,
|
||||
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(
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
@@ -182,7 +156,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
||||
|
||||
void _search(String? query) {
|
||||
if (query?.isEmpty ?? true) return;
|
||||
// do something with query
|
||||
setState(() {
|
||||
findStationsByName(query!);
|
||||
});
|
||||
@@ -201,12 +174,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
||||
body: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
// ElevatedButton(
|
||||
// onPressed: () {
|
||||
// showResult(ApiHandler.findStations('S Biesdorf'));
|
||||
// },
|
||||
// child: Text('Search for \'S Biesdorf\''),
|
||||
// ),
|
||||
SearchAnchor(
|
||||
builder: (BuildContext context, SearchController controller) {
|
||||
return SearchBar(
|
||||
@@ -215,9 +182,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
||||
padding: const WidgetStatePropertyAll<EdgeInsets>(
|
||||
EdgeInsets.symmetric(horizontal: 16.0),
|
||||
),
|
||||
// onTap: () {
|
||||
// controller.openView();
|
||||
// },
|
||||
onChanged: _onSearchChanged,
|
||||
onSubmitted: _search,
|
||||
leading: const Icon(Icons.search),
|
||||
@@ -254,9 +218,6 @@ class _ChooseStationPageState extends State<ChooseStationPage> {
|
||||
}
|
||||
|
||||
void _handleStationTapped(Station station) {
|
||||
// setState(() {
|
||||
// _selectedStation = station;
|
||||
// });
|
||||
Navigator.push(
|
||||
context,
|
||||
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) {
|
||||
// setState(() {
|
||||
// _selectedDeparture = departure;
|
||||
// });
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
@@ -496,9 +446,6 @@ class _ChooseArrivalPageState extends State<ChooseArrivalPage> {
|
||||
}
|
||||
|
||||
void _handleArrivalTapped(Departure departure, Departure arrival) async {
|
||||
// setState(() {
|
||||
// _selectedDeparture = departure;
|
||||
// });
|
||||
departure.dbInsert;
|
||||
arrival.dbInsert;
|
||||
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