From 94794ff092b0e3d0d27931fb498db7abd1d4b38a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Sun, 12 Jul 2026 23:17:47 +0200 Subject: [PATCH] remove unused dead code files --- .../queries/download_file/download_file.dart | 14 ----------- .../download_file/download_file_params.dart | 22 ---------------- .../download_file/download_file_params.g.dart | 21 ---------------- .../download_file/download_file_response.dart | 14 ----------- .../download_file_response.g.dart | 15 ----------- .../get_ticker_sync/get_ticker_sync.dart | 25 ------------------- .../get_ticker_sync_response.dart | 18 ------------- .../get_ticker_sync_response.g.dart | 19 -------------- lib/extensions/time_of_day.dart | 10 -------- .../basis/dataloader/mhsl_data_loader.dart | 10 -------- lib/widget/about/about.dart | 15 ----------- lib/widget/string_extensions.dart | 4 --- lib/widget/unimplemented_dialog.dart | 11 -------- 13 files changed, 198 deletions(-) delete mode 100644 lib/api/marianumcloud/webdav/queries/download_file/download_file.dart delete mode 100644 lib/api/marianumcloud/webdav/queries/download_file/download_file_params.dart delete mode 100644 lib/api/marianumcloud/webdav/queries/download_file/download_file_params.g.dart delete mode 100644 lib/api/marianumcloud/webdav/queries/download_file/download_file_response.dart delete mode 100644 lib/api/marianumcloud/webdav/queries/download_file/download_file_response.g.dart delete mode 100644 lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync.dart delete mode 100644 lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync_response.dart delete mode 100644 lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync_response.g.dart delete mode 100644 lib/extensions/time_of_day.dart delete mode 100644 lib/state/app/basis/dataloader/mhsl_data_loader.dart delete mode 100644 lib/widget/about/about.dart delete mode 100644 lib/widget/string_extensions.dart delete mode 100644 lib/widget/unimplemented_dialog.dart diff --git a/lib/api/marianumcloud/webdav/queries/download_file/download_file.dart b/lib/api/marianumcloud/webdav/queries/download_file/download_file.dart deleted file mode 100644 index 160b4a1..0000000 --- a/lib/api/marianumcloud/webdav/queries/download_file/download_file.dart +++ /dev/null @@ -1,14 +0,0 @@ -import '../../../../api_response.dart'; -import '../../webdav_api.dart'; -import 'download_file_params.dart'; - -class DownloadFile extends WebdavApi { - DownloadFileParams params; - - DownloadFile(this.params) : super(params); - - @override - Future run() async { - throw UnimplementedError(); - } -} diff --git a/lib/api/marianumcloud/webdav/queries/download_file/download_file_params.dart b/lib/api/marianumcloud/webdav/queries/download_file/download_file_params.dart deleted file mode 100644 index d7763b5..0000000 --- a/lib/api/marianumcloud/webdav/queries/download_file/download_file_params.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -import '../../../../api_params.dart'; - -part 'download_file_params.g.dart'; - -@JsonSerializable() -class DownloadFileParams extends ApiParams { - String webdavSourcePath; - String localTargetPath; - String filename; - - DownloadFileParams( - this.webdavSourcePath, - this.localTargetPath, - this.filename, - ); - - factory DownloadFileParams.fromJson(Map json) => - _$DownloadFileParamsFromJson(json); - Map toJson() => _$DownloadFileParamsToJson(this); -} diff --git a/lib/api/marianumcloud/webdav/queries/download_file/download_file_params.g.dart b/lib/api/marianumcloud/webdav/queries/download_file/download_file_params.g.dart deleted file mode 100644 index aa72134..0000000 --- a/lib/api/marianumcloud/webdav/queries/download_file/download_file_params.g.dart +++ /dev/null @@ -1,21 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'download_file_params.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -DownloadFileParams _$DownloadFileParamsFromJson(Map json) => - DownloadFileParams( - json['webdavSourcePath'] as String, - json['localTargetPath'] as String, - json['filename'] as String, - ); - -Map _$DownloadFileParamsToJson(DownloadFileParams instance) => - { - 'webdavSourcePath': instance.webdavSourcePath, - 'localTargetPath': instance.localTargetPath, - 'filename': instance.filename, - }; diff --git a/lib/api/marianumcloud/webdav/queries/download_file/download_file_response.dart b/lib/api/marianumcloud/webdav/queries/download_file/download_file_response.dart deleted file mode 100644 index ca91def..0000000 --- a/lib/api/marianumcloud/webdav/queries/download_file/download_file_response.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'download_file_response.g.dart'; - -@JsonSerializable() -class DownloadFileResponse { - String path; - - DownloadFileResponse(this.path); - - factory DownloadFileResponse.fromJson(Map json) => - _$DownloadFileResponseFromJson(json); - Map toJson() => _$DownloadFileResponseToJson(this); -} diff --git a/lib/api/marianumcloud/webdav/queries/download_file/download_file_response.g.dart b/lib/api/marianumcloud/webdav/queries/download_file/download_file_response.g.dart deleted file mode 100644 index bab583f..0000000 --- a/lib/api/marianumcloud/webdav/queries/download_file/download_file_response.g.dart +++ /dev/null @@ -1,15 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'download_file_response.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -DownloadFileResponse _$DownloadFileResponseFromJson( - Map json, -) => DownloadFileResponse(json['path'] as String); - -Map _$DownloadFileResponseToJson( - DownloadFileResponse instance, -) => {'path': instance.path}; diff --git a/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync.dart b/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync.dart deleted file mode 100644 index 17906b5..0000000 --- a/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync.dart +++ /dev/null @@ -1,25 +0,0 @@ -import 'package:dio/dio.dart'; - -import '../../errors/marianumconnect_error.dart'; -import '../../marianumconnect_api.dart'; -import '../../marianumconnect_endpoint.dart'; -import 'get_ticker_sync_response.dart'; - -/// Fetches the ticker/nav change hashes from -/// `GET /api/mobile/v1/ticker/sync`. -class GetTickerSync { - final Dio _dio; - - GetTickerSync({Dio? dio}) : _dio = dio ?? MarianumConnectApi.dio(); - - Future run() async { - try { - final response = await _dio.get>( - MarianumConnectEndpoint.resolve('ticker/sync'), - ); - return TickerSyncResponse.fromJson(response.data!); - } on DioException catch (e) { - throw mapMarianumConnectError(e); - } - } -} diff --git a/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync_response.dart b/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync_response.dart deleted file mode 100644 index f85e99a..0000000 --- a/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync_response.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:json_annotation/json_annotation.dart'; - -part 'get_ticker_sync_response.g.dart'; - -/// Cheap change-detection poll from `GET /api/mobile/v1/ticker/sync`. Both -/// hashes let the app decide whether the ticker post and/or the page tree need -/// a full refetch without paying for the full payloads. -@JsonSerializable() -class TickerSyncResponse { - final String? tickerHash; - final String? navHash; - - TickerSyncResponse({this.tickerHash, this.navHash}); - - factory TickerSyncResponse.fromJson(Map json) => - _$TickerSyncResponseFromJson(json); - Map toJson() => _$TickerSyncResponseToJson(this); -} diff --git a/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync_response.g.dart b/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync_response.g.dart deleted file mode 100644 index 974eb53..0000000 --- a/lib/api/marianumconnect/queries/get_ticker_sync/get_ticker_sync_response.g.dart +++ /dev/null @@ -1,19 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_ticker_sync_response.dart'; - -// ************************************************************************** -// JsonSerializableGenerator -// ************************************************************************** - -TickerSyncResponse _$TickerSyncResponseFromJson(Map json) => - TickerSyncResponse( - tickerHash: json['tickerHash'] as String?, - navHash: json['navHash'] as String?, - ); - -Map _$TickerSyncResponseToJson(TickerSyncResponse instance) => - { - 'tickerHash': instance.tickerHash, - 'navHash': instance.navHash, - }; diff --git a/lib/extensions/time_of_day.dart b/lib/extensions/time_of_day.dart deleted file mode 100644 index b2c39e0..0000000 --- a/lib/extensions/time_of_day.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -extension TimeOfDayExt on TimeOfDay { - bool isBefore(TimeOfDay other) => hour < other.hour && minute < other.minute; - - bool isAfter(TimeOfDay other) => hour > other.hour && minute > other.minute; - - TimeOfDay add({int hours = 0, int minutes = 0}) => - replacing(hour: hour + hours, minute: minute + minutes); -} diff --git a/lib/state/app/basis/dataloader/mhsl_data_loader.dart b/lib/state/app/basis/dataloader/mhsl_data_loader.dart deleted file mode 100644 index 737dc7b..0000000 --- a/lib/state/app/basis/dataloader/mhsl_data_loader.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:dio/dio.dart'; - -import '../../infrastructure/data_loader/data_loader.dart'; - -abstract class MhslDataLoader extends DataLoader { - MhslDataLoader() - : super( - Dio(BaseOptions(baseUrl: 'https://mhsl.eu/marianum/marianummobile/')), - ); -} diff --git a/lib/widget/about/about.dart b/lib/widget/about/about.dart deleted file mode 100644 index 0d1d30e..0000000 --- a/lib/widget/about/about.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter/material.dart'; - -class About extends StatelessWidget { - const About({super.key}); - - @override - Widget build(BuildContext context) => Scaffold( - appBar: AppBar(title: const Text('Über diese App')), - body: const Card( - elevation: 1, - borderOnForeground: true, - child: Text('Marianum Fulda'), - ), - ); -} diff --git a/lib/widget/string_extensions.dart b/lib/widget/string_extensions.dart deleted file mode 100644 index d802e9a..0000000 --- a/lib/widget/string_extensions.dart +++ /dev/null @@ -1,4 +0,0 @@ -extension StringExtensions on String { - String capitalize() => - '${this[0].toUpperCase()}${substring(1).toLowerCase()}'; -} diff --git a/lib/widget/unimplemented_dialog.dart b/lib/widget/unimplemented_dialog.dart deleted file mode 100644 index dfae0eb..0000000 --- a/lib/widget/unimplemented_dialog.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/material.dart'; - -class UnimplementedDialog { - static void show(BuildContext context) { - showDialog( - context: context, - builder: (context) => - const AlertDialog(content: Text('Not implemented yet')), - ); - } -}