🐛 Fix web issue
This commit is contained in:
parent
056b98db07
commit
7e98edfbc9
@ -2,6 +2,7 @@ import 'package:firebase_core/firebase_core.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_acrylic/flutter_acrylic.dart';
|
import 'package:flutter_acrylic/flutter_acrylic.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:media_kit/media_kit.dart';
|
import 'package:media_kit/media_kit.dart';
|
||||||
import 'package:protocol_handler/protocol_handler.dart';
|
import 'package:protocol_handler/protocol_handler.dart';
|
||||||
import 'package:sentry_flutter/sentry_flutter.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/shells/system_shell.dart';
|
||||||
import 'package:solian/theme.dart';
|
import 'package:solian/theme.dart';
|
||||||
import 'package:solian/translations.dart';
|
import 'package:solian/translations.dart';
|
||||||
|
import 'package:flutter_web_plugins/url_strategy.dart' show usePathUrlStrategy;
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
await SentryFlutter.init(
|
await SentryFlutter.init(
|
||||||
@ -39,6 +41,9 @@ void main() async {
|
|||||||
_initializePlatformComponents(),
|
_initializePlatformComponents(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
GoRouter.optionURLReflectsImperativeAPIs = true;
|
||||||
|
|
||||||
|
usePathUrlStrategy();
|
||||||
runApp(const SolianApp());
|
runApp(const SolianApp());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -326,6 +326,7 @@ class _AccountProfilePageState extends State<AccountProfilePage> {
|
|||||||
borderRadius: radius,
|
borderRadius: radius,
|
||||||
child: AttachmentListEntry(
|
child: AttachmentListEntry(
|
||||||
item: item,
|
item: item,
|
||||||
|
isDense: true,
|
||||||
parentId: 'album',
|
parentId: 'album',
|
||||||
showMature: _showMature,
|
showMature: _showMature,
|
||||||
onReveal: (value) {
|
onReveal: (value) {
|
||||||
|
@ -214,6 +214,7 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
final bool showBorder;
|
final bool showBorder;
|
||||||
final bool showBadge;
|
final bool showBadge;
|
||||||
final bool showMature;
|
final bool showMature;
|
||||||
|
final bool isDense;
|
||||||
final Function(bool) onReveal;
|
final Function(bool) onReveal;
|
||||||
|
|
||||||
const AttachmentListEntry({
|
const AttachmentListEntry({
|
||||||
@ -226,6 +227,7 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
this.showBorder = false,
|
this.showBorder = false,
|
||||||
this.showBadge = false,
|
this.showBadge = false,
|
||||||
this.showMature = false,
|
this.showMature = false,
|
||||||
|
this.isDense = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -295,7 +297,8 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
size: 32,
|
size: 32,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
if (!isDense) const SizedBox(height: 8),
|
||||||
|
if (!isDense)
|
||||||
Text(
|
Text(
|
||||||
'matureContent'.tr,
|
'matureContent'.tr,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
@ -304,6 +307,7 @@ class AttachmentListEntry extends StatelessWidget {
|
|||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (!isDense)
|
||||||
Text(
|
Text(
|
||||||
'matureContentCaption'.tr,
|
'matureContentCaption'.tr,
|
||||||
style: const TextStyle(color: Colors.white),
|
style: const TextStyle(color: Colors.white),
|
||||||
|
@ -628,7 +628,7 @@ packages:
|
|||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
flutter_web_plugins:
|
flutter_web_plugins:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
@ -10,7 +10,8 @@ environment:
|
|||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
flutter_web_plugins:
|
||||||
|
sdk: flutter
|
||||||
cupertino_icons: ^1.0.6
|
cupertino_icons: ^1.0.6
|
||||||
go_router: ^14.1.1
|
go_router: ^14.1.1
|
||||||
get: ^4.6.6
|
get: ^4.6.6
|
||||||
|
Loading…
Reference in New Issue
Block a user