Skip to content

Commit

Permalink
dart fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaoMint committed Dec 11, 2023
1 parent 34d9792 commit 5c4b8fe
Show file tree
Hide file tree
Showing 62 changed files with 127 additions and 133 deletions.
2 changes: 1 addition & 1 deletion lib/utils/application.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class ApplicationUtils {
return true;
}
File(targetPath).writeAsBytesSync(output);
debugPrint("$targetPath");
debugPrint(targetPath);
//
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/views/dialogs/bt_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:miru_app/views/widgets/platform_widget.dart';
import 'package:miru_app/views/widgets/progress.dart';

class BTDialog extends StatefulWidget {
const BTDialog({Key? key}) : super(key: key);
const BTDialog({super.key});

@override
State<BTDialog> createState() => _BTDialogState();
Expand Down
4 changes: 2 additions & 2 deletions lib/views/dialogs/tmdb_binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import 'package:tmdb_api/tmdb_api.dart';

class TMDBBinding extends StatefulWidget {
const TMDBBinding({
Key? key,
super.key,
required this.title,
}) : super(key: key);
});
final String title;

@override
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/code_edit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import 'package:flutter_highlight/themes/monokai-sublime.dart';
class CodeEditPage extends StatefulWidget {
const CodeEditPage({
required this.extension,
Key? key,
}) : super(key: key);
super.key,
});
final Extension extension;
@override
State<CodeEditPage> createState() => _CodeEditPageState();
Expand Down
6 changes: 3 additions & 3 deletions lib/views/pages/detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import 'package:url_launcher/url_launcher.dart';

class DetailPage extends StatefulWidget {
const DetailPage({
Key? key,
super.key,
required this.url,
required this.package,
this.tag,
}) : super(key: key);
});
final String url;
final String package;
final String? tag;
Expand Down Expand Up @@ -528,7 +528,7 @@ class _DetailPageState extends State<DetailPage> {
width: 200,
child: e,
))
.toList(),
,
]),
);
},
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/extension/extension_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'package:miru_app/views/widgets/platform_widget.dart';
import 'package:url_launcher/url_launcher.dart';

class ExtensionPage extends StatefulWidget {
const ExtensionPage({Key? key}) : super(key: key);
const ExtensionPage({super.key});

@override
State<ExtensionPage> createState() => _ExtensionPageState();
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/extension/extension_repo_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:miru_app/views/widgets/platform_widget.dart';
import 'package:miru_app/views/widgets/progress.dart';

class ExtensionRepoPage extends StatefulWidget {
const ExtensionRepoPage({Key? key}) : super(key: key);
const ExtensionRepoPage({super.key});

@override
State<ExtensionRepoPage> createState() => _ExtensionRepoPageState();
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/extension/extension_settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import 'package:miru_app/views/widgets/settings_tile.dart';

class ExtensionSettingsPage extends StatefulWidget {
const ExtensionSettingsPage({
Key? key,
super.key,
required this.package,
}) : super(key: key);
});
final String package;

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/favorites_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:miru_app/views/widgets/platform_widget.dart';
import 'package:miru_app/views/widgets/progress.dart';

class FavoritesPage extends fluent.StatefulWidget {
const FavoritesPage({Key? key, required this.type}) : super(key: key);
const FavoritesPage({super.key, required this.type});
final ExtensionType type;

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:miru_app/utils/i18n.dart';
import 'package:miru_app/views/widgets/platform_widget.dart';

class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);
const HomePage({super.key});

@override
State<HomePage> createState() => _HomePageState();
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/log_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import 'package:miru_app/views/widgets/log/extension_log_tile.dart';

class ExtensionLogWindow extends StatefulWidget {
const ExtensionLogWindow({
Key? key,
super.key,
required this.windowController,
}) : super(key: key);
});
final WindowController windowController;

@override
Expand Down
6 changes: 3 additions & 3 deletions lib/views/pages/main_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import 'package:window_manager/window_manager.dart';

class DesktopMainPage extends StatefulWidget {
const DesktopMainPage({
Key? key,
super.key,
required this.child,
required this.shellContext,
required this.state,
}) : super(key: key);
});

final Widget child;
final BuildContext? shellContext;
Expand Down Expand Up @@ -150,7 +150,7 @@ class _DesktopMainPageState extends State<DesktopMainPage> {
}

class AndroidMainPage extends fluent.StatefulWidget {
const AndroidMainPage({Key? key}) : super(key: key);
const AndroidMainPage({super.key});

@override
fluent.State<AndroidMainPage> createState() => _AndroidMainPageState();
Expand Down
7 changes: 3 additions & 4 deletions lib/views/pages/search/extension_searcher_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import 'package:miru_app/views/widgets/search_appbar.dart';

class ExtensionSearcherPage extends fluent.StatefulWidget {
const ExtensionSearcherPage({
Key? key,
super.key,
required this.package,
this.keyWord,
}) : super(key: key);
});
final String package;
final String? keyWord;

Expand Down Expand Up @@ -356,12 +356,11 @@ class _ExtensionSearcherPageState extends fluent.State<ExtensionSearcherPage> {

class _ExtensionFilterWidget extends StatefulWidget {
const _ExtensionFilterWidget({
Key? key,
required this.runtime,
required this.selectedFilters,
required this.onSelectFilter,
required this.filters,
}) : super(key: key);
});
final ExtensionService runtime;
final Map<String, ExtensionFilter> filters;
final Map<String, List<String>> selectedFilters;
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/search/search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:miru_app/views/widgets/platform_widget.dart';
import 'package:miru_app/views/widgets/search_appbar.dart';

class SearchPage extends StatefulWidget {
const SearchPage({Key? key}) : super(key: key);
const SearchPage({super.key});

@override
State<SearchPage> createState() => _SearchPageState();
Expand Down
2 changes: 1 addition & 1 deletion lib/views/pages/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import 'package:tmdb_api/tmdb_api.dart';
import 'package:url_launcher/url_launcher.dart';

class SettingsPage extends StatefulWidget {
const SettingsPage({Key? key}) : super(key: key);
const SettingsPage({super.key});

@override
State<SettingsPage> createState() => _SettingsPageState();
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/watch/reader/comic/comic_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import 'package:window_manager/window_manager.dart';

class ComicReader extends StatefulWidget {
const ComicReader({
Key? key,
super.key,
required this.title,
required this.playList,
required this.detailUrl,
required this.playerIndex,
required this.episodeGroupId,
required this.runtime,
this.cover,
}) : super(key: key);
});

final String title;
final List<ExtensionEpisode> playList;
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/watch/reader/comic/comic_reader_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
import 'package:extended_image/extended_image.dart';

class ComicReaderContent extends StatefulWidget {
const ComicReaderContent(this.tag, {Key? key}) : super(key: key);
const ComicReaderContent(this.tag, {super.key});
final String tag;

@override
Expand Down Expand Up @@ -112,7 +112,7 @@ class _ComicReaderContentState extends State<ComicReaderContent> {
onInteractionUpdate: (x) {
double correctScaleValue =
transformationController.value.getMaxScaleOnAxis();
if (correctScaleValue > minScaleValue) ;
if (correctScaleValue > minScaleValue) {}
if (x.scale == correctScaleValue) {
setState(() {
isZoomed = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:miru_app/utils/i18n.dart';
import 'package:miru_app/views/widgets/platform_widget.dart';

class ComicReaderSettings extends StatefulWidget {
const ComicReaderSettings(this.tag, {Key? key}) : super(key: key);
const ComicReaderSettings(this.tag, {super.key});
final String tag;

@override
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/watch/reader/novel/novel_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import 'package:miru_app/data/services/extension_service.dart';

class NovelReader extends StatefulWidget {
const NovelReader({
Key? key,
super.key,
required this.playList,
required this.runtime,
required this.episodeGroupId,
required this.playerIndex,
required this.title,
required this.detailUrl,
this.cover,
}) : super(key: key);
});

final String title;
final List<ExtensionEpisode> playList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:fluent_ui/fluent_ui.dart' as fluent;
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';

class NovelReaderContent extends StatefulWidget {
const NovelReaderContent(this.tag, {Key? key}) : super(key: key);
const NovelReaderContent(this.tag, {super.key});
final String tag;

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:miru_app/utils/i18n.dart';
import 'package:miru_app/views/widgets/platform_widget.dart';

class NovelReaderSettings extends StatefulWidget {
const NovelReaderSettings(this.tag, {Key? key}) : super(key: key);
const NovelReaderSettings(this.tag, {super.key});
final String tag;

@override
Expand Down
9 changes: 4 additions & 5 deletions lib/views/pages/watch/video/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import 'package:miru_app/views/widgets/platform_widget.dart';

class VideoPlayer extends StatefulWidget {
const VideoPlayer({
Key? key,
super.key,
required this.playList,
required this.runtime,
required this.episodeGroupId,
required this.playerIndex,
required this.title,
required this.detailUrl,
}) : super(key: key);
});

final String title;
final List<ExtensionEpisode> playList;
Expand Down Expand Up @@ -58,10 +58,9 @@ class _VideoPlayerState extends State<VideoPlayer> {
_buildContent() {
return Obx(() {
final maxWidth = MediaQuery.of(context).size.width;
return WillPopScope(
onWillPop: () async {
return PopScope(
onPopInvoked: (_) async {
await _c.onExit();
return true;
},
child: Row(
children: [
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/watch/video/video_player_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import 'package:window_manager/window_manager.dart';

class VideoPlayerConten extends StatefulWidget {
const VideoPlayerConten({
Key? key,
super.key,
required this.tag,
}) : super(key: key);
});
final String tag;

@override
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/watch/watch_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import 'package:miru_app/utils/extension.dart';

class WatchPage extends StatelessWidget {
const WatchPage({
Key? key,
super.key,
required this.playList,
required this.package,
required this.title,
required this.playerIndex,
required this.episodeGroupId,
required this.detailUrl,
this.cover,
}) : super(key: key);
});
final List<ExtensionEpisode> playList;
final int playerIndex;
final String title;
Expand Down
4 changes: 2 additions & 2 deletions lib/views/pages/webview_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import 'package:miru_app/data/services/extension_service.dart';

class WebViewPage extends StatefulWidget {
const WebViewPage({
Key? key,
super.key,
required this.extensionRuntime,
required this.url,
}) : super(key: key);
});
final ExtensionService extensionRuntime;
final String url;

Expand Down
Loading

0 comments on commit 5c4b8fe

Please sign in to comment.