From e2db6e7bf49be9d85cbad370f69a894f2c6f7107 Mon Sep 17 00:00:00 2001 From: kidozh <11661760+kidozh@users.noreply.github.com> Date: Sun, 8 Dec 2024 16:56:32 +0000 Subject: [PATCH] remove unused code --- lib/JsonResult/BilibiliVideoResult.dart | 1 - lib/client/SteamApiClient.dart | 2 -- lib/page/PostThreadPage.dart | 1 - lib/page/SettingPage.dart | 2 -- lib/page/TestFlightBannerPage.dart | 1 - lib/screen/DashboardScreen.dart | 1 - lib/utility/NetworkUtils.dart | 2 -- lib/widget/BilibiliWidget.dart | 3 --- lib/widget/DiscuzHtmlWidget.dart | 1 + lib/widget/SteamGameWidget.dart | 5 ----- 10 files changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/JsonResult/BilibiliVideoResult.dart b/lib/JsonResult/BilibiliVideoResult.dart index eb3f6ef..dbafbfe 100644 --- a/lib/JsonResult/BilibiliVideoResult.dart +++ b/lib/JsonResult/BilibiliVideoResult.dart @@ -1,6 +1,5 @@ -import 'package:discuz_flutter/converter/SecondToDateTimeConverter.dart'; import 'package:json_annotation/json_annotation.dart'; part 'BilibiliVideoResult.g.dart'; diff --git a/lib/client/SteamApiClient.dart b/lib/client/SteamApiClient.dart index 8d2f713..040f3e3 100644 --- a/lib/client/SteamApiClient.dart +++ b/lib/client/SteamApiClient.dart @@ -1,8 +1,6 @@ import 'package:dio/dio.dart'; -import 'package:discuz_flutter/JsonResult/BilibiliVideoResult.dart'; -import 'package:discuz_flutter/JsonResult/SteamGameDataResult.dart'; import 'package:retrofit/error_logger.dart'; import 'package:retrofit/http.dart'; diff --git a/lib/page/PostThreadPage.dart b/lib/page/PostThreadPage.dart index 2624294..7f0bc8c 100644 --- a/lib/page/PostThreadPage.dart +++ b/lib/page/PostThreadPage.dart @@ -1,6 +1,5 @@ import 'package:dio/dio.dart'; import 'package:discuz_flutter/client/MobileApiClient.dart'; -import 'package:discuz_flutter/screen/LoadingScreen.dart'; import 'package:discuz_flutter/screen/SmileyListScreen.dart'; import 'package:discuz_flutter/utility/AppPlatformIcons.dart'; import 'package:discuz_flutter/utility/VibrationUtils.dart'; diff --git a/lib/page/SettingPage.dart b/lib/page/SettingPage.dart index 84abc3c..a90f3be 100644 --- a/lib/page/SettingPage.dart +++ b/lib/page/SettingPage.dart @@ -23,8 +23,6 @@ import 'package:url_launcher/url_launcher.dart'; import '../utility/AppPlatformIcons.dart'; import '../utility/PostTextFieldUtils.dart'; import 'ChooseThemeColorPage.dart'; -import 'ConfigurePictureBedPage.dart'; -import 'SetPushNotificationPage.dart'; class SettingPage extends StatefulWidget { @override diff --git a/lib/page/TestFlightBannerPage.dart b/lib/page/TestFlightBannerPage.dart index ef3c943..85e1b71 100644 --- a/lib/page/TestFlightBannerPage.dart +++ b/lib/page/TestFlightBannerPage.dart @@ -10,7 +10,6 @@ import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:provider/provider.dart'; -import '../provider/ThemeNotifierProvider.dart'; import '../provider/UserPreferenceNotifierProvider.dart'; import '../utility/PostTextFieldUtils.dart'; diff --git a/lib/screen/DashboardScreen.dart b/lib/screen/DashboardScreen.dart index 9844de9..e931381 100644 --- a/lib/screen/DashboardScreen.dart +++ b/lib/screen/DashboardScreen.dart @@ -1,6 +1,5 @@ -import 'dart:developer'; import 'package:discuz_flutter/provider/DiscuzAndUserNotifier.dart'; import 'package:discuz_flutter/screen/NewThreadScreen.dart'; diff --git a/lib/utility/NetworkUtils.dart b/lib/utility/NetworkUtils.dart index 97236f4..a368723 100644 --- a/lib/utility/NetworkUtils.dart +++ b/lib/utility/NetworkUtils.dart @@ -4,11 +4,9 @@ import 'dart:io'; import 'package:cookie_jar/cookie_jar.dart'; import 'package:dio/dio.dart'; import 'package:discuz_flutter/entity/User.dart'; -import 'package:language_code/language_code.dart'; import 'package:path_provider/path_provider.dart'; import 'package:dio_cookie_manager/dio_cookie_manager.dart'; import 'package:random_user_agents/random_user_agents.dart'; -import 'package:ua_client_hints/ua_client_hints.dart'; class NetworkUtils{ diff --git a/lib/widget/BilibiliWidget.dart b/lib/widget/BilibiliWidget.dart index 44fecb7..7010537 100644 --- a/lib/widget/BilibiliWidget.dart +++ b/lib/widget/BilibiliWidget.dart @@ -1,14 +1,11 @@ import 'dart:developer'; import 'package:cached_network_image/cached_network_image.dart'; -import 'package:dio/dio.dart'; import 'package:discuz_flutter/JsonResult/BilibiliVideoResult.dart'; import 'package:discuz_flutter/client/BilibiliApiClient.dart'; import 'package:discuz_flutter/utility/NetworkUtils.dart'; import 'package:discuz_flutter/utility/URLUtils.dart'; import 'package:discuz_flutter/utility/VibrationUtils.dart'; -import 'package:discuz_flutter/widget/UserAvatar.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; diff --git a/lib/widget/DiscuzHtmlWidget.dart b/lib/widget/DiscuzHtmlWidget.dart index dfee627..b4416a1 100644 --- a/lib/widget/DiscuzHtmlWidget.dart +++ b/lib/widget/DiscuzHtmlWidget.dart @@ -148,6 +148,7 @@ class DiscuzHtmlWidget extends StatelessWidget { "margin-bottom": "0.1em" }; } + return null; }, customWidgetBuilder: (element) { // "collapse", "spoil" diff --git a/lib/widget/SteamGameWidget.dart b/lib/widget/SteamGameWidget.dart index 619ddb9..2d6a2d2 100644 --- a/lib/widget/SteamGameWidget.dart +++ b/lib/widget/SteamGameWidget.dart @@ -5,18 +5,13 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:carousel_slider/carousel_slider.dart'; import 'package:discuz_flutter/JsonResult/SteamGameDataResult.dart'; import 'package:discuz_flutter/client/SteamApiClient.dart'; -import 'package:discuz_flutter/entity/Discuz.dart'; -import 'package:discuz_flutter/provider/DiscuzAndUserNotifier.dart'; import 'package:discuz_flutter/utility/TwoPaneUtils.dart'; -import 'package:discuz_flutter/widget/DiscuzHtmlWidget.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:html_unescape/html_unescape.dart'; import 'package:language_code/language_code.dart'; -import 'package:provider/provider.dart'; import '../generated/l10n.dart'; import '../utility/AppPlatformIcons.dart';