claude refactorings, flutter best practices, platform dependent changes, general cleanup

This commit is contained in:
2026-05-06 11:58:50 +02:00
parent 4b1d4379a0
commit 4e1272aba9
281 changed files with 1948 additions and 1041 deletions
@@ -0,0 +1,16 @@
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();
}
}
@@ -0,0 +1,17 @@
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);
}
@@ -0,0 +1,21 @@
// 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,
};
@@ -0,0 +1,14 @@
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);
}
@@ -0,0 +1,15 @@
// 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};