From a3321d54ddef3bbc379a67a991e1b27eac2cb86b Mon Sep 17 00:00:00 2001 From: Codel1417 Date: Sun, 9 Jun 2024 22:24:16 -0400 Subject: [PATCH] Clean up remaining file use --- lib/Frontend/pages/more.dart | 11 ----------- lib/Frontend/utils.dart | 4 ++-- pubspec.lock | 36 ++---------------------------------- 3 files changed, 4 insertions(+), 47 deletions(-) diff --git a/lib/Frontend/pages/more.dart b/lib/Frontend/pages/more.dart index 98b5dd8a..d659a867 100644 --- a/lib/Frontend/pages/more.dart +++ b/lib/Frontend/pages/more.dart @@ -1,5 +1,3 @@ -import 'dart:io'; - import 'package:dio/dio.dart'; import 'package:feedback_sentry/feedback_sentry.dart'; import 'package:flutter/material.dart'; @@ -7,7 +5,6 @@ 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'; @@ -212,14 +209,6 @@ class _PdfWidgetState extends State { 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(() { diff --git a/lib/Frontend/utils.dart b/lib/Frontend/utils.dart index 8d420205..89d3075d 100644 --- a/lib/Frontend/utils.dart +++ b/lib/Frontend/utils.dart @@ -47,8 +47,6 @@ final dioLogger = Logger('Dio'); Future 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( @@ -83,6 +81,8 @@ Future 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; diff --git a/pubspec.lock b/pubspec.lock index 6a4d9d3b..b0146da8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: