From 9d5f0957f9e51a0bb0138141345c4d0651f777e1 Mon Sep 17 00:00:00 2001 From: fbachus Date: Sun, 9 Aug 2026 15:41:01 +0200 Subject: [PATCH] cleanup: remove unused code blocks that were already commented out --- lib/main.dart | 64 --------------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 97319fb..f4e4355 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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 { int _counter = 0; - //String API_KEY = ApiHandler.accessID; String API_KEY = "no telly"; - //Future> ?id; List stationList = []; String id = ''; @@ -78,37 +75,14 @@ class _MyHomePageState extends State { @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 { void _search(String? query) { if (query?.isEmpty ?? true) return; - // do something with query setState(() { findStationsByName(query!); }); @@ -201,12 +174,6 @@ class _ChooseStationPageState extends State { 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 { padding: const WidgetStatePropertyAll( 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 { } void _handleStationTapped(Station station) { - // setState(() { - // _selectedStation = station; - // }); Navigator.push( context, MaterialPageRoute( @@ -370,14 +331,6 @@ class _ChooseDeparturePageState extends State { ), ), ), - // ElevatedButton( - // onPressed: () { - // if (widget.journeyId != null) { - // loadJourney(widget.journeyId as int); - // } - // }, - // child: const Text('Finish Route'), - // ), ], ), ), @@ -396,9 +349,6 @@ class _ChooseDeparturePageState extends State { } void _handleDepartureTapped(Departure departure) { - // setState(() { - // _selectedDeparture = departure; - // }); Navigator.push( context, MaterialPageRoute( @@ -496,9 +446,6 @@ class _ChooseArrivalPageState extends State { } 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 { ); }, ), - // ElevatedButton( - // onPressed: () { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => ChooseStationPage(), - // ), - // ); - // }, - // child: const Text('Start a route'), - // ), ], ), ),