Skip to content

Commit e6080dd

Browse files
authored
Merge pull request #374 from DanXi-Dev/fix-370
fix: #370
2 parents 06df37a + fa9e020 commit e6080dd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/main.dart

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import 'package:dan_xi/page/dashboard/dashboard_reorder.dart';
3232
import 'package:dan_xi/page/dashboard/empty_classroom_detail.dart';
3333
import 'package:dan_xi/page/dashboard/exam_detail.dart';
3434
import 'package:dan_xi/page/dashboard/gpa_table.dart';
35-
import 'package:dan_xi/page/home_page.dart';
3635
import 'package:dan_xi/page/forum/admin_operation.dart';
3736
import 'package:dan_xi/page/forum/hole_detail.dart';
3837
import 'package:dan_xi/page/forum/hole_editor.dart';
@@ -43,6 +42,7 @@ import 'package:dan_xi/page/forum/hole_search.dart';
4342
import 'package:dan_xi/page/forum/hole_tags.dart';
4443
import 'package:dan_xi/page/forum/image_viewer.dart';
4544
import 'package:dan_xi/page/forum/text_selector.dart';
45+
import 'package:dan_xi/page/home_page.dart';
4646
import 'package:dan_xi/page/settings/diagnostic_console.dart';
4747
import 'package:dan_xi/page/settings/hidden_tags_preference.dart';
4848
import 'package:dan_xi/page/settings/open_source_license.dart';
@@ -153,8 +153,11 @@ class DanxiApp extends StatelessWidget {
153153
/// Every route record is a function that returns a [Widget]. After registering
154154
// the route, you can call [smartNavigatorPush] to navigate to the page.
155155
static final Map<String, Function> routes = {
156-
'/placeholder': (context, {arguments}) =>
157-
ColoredBox(color: Theme.of(context).scaffoldBackgroundColor),
156+
// @w568w(2024-07-01): if the placeholder is a ColoredBox with color alpha 255,
157+
// the app will be half black screen and half white screen, displaying nothing on Linux.
158+
// Why?
159+
'/placeholder': (context, {arguments}) => ColoredBox(
160+
color: Theme.of(context).scaffoldBackgroundColor.withAlpha(254)),
158161
'/home': (context, {arguments}) => const HomePage(),
159162
'/diagnose': (context, {arguments}) =>
160163
DiagnosticConsole(arguments: arguments),

0 commit comments

Comments
 (0)