remove unused dead code files
This commit is contained in:
@@ -1,14 +0,0 @@
|
|||||||
import '../../../../api_response.dart';
|
|
||||||
import '../../webdav_api.dart';
|
|
||||||
import 'download_file_params.dart';
|
|
||||||
|
|
||||||
class DownloadFile extends WebdavApi<DownloadFileParams> {
|
|
||||||
DownloadFileParams params;
|
|
||||||
|
|
||||||
DownloadFile(this.params) : super(params);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<ApiResponse> run() async {
|
|
||||||
throw UnimplementedError();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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<String, dynamic> json) =>
|
|
||||||
_$DownloadFileParamsFromJson(json);
|
|
||||||
Map<String, dynamic> toJson() => _$DownloadFileParamsToJson(this);
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'download_file_params.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
DownloadFileParams _$DownloadFileParamsFromJson(Map<String, dynamic> json) =>
|
|
||||||
DownloadFileParams(
|
|
||||||
json['webdavSourcePath'] as String,
|
|
||||||
json['localTargetPath'] as String,
|
|
||||||
json['filename'] as String,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$DownloadFileParamsToJson(DownloadFileParams instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'webdavSourcePath': instance.webdavSourcePath,
|
|
||||||
'localTargetPath': instance.localTargetPath,
|
|
||||||
'filename': instance.filename,
|
|
||||||
};
|
|
||||||
@@ -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<String, dynamic> json) =>
|
|
||||||
_$DownloadFileResponseFromJson(json);
|
|
||||||
Map<String, dynamic> toJson() => _$DownloadFileResponseToJson(this);
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'download_file_response.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
DownloadFileResponse _$DownloadFileResponseFromJson(
|
|
||||||
Map<String, dynamic> json,
|
|
||||||
) => DownloadFileResponse(json['path'] as String);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$DownloadFileResponseToJson(
|
|
||||||
DownloadFileResponse instance,
|
|
||||||
) => <String, dynamic>{'path': instance.path};
|
|
||||||
@@ -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<TickerSyncResponse> run() async {
|
|
||||||
try {
|
|
||||||
final response = await _dio.get<Map<String, dynamic>>(
|
|
||||||
MarianumConnectEndpoint.resolve('ticker/sync'),
|
|
||||||
);
|
|
||||||
return TickerSyncResponse.fromJson(response.data!);
|
|
||||||
} on DioException catch (e) {
|
|
||||||
throw mapMarianumConnectError(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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<String, dynamic> json) =>
|
|
||||||
_$TickerSyncResponseFromJson(json);
|
|
||||||
Map<String, dynamic> toJson() => _$TickerSyncResponseToJson(this);
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'get_ticker_sync_response.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
TickerSyncResponse _$TickerSyncResponseFromJson(Map<String, dynamic> json) =>
|
|
||||||
TickerSyncResponse(
|
|
||||||
tickerHash: json['tickerHash'] as String?,
|
|
||||||
navHash: json['navHash'] as String?,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$TickerSyncResponseToJson(TickerSyncResponse instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'tickerHash': instance.tickerHash,
|
|
||||||
'navHash': instance.navHash,
|
|
||||||
};
|
|
||||||
@@ -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);
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import 'package:dio/dio.dart';
|
|
||||||
|
|
||||||
import '../../infrastructure/data_loader/data_loader.dart';
|
|
||||||
|
|
||||||
abstract class MhslDataLoader<TResult> extends DataLoader<TResult> {
|
|
||||||
MhslDataLoader()
|
|
||||||
: super(
|
|
||||||
Dio(BaseOptions(baseUrl: 'https://mhsl.eu/marianum/marianummobile/')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -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'),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
extension StringExtensions on String {
|
|
||||||
String capitalize() =>
|
|
||||||
'${this[0].toUpperCase()}${substring(1).toLowerCase()}';
|
|
||||||
}
|
|
||||||
@@ -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')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user