From d5870f9b59955b0a59ac6e1b0ead2d8fba328477 Mon Sep 17 00:00:00 2001 From: Paul Fauchon Date: Wed, 5 Apr 2023 18:39:02 +0800 Subject: [PATCH] fix IDE code warnings --- lib/controllers/playlistController.dart | 3 --- lib/main.dart | 3 +-- lib/views/components/videoAddToPlaylistButton.dart | 1 - lib/views/components/videoLikeButton.dart | 1 - lib/views/settings.dart | 1 - lib/views/settings/sponsorBlockSettings.dart | 1 - lib/views/video.dart | 1 - lib/views/videoPlayer/miniPlayerControls.dart | 1 - 8 files changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/controllers/playlistController.dart b/lib/controllers/playlistController.dart index 9263f943..60205594 100644 --- a/lib/controllers/playlistController.dart +++ b/lib/controllers/playlistController.dart @@ -1,14 +1,11 @@ -import 'package:better_player/better_player.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:invidious/controllers/miniPayerController.dart'; import 'package:invidious/controllers/playlistListController.dart'; -import 'package:invidious/views/miniPlayer.dart'; import 'package:logging/logging.dart'; import '../globals.dart'; import '../models/playlist.dart'; -import '../models/video.dart'; import '../models/videoInList.dart'; class PlaylistController extends GetxController { diff --git a/lib/main.dart b/lib/main.dart index 01093fb4..2e3ed749 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,7 +8,6 @@ import 'package:flutter/services.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:get/get.dart'; import 'package:invidious/controllers/homeController.dart'; -import 'package:invidious/controllers/miniPayerController.dart'; import 'package:invidious/globals.dart'; import 'package:invidious/views/components/miniPlayerAware.dart'; import 'package:invidious/views/miniPlayer.dart'; @@ -37,7 +36,7 @@ Future main() async { debugPrint('[${record.level.name}] [${record.loggerName}] ${record.message}'); }); - WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); + WidgetsFlutterBinding.ensureInitialized(); db = await DbClient.create(); runApp(const MyApp()); diff --git a/lib/views/components/videoAddToPlaylistButton.dart b/lib/views/components/videoAddToPlaylistButton.dart index a7c932c2..698981ab 100644 --- a/lib/views/components/videoAddToPlaylistButton.dart +++ b/lib/views/components/videoAddToPlaylistButton.dart @@ -11,7 +11,6 @@ class VideoAddToPlaylistButton extends StatelessWidget { @override Widget build(BuildContext context) { - ColorScheme colors = Theme.of(context).colorScheme; return GetBuilder( tag: AddToPlaylistButtonController.tags(videoId ?? ''), init: AddToPlaylistButtonController(videoId: videoId), diff --git a/lib/views/components/videoLikeButton.dart b/lib/views/components/videoLikeButton.dart index 209631c4..d9a56209 100644 --- a/lib/views/components/videoLikeButton.dart +++ b/lib/views/components/videoLikeButton.dart @@ -11,7 +11,6 @@ class VideoLikeButton extends StatelessWidget { @override Widget build(BuildContext context) { - ColorScheme colors = Theme.of(context).colorScheme; return GetBuilder( init: VideoLikeButtonController(videoId: videoId), tag: VideoLikeButtonController.tags(videoId ?? ''), diff --git a/lib/views/settings.dart b/lib/views/settings.dart index 3fe37a9d..c6f691d2 100644 --- a/lib/views/settings.dart +++ b/lib/views/settings.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:get/get.dart'; import 'package:invidious/myRouteObserver.dart'; -import 'package:invidious/views/components/miniPlayerAware.dart'; import 'package:invidious/views/settings/sponsorBlockSettings.dart'; import 'package:select_dialog/select_dialog.dart'; import 'package:settings_ui/settings_ui.dart'; diff --git a/lib/views/settings/sponsorBlockSettings.dart b/lib/views/settings/sponsorBlockSettings.dart index 18de35d0..37f93715 100644 --- a/lib/views/settings/sponsorBlockSettings.dart +++ b/lib/views/settings/sponsorBlockSettings.dart @@ -5,7 +5,6 @@ import 'package:invidious/controllers/sponsorBlockSettingsController.dart'; import 'package:invidious/models/sponsorSegmentTypes.dart'; import 'package:settings_ui/settings_ui.dart'; -import '../components/miniPlayerAware.dart'; import '../settings.dart'; class SponsorBlockSettings extends StatelessWidget { diff --git a/lib/views/video.dart b/lib/views/video.dart index 63883989..a303303b 100644 --- a/lib/views/video.dart +++ b/lib/views/video.dart @@ -4,7 +4,6 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:get/get.dart'; import 'package:invidious/controllers/videoController.dart'; import 'package:invidious/globals.dart'; -import 'package:invidious/views/components/miniPlayerAware.dart'; import 'package:invidious/views/components/videoAddToPlaylistButton.dart'; import 'package:invidious/views/components/videoLikeButton.dart'; import 'package:invidious/views/video/innverView.dart'; diff --git a/lib/views/videoPlayer/miniPlayerControls.dart b/lib/views/videoPlayer/miniPlayerControls.dart index 1c47636d..bc5d7f0e 100644 --- a/lib/views/videoPlayer/miniPlayerControls.dart +++ b/lib/views/videoPlayer/miniPlayerControls.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:get/get_state_manager/get_state_manager.dart'; import 'package:invidious/controllers/miniplayerControlsController.dart'; import 'package:invidious/utils.dart'; -import 'package:invidious/views/components/videoLikeButton.dart'; import '../../controllers/miniPayerController.dart';