Skip to content

Commit

Permalink
style: apply dart fix
Browse files Browse the repository at this point in the history
  • Loading branch information
w568w committed Feb 26, 2025
1 parent cacb479 commit 15813f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
3 changes: 1 addition & 2 deletions lib/common/constant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,7 @@ class Constant {
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(foregroundColor: const Color(0xFF007AFF)),
),
dialogBackgroundColor: const Color.fromRGBO(28, 28, 30, 1.0),
textTheme: Typography.whiteCupertino,
textTheme: Typography.whiteCupertino, dialogTheme: DialogThemeData(backgroundColor: const Color.fromRGBO(28, 28, 30, 1.0)),
);
}
return ThemeData(
Expand Down
5 changes: 2 additions & 3 deletions lib/page/subpage_timetable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import 'package:dan_xi/util/public_extension_methods.dart';
import 'package:dan_xi/util/retrier.dart';
import 'package:dan_xi/util/stream_listener.dart';
import 'package:dan_xi/util/timetable_converter_impl.dart';
import 'package:dan_xi/widget/dialogs/manually_add_course_dialog.dart';
import 'package:dan_xi/widget/libraries/error_page_widget.dart';
import 'package:dan_xi/widget/libraries/future_widget.dart';
import 'package:dan_xi/widget/libraries/platform_context_menu.dart';
Expand All @@ -55,8 +56,6 @@ import 'package:provider/provider.dart';
import 'package:share_plus/share_plus.dart';
import 'package:tutorial_coach_mark/tutorial_coach_mark.dart';

import '../widget/dialogs/manually_add_course_dialog.dart';

/// Keys to locate buttons in the interactive tutorial.
GlobalKey keyButton = GlobalKey();
GlobalKey keyButton1 = GlobalKey();
Expand Down Expand Up @@ -524,7 +523,7 @@ class TimetableSubPageState extends PlatformSubpageState<TimetableSubPage> {
key: indicatorKey,
edgeOffset: MediaQuery.of(context).padding.top,
color: Theme.of(context).colorScheme.secondary,
backgroundColor: Theme.of(context).dialogBackgroundColor,
backgroundColor: Theme.of(context).dialogTheme.backgroundColor,
onRefresh: () async {
forceLoadFromRemote = true;
HapticFeedback.mediumImpact();
Expand Down
2 changes: 1 addition & 1 deletion lib/util/webvpn_proxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class WebvpnProxy {
} finally {
loginSession = null;
}
// Any exception thrown won't be catched and will be propagated to widgets
// Any exception thrown won't be caught and will be propagated to widgets
}
}

Expand Down
6 changes: 1 addition & 5 deletions lib/widget/forum/auto_bbs_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

import 'package:cached_network_image/cached_network_image.dart';
import 'package:dan_xi/util/io/cache_manager_with_webvpn.dart';
import 'package:dan_xi/util/io/dio_utils.dart';
import 'package:dan_xi/widget/forum/render/base_render.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:nil/nil.dart';
Expand Down Expand Up @@ -49,13 +47,11 @@ class BBSImagePlaceholder extends StatelessWidget {
/// A network image loader that will show the image from network, and
/// fit the image's size to at most [maxWidth].
class AutoBBSImage extends StatelessWidget {
final Dio dio =
DioUtils.newDioWithProxy(BaseOptions(responseType: ResponseType.bytes));
final String src;
final double? maxWidth;
final ImageTapCallback? onTapImage;

AutoBBSImage({super.key, required this.src, this.maxWidth, this.onTapImage});
const AutoBBSImage({super.key, required this.src, this.maxWidth, this.onTapImage});

@override
Widget build(BuildContext context) {
Expand Down

0 comments on commit 15813f0

Please sign in to comment.