优化底部导航栏显示

This commit is contained in:
rang 2025-10-29 09:47:50 +08:00
parent bf7284950e
commit 6c95fdba04
5 changed files with 324 additions and 341 deletions

View file

@ -23,7 +23,6 @@
"Vaani"
],
"dart.flutterSdkPath": ".fvm/versions/3.32.0",
"dart.lineLength": 80,
"files.exclude": {
"**/*.freezed.dart": true,
"**/*.g.dart": true

View file

@ -49,11 +49,9 @@ class MessageLookup extends MessageLookupByLibrary {
"bookAuthors": MessageLookupByLibrary.simpleMessage("Authors"),
"bookDownloads": MessageLookupByLibrary.simpleMessage("Downloads"),
"bookGenres": MessageLookupByLibrary.simpleMessage("Genres"),
"bookMetadataAbridged":
MessageLookupByLibrary.simpleMessage("Abridged"),
"bookMetadataAbridged": MessageLookupByLibrary.simpleMessage("Abridged"),
"bookMetadataLength": MessageLookupByLibrary.simpleMessage("Length"),
"bookMetadataPublished":
MessageLookupByLibrary.simpleMessage("Published"),
"bookMetadataPublished": MessageLookupByLibrary.simpleMessage("Published"),
"bookMetadataUnabridged": MessageLookupByLibrary.simpleMessage(
"Unabridged",
),
@ -92,16 +90,14 @@ class MessageLookup extends MessageLookupByLibrary {
"Continue Series",
),
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("Discover"),
"homeBookListenAgain":
MessageLookupByLibrary.simpleMessage("Listen Again"),
"homeBookListenAgain": MessageLookupByLibrary.simpleMessage("Listen Again"),
"homeBookNewestAuthors": MessageLookupByLibrary.simpleMessage(
"Newest Authors",
),
"homeBookRecentlyAdded": MessageLookupByLibrary.simpleMessage(
"Recently Added",
),
"homeBookRecommended":
MessageLookupByLibrary.simpleMessage("Recommended"),
"homeBookRecommended": MessageLookupByLibrary.simpleMessage("Recommended"),
"homeContinueListening": MessageLookupByLibrary.simpleMessage(
"Continue Listening",
),
@ -135,20 +131,17 @@ class MessageLookup extends MessageLookupByLibrary {
"loading": MessageLookupByLibrary.simpleMessage("Loading..."),
"logs": MessageLookupByLibrary.simpleMessage("Logs"),
"no": MessageLookupByLibrary.simpleMessage("No"),
"notImplemented":
MessageLookupByLibrary.simpleMessage("Not implemented"),
"notImplemented": MessageLookupByLibrary.simpleMessage("Not implemented"),
"notificationMediaPlayer": MessageLookupByLibrary.simpleMessage(
"Notification Media Player",
),
"notificationMediaPlayerDescription":
MessageLookupByLibrary.simpleMessage(
"notificationMediaPlayerDescription": MessageLookupByLibrary.simpleMessage(
"Customize the media player in notifications",
),
"ok": MessageLookupByLibrary.simpleMessage("OK"),
"pause": MessageLookupByLibrary.simpleMessage("Pause"),
"play": MessageLookupByLibrary.simpleMessage("Play"),
"playerSettings":
MessageLookupByLibrary.simpleMessage("Player Settings"),
"playerSettings": MessageLookupByLibrary.simpleMessage("Player Settings"),
"playerSettingsDescription": MessageLookupByLibrary.simpleMessage(
"Customize the player settings",
),
@ -167,8 +160,7 @@ class MessageLookup extends MessageLookupByLibrary {
),
"playerSettingsPlaybackReportingMinimumDescriptionTail":
MessageLookupByLibrary.simpleMessage("of the book"),
"playerSettingsRememberForEveryBook":
MessageLookupByLibrary.simpleMessage(
"playerSettingsRememberForEveryBook": MessageLookupByLibrary.simpleMessage(
"Remember Player Settings for Every Book",
),
"playerSettingsRememberForEveryBookDescription":

View file

@ -32,8 +32,7 @@ class MessageLookup extends MessageLookupByLibrary {
"accountSwitch": MessageLookupByLibrary.simpleMessage("切换账户"),
"appSettings": MessageLookupByLibrary.simpleMessage("应用设置"),
"appearance": MessageLookupByLibrary.simpleMessage("外观"),
"autoTurnOnSleepTimer":
MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"),
"autoTurnOnSleepTimer": MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"),
"automaticallyDescription": MessageLookupByLibrary.simpleMessage(
"根据一天中的时间自动打开睡眠定时器",
),
@ -56,8 +55,7 @@ class MessageLookup extends MessageLookupByLibrary {
"copyToClipboardDescription": MessageLookupByLibrary.simpleMessage(
"将应用程序设置复制到剪贴板",
),
"copyToClipboardToast":
MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"),
"copyToClipboardToast": MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"),
"delete": MessageLookupByLibrary.simpleMessage("删除"),
"deleteDialog": m0,
"deleted": m1,
@ -67,8 +65,7 @@ class MessageLookup extends MessageLookupByLibrary {
"general": MessageLookupByLibrary.simpleMessage("通用"),
"help": MessageLookupByLibrary.simpleMessage("Help"),
"home": MessageLookupByLibrary.simpleMessage("首页"),
"homeBookContinueListening":
MessageLookupByLibrary.simpleMessage("继续收听"),
"homeBookContinueListening": MessageLookupByLibrary.simpleMessage("继续收听"),
"homeBookContinueSeries": MessageLookupByLibrary.simpleMessage("继续系列"),
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("发现"),
"homeBookListenAgain": MessageLookupByLibrary.simpleMessage("再听一遍"),
@ -95,10 +92,8 @@ class MessageLookup extends MessageLookupByLibrary {
"logs": MessageLookupByLibrary.simpleMessage("日志"),
"no": MessageLookupByLibrary.simpleMessage(""),
"notImplemented": MessageLookupByLibrary.simpleMessage("未实现"),
"notificationMediaPlayer":
MessageLookupByLibrary.simpleMessage("通知媒体播放器"),
"notificationMediaPlayerDescription":
MessageLookupByLibrary.simpleMessage(
"notificationMediaPlayer": MessageLookupByLibrary.simpleMessage("通知媒体播放器"),
"notificationMediaPlayerDescription": MessageLookupByLibrary.simpleMessage(
"在通知中自定义媒体播放器",
),
"ok": MessageLookupByLibrary.simpleMessage("确定"),
@ -119,8 +114,7 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("不要报告本书前 "),
"playerSettingsPlaybackReportingMinimumDescriptionTail":
MessageLookupByLibrary.simpleMessage(" 的播放"),
"playerSettingsRememberForEveryBook":
MessageLookupByLibrary.simpleMessage(
"playerSettingsRememberForEveryBook": MessageLookupByLibrary.simpleMessage(
"记住每本书的播放器设置",
),
"playerSettingsRememberForEveryBookDescription":
@ -148,10 +142,8 @@ class MessageLookup extends MessageLookupByLibrary {
"restoreBackupHint": MessageLookupByLibrary.simpleMessage("将备份粘贴到此处"),
"restoreBackupInvalid": MessageLookupByLibrary.simpleMessage("无效备份"),
"restoreBackupSuccess": MessageLookupByLibrary.simpleMessage("设置已恢复"),
"restoreBackupValidator":
MessageLookupByLibrary.simpleMessage("请将备份粘贴到此处"),
"restoreDescription":
MessageLookupByLibrary.simpleMessage("从备份中还原应用程序设置"),
"restoreBackupValidator": MessageLookupByLibrary.simpleMessage("请将备份粘贴到此处"),
"restoreDescription": MessageLookupByLibrary.simpleMessage("从备份中还原应用程序设置"),
"resume": MessageLookupByLibrary.simpleMessage("继续"),
"retry": MessageLookupByLibrary.simpleMessage("重试"),
"settings": MessageLookupByLibrary.simpleMessage("设置"),
@ -160,8 +152,7 @@ class MessageLookup extends MessageLookupByLibrary {
"自定义抖动检测器设置",
),
"themeSettings": MessageLookupByLibrary.simpleMessage("主题设置"),
"themeSettingsDescription":
MessageLookupByLibrary.simpleMessage("自定义应用主题"),
"themeSettingsDescription": MessageLookupByLibrary.simpleMessage("自定义应用主题"),
"unknown": MessageLookupByLibrary.simpleMessage("未知"),
"webVersion": MessageLookupByLibrary.simpleMessage("Web版本"),
"yes": MessageLookupByLibrary.simpleMessage(""),

View file

@ -95,14 +95,14 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
child: Scaffold(
body: Stack(
children: [
isMobile && isVertical
isMobile || isVertical
? navigationShell
: buildNavLeft(context, ref),
const AudiobookPlayer(),
],
),
bottomNavigationBar:
isMobile && isVertical ? buildNavBottom(context, ref) : null,
isMobile || isVertical ? buildNavBottom(context, ref) : null,
),
);
}
@ -178,7 +178,7 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
(playerMaxHeight - playerMinHeight);
// Clamp the value between 0 and 1
percentExpandedMiniPlayer = percentExpandedMiniPlayer.clamp(0.0, 1.0);
return percentExpandedMiniPlayer == 1
return percentExpandedMiniPlayer != 1
? Opacity(
// Opacity is interpolated from 1 to 0 when player is expanded
opacity: 1 - percentExpandedMiniPlayer,

View file

@ -158,6 +158,7 @@ flutter:
flutter_intl:
enabled: true
# dart run flutter_launcher_icons
flutter_launcher_icons:
android: false # 如果只为iOS配置可关闭Android
ios: true