🐛 Fix web issue

This commit is contained in:
LittleSheep 2024-07-27 20:27:29 +08:00
parent 056b98db07
commit 7e98edfbc9
5 changed files with 26 additions and 15 deletions

View File

@ -2,6 +2,7 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_acrylic/flutter_acrylic.dart';
import 'package:get/get.dart';
import 'package:go_router/go_router.dart';
import 'package:media_kit/media_kit.dart';
import 'package:protocol_handler/protocol_handler.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
@ -21,6 +22,7 @@ import 'package:solian/router.dart';
import 'package:solian/shells/system_shell.dart';
import 'package:solian/theme.dart';
import 'package:solian/translations.dart';
import 'package:flutter_web_plugins/url_strategy.dart' show usePathUrlStrategy;
void main() async {
await SentryFlutter.init(
@ -39,6 +41,9 @@ void main() async {
_initializePlatformComponents(),
]);
GoRouter.optionURLReflectsImperativeAPIs = true;
usePathUrlStrategy();
runApp(const SolianApp());
},
);

View File

@ -326,6 +326,7 @@ class _AccountProfilePageState extends State<AccountProfilePage> {
borderRadius: radius,
child: AttachmentListEntry(
item: item,
isDense: true,
parentId: 'album',
showMature: _showMature,
onReveal: (value) {

View File

@ -214,6 +214,7 @@ class AttachmentListEntry extends StatelessWidget {
final bool showBorder;
final bool showBadge;
final bool showMature;
final bool isDense;
final Function(bool) onReveal;
const AttachmentListEntry({
@ -226,6 +227,7 @@ class AttachmentListEntry extends StatelessWidget {
this.showBorder = false,
this.showBadge = false,
this.showMature = false,
this.isDense = false,
});
@override
@ -295,7 +297,8 @@ class AttachmentListEntry extends StatelessWidget {
color: Colors.white,
size: 32,
),
const SizedBox(height: 8),
if (!isDense) const SizedBox(height: 8),
if (!isDense)
Text(
'matureContent'.tr,
style: const TextStyle(
@ -304,6 +307,7 @@ class AttachmentListEntry extends StatelessWidget {
fontSize: 16,
),
),
if (!isDense)
Text(
'matureContentCaption'.tr,
style: const TextStyle(color: Colors.white),

View File

@ -628,7 +628,7 @@ packages:
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"

View File

@ -10,7 +10,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_web_plugins:
sdk: flutter
cupertino_icons: ^1.0.6
go_router: ^14.1.1
get: ^4.6.6