Skip to content

Commit

Permalink
Clean up remaining file use
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Jun 10, 2024
1 parent 8ca2739 commit a3321d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 47 deletions.
11 changes: 0 additions & 11 deletions lib/Frontend/pages/more.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import 'dart:io';

import 'package:dio/dio.dart';
import 'package:feedback_sentry/feedback_sentry.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:path_provider/path_provider.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:tail_app/Frontend/pages/markdown_viewer.dart';
import 'package:tail_app/Frontend/translation_string_definitions.dart';
Expand Down Expand Up @@ -212,14 +209,6 @@ class _PdfWidgetState extends State<PdfWidget> {
duration: animationTransitionDuration,
),
onTap: () async {
filePath = '${(await getTemporaryDirectory()).path}${widget.name}.pdf';
if (await File(filePath).exists()) {
if (context.mounted) {
progress = 0;
context.push('/more/viewPDF', extra: filePath);
}
return;
}
final transaction = Sentry.startTransaction('GET PDF', 'http', description: widget.url);
try {
setState(() {
Expand Down
4 changes: 2 additions & 2 deletions lib/Frontend/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ final dioLogger = Logger('Dio');
Future<Dio> initDio({skipSentry = false}) async {
final Dio dio = Dio();

/// This *must* be the last initialization step of the Dio setup, otherwise
/// your configuration of Dio might overwrite the Sentry configuration.
dio.httpClientAdapter = NativeAdapter();
/*dio.interceptors.add(
LogInterceptor(
Expand Down Expand Up @@ -83,6 +81,8 @@ Future<Dio> initDio({skipSentry = false}) async {
);
dio.interceptors.add(DioCacheInterceptor(options: options));
if (!skipSentry) {
/// This *must* be the last initialization step of the Dio setup, otherwise
/// your configuration of Dio might overwrite the Sentry configuration.
dio.addSentry(failedRequestStatusCodes: []);
}
return dio;
Expand Down
36 changes: 2 additions & 34 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -439,14 +439,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.5"
extension:
dependency: transitive
description:
name: extension
sha256: be3a6b7f8adad2f6e2e8c63c895d19811fcf203e23466c6296267941d0ff4f24
url: "https://pub.dev"
source: hosted
version: "0.6.0"
fading_edge_scrollview:
dependency: "direct main"
description:
Expand Down Expand Up @@ -938,10 +930,10 @@ packages:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.6.7"
version: "0.7.1"
json_annotation:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1231,14 +1223,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.67"
pdfx:
dependency: "direct main"
description:
name: pdfx
sha256: c0f70ab6691b7cde02c0c204763a1edb2689ce245ac34eb629c66273a6aa1caf
url: "https://pub.dev"
source: hosted
version: "2.6.0"
pedometer:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1304,14 +1288,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.0.2"
photo_view:
dependency: transitive
description:
name: photo_view
sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb"
url: "https://pub.dev"
source: hosted
version: "0.14.0"
platform:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1783,14 +1759,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.2"
universal_platform:
dependency: transitive
description:
name: universal_platform
sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
upgrader:
dependency: "direct main"
description:
Expand Down

0 comments on commit a3321d5

Please sign in to comment.