mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
fix: Small bugfixes (#303)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
d96cafecff
commit
5bf4579a49
8 changed files with 48 additions and 51 deletions
|
|
@ -94,6 +94,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
|||
controller: AdaptiveLayout.scrollOf(context),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
const DefaultSliverTopBadding(),
|
||||
if (AdaptiveLayout.viewSizeOf(context) == ViewSize.phone)
|
||||
NestedSliverAppBar(
|
||||
route: LibrarySearchRoute(),
|
||||
|
|
@ -107,7 +108,6 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
|
|||
),
|
||||
),
|
||||
},
|
||||
const DefaultSliverTopBadding(),
|
||||
if (AdaptiveLayout.of(context).isDesktop)
|
||||
const SliverToBoxAdapter(
|
||||
child: Row(
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:iconsax_plus/iconsax_plus.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:iconsax_plus/iconsax_plus.dart';
|
||||
|
||||
import 'package:fladder/models/boxset_model.dart';
|
||||
import 'package:fladder/models/item_base_model.dart';
|
||||
|
|
@ -685,10 +685,11 @@ class _LibrarySearchBottomBar extends ConsumerWidget {
|
|||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
padding: const EdgeInsets.all(6),
|
||||
child: Icon(
|
||||
IconsaxPlusLinear.arrow_up_3,
|
||||
IconsaxPlusLinear.arrow_up,
|
||||
color: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -28,9 +28,7 @@ List<Widget> buildClientSettingsVisual(
|
|||
label: Text(context.localized.displayLanguage),
|
||||
trailing: Localizations.override(
|
||||
context: context,
|
||||
locale: ref.watch(
|
||||
clientSettingsProvider.select((value) => (value.selectedLocale ?? currentLocale)),
|
||||
),
|
||||
locale: ref.watch(clientSettingsProvider.select((value) => (value.selectedLocale ?? currentLocale))),
|
||||
child: Builder(builder: (context) {
|
||||
String language = "Unknown";
|
||||
try {
|
||||
|
|
@ -49,9 +47,7 @@ List<Widget> buildClientSettingsVisual(
|
|||
context: context,
|
||||
locale: entry,
|
||||
child: Builder(builder: (context) {
|
||||
return Text(
|
||||
context.localized.nativeName,
|
||||
);
|
||||
return Text("${context.localized.nativeName} (${entry.languageCode.toUpperCase()})");
|
||||
}),
|
||||
),
|
||||
onTap: () => ref
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ class _ClientSettingsPageState extends ConsumerState<ClientSettingsPage> {
|
|||
.update((current) => current.copyWith(mouseDragSupport: !clientSettings.mouseDragSupport)),
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
],
|
||||
const Divider(),
|
||||
...buildClientSettingsAdvanced(context, ref),
|
||||
if (kDebugMode) ...[
|
||||
const SizedBox(height: 64),
|
||||
|
|
|
|||
|
|
@ -31,44 +31,41 @@ class SettingsListTile extends StatelessWidget {
|
|||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(8), bottomLeft: Radius.circular(8))),
|
||||
margin: EdgeInsets.zero,
|
||||
child: MediaQuery(
|
||||
data: const MediaQueryData(padding: EdgeInsets.zero),
|
||||
child: ListTile(
|
||||
minVerticalPadding: 12,
|
||||
minLeadingWidth: 16,
|
||||
minTileHeight: 75,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
horizontalTitleGap: 0,
|
||||
titleAlignment: ListTileTitleAlignment.center,
|
||||
contentPadding: const EdgeInsets.only(right: 12, left: 2),
|
||||
leading: (suffix ?? iconWidget) != null
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 16.0),
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 125),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primaryContainer.withValues(alpha: selected ? 1 : 0),
|
||||
borderRadius: BorderRadius.circular(selected ? 5 : 20),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 12),
|
||||
child: (suffix ?? iconWidget),
|
||||
),
|
||||
child: ListTile(
|
||||
minVerticalPadding: 12,
|
||||
minLeadingWidth: 16,
|
||||
minTileHeight: 75,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
horizontalTitleGap: 0,
|
||||
titleAlignment: ListTileTitleAlignment.center,
|
||||
contentPadding: const EdgeInsets.only(right: 12, left: 2),
|
||||
leading: (suffix ?? iconWidget) != null
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 16.0),
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 125),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primaryContainer.withValues(alpha: selected ? 1 : 0),
|
||||
borderRadius: BorderRadius.circular(selected ? 5 : 20),
|
||||
),
|
||||
)
|
||||
: suffix ?? const SizedBox(),
|
||||
title: label,
|
||||
titleTextStyle: Theme.of(context).textTheme.titleLarge,
|
||||
trailing: Padding(
|
||||
padding: const EdgeInsets.only(left: 16),
|
||||
child: trailing,
|
||||
),
|
||||
selected: selected,
|
||||
textColor: contentColor,
|
||||
iconColor: contentColor,
|
||||
subtitle: subLabel,
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 12),
|
||||
child: (suffix ?? iconWidget),
|
||||
),
|
||||
),
|
||||
)
|
||||
: suffix ?? const SizedBox(),
|
||||
title: label,
|
||||
titleTextStyle: Theme.of(context).textTheme.titleLarge,
|
||||
trailing: Padding(
|
||||
padding: const EdgeInsets.only(left: 16),
|
||||
child: trailing,
|
||||
),
|
||||
selected: selected,
|
||||
textColor: contentColor,
|
||||
iconColor: contentColor,
|
||||
subtitle: subLabel,
|
||||
onTap: onTap,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ class _NavigationScaffoldState extends ConsumerState<NavigationScaffold> {
|
|||
key: _key,
|
||||
appBar: const FladderAppBar(),
|
||||
extendBodyBehindAppBar: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
extendBody: true,
|
||||
floatingActionButtonAnimator:
|
||||
playerState == VideoPlayerState.minimized ? FloatingActionButtonAnimator.noAnimation : null,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:fladder/models/settings/home_settings_model.dart';
|
||||
import 'package:fladder/screens/shared/flat_button.dart';
|
||||
import 'package:fladder/util/adaptive_layout.dart';
|
||||
import 'package:fladder/widgets/shared/modal_bottom_sheet.dart';
|
||||
|
||||
class EnumBox<T> extends StatelessWidget {
|
||||
final String current;
|
||||
|
|
@ -52,10 +53,11 @@ class EnumBox<T> extends StatelessWidget {
|
|||
child: useBottomSheet
|
||||
? FlatButton(
|
||||
child: labelWidget,
|
||||
onTap: () => showModalBottomSheet(
|
||||
onTap: () => showBottomSheetPill(
|
||||
context: context,
|
||||
builder: (context) => ListView(
|
||||
content: (context, scrollController) => ListView(
|
||||
shrinkWrap: true,
|
||||
controller: scrollController,
|
||||
children: [
|
||||
const SizedBox(height: 6),
|
||||
...itemBuilder(context),
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ Future<void> showBottomSheetPill({
|
|||
ScrollController scrollController,
|
||||
) content,
|
||||
}) async {
|
||||
final screenSize = MediaQuery.sizeOf(context);
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
useRootNavigator: true,
|
||||
|
|
@ -25,9 +26,8 @@ Future<void> showBottomSheetPill({
|
|||
enableDrag: true,
|
||||
context: context,
|
||||
constraints: AdaptiveLayout.viewSizeOf(context) == ViewSize.phone
|
||||
? BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.9)
|
||||
: BoxConstraints(
|
||||
maxWidth: MediaQuery.of(context).size.width * 0.75, maxHeight: MediaQuery.of(context).size.height * 0.85),
|
||||
? BoxConstraints(maxHeight: screenSize.height * 0.9)
|
||||
: BoxConstraints(maxWidth: screenSize.width * 0.75, maxHeight: screenSize.height * 0.85),
|
||||
builder: (context) {
|
||||
final controller = ScrollController();
|
||||
return ListView(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue