mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-04-21 13:49:38 +00:00
优化底部导航栏显示
This commit is contained in:
parent
bf7284950e
commit
6c95fdba04
5 changed files with 324 additions and 341 deletions
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
|
@ -23,7 +23,6 @@
|
||||||
"Vaani"
|
"Vaani"
|
||||||
],
|
],
|
||||||
"dart.flutterSdkPath": ".fvm/versions/3.32.0",
|
"dart.flutterSdkPath": ".fvm/versions/3.32.0",
|
||||||
"dart.lineLength": 80,
|
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/*.freezed.dart": true,
|
"**/*.freezed.dart": true,
|
||||||
"**/*.g.dart": true
|
"**/*.g.dart": true
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,9 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"bookAuthors": MessageLookupByLibrary.simpleMessage("Authors"),
|
"bookAuthors": MessageLookupByLibrary.simpleMessage("Authors"),
|
||||||
"bookDownloads": MessageLookupByLibrary.simpleMessage("Downloads"),
|
"bookDownloads": MessageLookupByLibrary.simpleMessage("Downloads"),
|
||||||
"bookGenres": MessageLookupByLibrary.simpleMessage("Genres"),
|
"bookGenres": MessageLookupByLibrary.simpleMessage("Genres"),
|
||||||
"bookMetadataAbridged":
|
"bookMetadataAbridged": MessageLookupByLibrary.simpleMessage("Abridged"),
|
||||||
MessageLookupByLibrary.simpleMessage("Abridged"),
|
|
||||||
"bookMetadataLength": MessageLookupByLibrary.simpleMessage("Length"),
|
"bookMetadataLength": MessageLookupByLibrary.simpleMessage("Length"),
|
||||||
"bookMetadataPublished":
|
"bookMetadataPublished": MessageLookupByLibrary.simpleMessage("Published"),
|
||||||
MessageLookupByLibrary.simpleMessage("Published"),
|
|
||||||
"bookMetadataUnabridged": MessageLookupByLibrary.simpleMessage(
|
"bookMetadataUnabridged": MessageLookupByLibrary.simpleMessage(
|
||||||
"Unabridged",
|
"Unabridged",
|
||||||
),
|
),
|
||||||
|
|
@ -92,16 +90,14 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"Continue Series",
|
"Continue Series",
|
||||||
),
|
),
|
||||||
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("Discover"),
|
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("Discover"),
|
||||||
"homeBookListenAgain":
|
"homeBookListenAgain": MessageLookupByLibrary.simpleMessage("Listen Again"),
|
||||||
MessageLookupByLibrary.simpleMessage("Listen Again"),
|
|
||||||
"homeBookNewestAuthors": MessageLookupByLibrary.simpleMessage(
|
"homeBookNewestAuthors": MessageLookupByLibrary.simpleMessage(
|
||||||
"Newest Authors",
|
"Newest Authors",
|
||||||
),
|
),
|
||||||
"homeBookRecentlyAdded": MessageLookupByLibrary.simpleMessage(
|
"homeBookRecentlyAdded": MessageLookupByLibrary.simpleMessage(
|
||||||
"Recently Added",
|
"Recently Added",
|
||||||
),
|
),
|
||||||
"homeBookRecommended":
|
"homeBookRecommended": MessageLookupByLibrary.simpleMessage("Recommended"),
|
||||||
MessageLookupByLibrary.simpleMessage("Recommended"),
|
|
||||||
"homeContinueListening": MessageLookupByLibrary.simpleMessage(
|
"homeContinueListening": MessageLookupByLibrary.simpleMessage(
|
||||||
"Continue Listening",
|
"Continue Listening",
|
||||||
),
|
),
|
||||||
|
|
@ -135,20 +131,17 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"loading": MessageLookupByLibrary.simpleMessage("Loading..."),
|
"loading": MessageLookupByLibrary.simpleMessage("Loading..."),
|
||||||
"logs": MessageLookupByLibrary.simpleMessage("Logs"),
|
"logs": MessageLookupByLibrary.simpleMessage("Logs"),
|
||||||
"no": MessageLookupByLibrary.simpleMessage("No"),
|
"no": MessageLookupByLibrary.simpleMessage("No"),
|
||||||
"notImplemented":
|
"notImplemented": MessageLookupByLibrary.simpleMessage("Not implemented"),
|
||||||
MessageLookupByLibrary.simpleMessage("Not implemented"),
|
|
||||||
"notificationMediaPlayer": MessageLookupByLibrary.simpleMessage(
|
"notificationMediaPlayer": MessageLookupByLibrary.simpleMessage(
|
||||||
"Notification Media Player",
|
"Notification Media Player",
|
||||||
),
|
),
|
||||||
"notificationMediaPlayerDescription":
|
"notificationMediaPlayerDescription": MessageLookupByLibrary.simpleMessage(
|
||||||
MessageLookupByLibrary.simpleMessage(
|
|
||||||
"Customize the media player in notifications",
|
"Customize the media player in notifications",
|
||||||
),
|
),
|
||||||
"ok": MessageLookupByLibrary.simpleMessage("OK"),
|
"ok": MessageLookupByLibrary.simpleMessage("OK"),
|
||||||
"pause": MessageLookupByLibrary.simpleMessage("Pause"),
|
"pause": MessageLookupByLibrary.simpleMessage("Pause"),
|
||||||
"play": MessageLookupByLibrary.simpleMessage("Play"),
|
"play": MessageLookupByLibrary.simpleMessage("Play"),
|
||||||
"playerSettings":
|
"playerSettings": MessageLookupByLibrary.simpleMessage("Player Settings"),
|
||||||
MessageLookupByLibrary.simpleMessage("Player Settings"),
|
|
||||||
"playerSettingsDescription": MessageLookupByLibrary.simpleMessage(
|
"playerSettingsDescription": MessageLookupByLibrary.simpleMessage(
|
||||||
"Customize the player settings",
|
"Customize the player settings",
|
||||||
),
|
),
|
||||||
|
|
@ -167,8 +160,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
),
|
),
|
||||||
"playerSettingsPlaybackReportingMinimumDescriptionTail":
|
"playerSettingsPlaybackReportingMinimumDescriptionTail":
|
||||||
MessageLookupByLibrary.simpleMessage("of the book"),
|
MessageLookupByLibrary.simpleMessage("of the book"),
|
||||||
"playerSettingsRememberForEveryBook":
|
"playerSettingsRememberForEveryBook": MessageLookupByLibrary.simpleMessage(
|
||||||
MessageLookupByLibrary.simpleMessage(
|
|
||||||
"Remember Player Settings for Every Book",
|
"Remember Player Settings for Every Book",
|
||||||
),
|
),
|
||||||
"playerSettingsRememberForEveryBookDescription":
|
"playerSettingsRememberForEveryBookDescription":
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"accountSwitch": MessageLookupByLibrary.simpleMessage("切换账户"),
|
"accountSwitch": MessageLookupByLibrary.simpleMessage("切换账户"),
|
||||||
"appSettings": MessageLookupByLibrary.simpleMessage("应用设置"),
|
"appSettings": MessageLookupByLibrary.simpleMessage("应用设置"),
|
||||||
"appearance": MessageLookupByLibrary.simpleMessage("外观"),
|
"appearance": MessageLookupByLibrary.simpleMessage("外观"),
|
||||||
"autoTurnOnSleepTimer":
|
"autoTurnOnSleepTimer": MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"),
|
||||||
MessageLookupByLibrary.simpleMessage("自动开启睡眠定时器"),
|
|
||||||
"automaticallyDescription": MessageLookupByLibrary.simpleMessage(
|
"automaticallyDescription": MessageLookupByLibrary.simpleMessage(
|
||||||
"根据一天中的时间自动打开睡眠定时器",
|
"根据一天中的时间自动打开睡眠定时器",
|
||||||
),
|
),
|
||||||
|
|
@ -56,8 +55,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"copyToClipboardDescription": MessageLookupByLibrary.simpleMessage(
|
"copyToClipboardDescription": MessageLookupByLibrary.simpleMessage(
|
||||||
"将应用程序设置复制到剪贴板",
|
"将应用程序设置复制到剪贴板",
|
||||||
),
|
),
|
||||||
"copyToClipboardToast":
|
"copyToClipboardToast": MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"),
|
||||||
MessageLookupByLibrary.simpleMessage("设置已复制到剪贴板"),
|
|
||||||
"delete": MessageLookupByLibrary.simpleMessage("删除"),
|
"delete": MessageLookupByLibrary.simpleMessage("删除"),
|
||||||
"deleteDialog": m0,
|
"deleteDialog": m0,
|
||||||
"deleted": m1,
|
"deleted": m1,
|
||||||
|
|
@ -67,8 +65,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"general": MessageLookupByLibrary.simpleMessage("通用"),
|
"general": MessageLookupByLibrary.simpleMessage("通用"),
|
||||||
"help": MessageLookupByLibrary.simpleMessage("Help"),
|
"help": MessageLookupByLibrary.simpleMessage("Help"),
|
||||||
"home": MessageLookupByLibrary.simpleMessage("首页"),
|
"home": MessageLookupByLibrary.simpleMessage("首页"),
|
||||||
"homeBookContinueListening":
|
"homeBookContinueListening": MessageLookupByLibrary.simpleMessage("继续收听"),
|
||||||
MessageLookupByLibrary.simpleMessage("继续收听"),
|
|
||||||
"homeBookContinueSeries": MessageLookupByLibrary.simpleMessage("继续系列"),
|
"homeBookContinueSeries": MessageLookupByLibrary.simpleMessage("继续系列"),
|
||||||
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("发现"),
|
"homeBookDiscover": MessageLookupByLibrary.simpleMessage("发现"),
|
||||||
"homeBookListenAgain": MessageLookupByLibrary.simpleMessage("再听一遍"),
|
"homeBookListenAgain": MessageLookupByLibrary.simpleMessage("再听一遍"),
|
||||||
|
|
@ -95,10 +92,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"logs": MessageLookupByLibrary.simpleMessage("日志"),
|
"logs": MessageLookupByLibrary.simpleMessage("日志"),
|
||||||
"no": MessageLookupByLibrary.simpleMessage("否"),
|
"no": MessageLookupByLibrary.simpleMessage("否"),
|
||||||
"notImplemented": MessageLookupByLibrary.simpleMessage("未实现"),
|
"notImplemented": MessageLookupByLibrary.simpleMessage("未实现"),
|
||||||
"notificationMediaPlayer":
|
"notificationMediaPlayer": MessageLookupByLibrary.simpleMessage("通知媒体播放器"),
|
||||||
MessageLookupByLibrary.simpleMessage("通知媒体播放器"),
|
"notificationMediaPlayerDescription": MessageLookupByLibrary.simpleMessage(
|
||||||
"notificationMediaPlayerDescription":
|
|
||||||
MessageLookupByLibrary.simpleMessage(
|
|
||||||
"在通知中自定义媒体播放器",
|
"在通知中自定义媒体播放器",
|
||||||
),
|
),
|
||||||
"ok": MessageLookupByLibrary.simpleMessage("确定"),
|
"ok": MessageLookupByLibrary.simpleMessage("确定"),
|
||||||
|
|
@ -119,8 +114,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
MessageLookupByLibrary.simpleMessage("不要报告本书前 "),
|
MessageLookupByLibrary.simpleMessage("不要报告本书前 "),
|
||||||
"playerSettingsPlaybackReportingMinimumDescriptionTail":
|
"playerSettingsPlaybackReportingMinimumDescriptionTail":
|
||||||
MessageLookupByLibrary.simpleMessage(" 的播放"),
|
MessageLookupByLibrary.simpleMessage(" 的播放"),
|
||||||
"playerSettingsRememberForEveryBook":
|
"playerSettingsRememberForEveryBook": MessageLookupByLibrary.simpleMessage(
|
||||||
MessageLookupByLibrary.simpleMessage(
|
|
||||||
"记住每本书的播放器设置",
|
"记住每本书的播放器设置",
|
||||||
),
|
),
|
||||||
"playerSettingsRememberForEveryBookDescription":
|
"playerSettingsRememberForEveryBookDescription":
|
||||||
|
|
@ -148,10 +142,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"restoreBackupHint": MessageLookupByLibrary.simpleMessage("将备份粘贴到此处"),
|
"restoreBackupHint": MessageLookupByLibrary.simpleMessage("将备份粘贴到此处"),
|
||||||
"restoreBackupInvalid": MessageLookupByLibrary.simpleMessage("无效备份"),
|
"restoreBackupInvalid": MessageLookupByLibrary.simpleMessage("无效备份"),
|
||||||
"restoreBackupSuccess": MessageLookupByLibrary.simpleMessage("设置已恢复"),
|
"restoreBackupSuccess": MessageLookupByLibrary.simpleMessage("设置已恢复"),
|
||||||
"restoreBackupValidator":
|
"restoreBackupValidator": MessageLookupByLibrary.simpleMessage("请将备份粘贴到此处"),
|
||||||
MessageLookupByLibrary.simpleMessage("请将备份粘贴到此处"),
|
"restoreDescription": MessageLookupByLibrary.simpleMessage("从备份中还原应用程序设置"),
|
||||||
"restoreDescription":
|
|
||||||
MessageLookupByLibrary.simpleMessage("从备份中还原应用程序设置"),
|
|
||||||
"resume": MessageLookupByLibrary.simpleMessage("继续"),
|
"resume": MessageLookupByLibrary.simpleMessage("继续"),
|
||||||
"retry": MessageLookupByLibrary.simpleMessage("重试"),
|
"retry": MessageLookupByLibrary.simpleMessage("重试"),
|
||||||
"settings": MessageLookupByLibrary.simpleMessage("设置"),
|
"settings": MessageLookupByLibrary.simpleMessage("设置"),
|
||||||
|
|
@ -160,8 +152,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||||
"自定义抖动检测器设置",
|
"自定义抖动检测器设置",
|
||||||
),
|
),
|
||||||
"themeSettings": MessageLookupByLibrary.simpleMessage("主题设置"),
|
"themeSettings": MessageLookupByLibrary.simpleMessage("主题设置"),
|
||||||
"themeSettingsDescription":
|
"themeSettingsDescription": MessageLookupByLibrary.simpleMessage("自定义应用主题"),
|
||||||
MessageLookupByLibrary.simpleMessage("自定义应用主题"),
|
|
||||||
"unknown": MessageLookupByLibrary.simpleMessage("未知"),
|
"unknown": MessageLookupByLibrary.simpleMessage("未知"),
|
||||||
"webVersion": MessageLookupByLibrary.simpleMessage("Web版本"),
|
"webVersion": MessageLookupByLibrary.simpleMessage("Web版本"),
|
||||||
"yes": MessageLookupByLibrary.simpleMessage("是"),
|
"yes": MessageLookupByLibrary.simpleMessage("是"),
|
||||||
|
|
|
||||||
|
|
@ -95,14 +95,14 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
isMobile && isVertical
|
isMobile || isVertical
|
||||||
? navigationShell
|
? navigationShell
|
||||||
: buildNavLeft(context, ref),
|
: buildNavLeft(context, ref),
|
||||||
const AudiobookPlayer(),
|
const AudiobookPlayer(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
bottomNavigationBar:
|
bottomNavigationBar:
|
||||||
isMobile && isVertical ? buildNavBottom(context, ref) : null,
|
isMobile || isVertical ? buildNavBottom(context, ref) : null,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -178,7 +178,7 @@ class ScaffoldWithNavBar extends HookConsumerWidget {
|
||||||
(playerMaxHeight - playerMinHeight);
|
(playerMaxHeight - playerMinHeight);
|
||||||
// Clamp the value between 0 and 1
|
// Clamp the value between 0 and 1
|
||||||
percentExpandedMiniPlayer = percentExpandedMiniPlayer.clamp(0.0, 1.0);
|
percentExpandedMiniPlayer = percentExpandedMiniPlayer.clamp(0.0, 1.0);
|
||||||
return percentExpandedMiniPlayer == 1
|
return percentExpandedMiniPlayer != 1
|
||||||
? Opacity(
|
? Opacity(
|
||||||
// Opacity is interpolated from 1 to 0 when player is expanded
|
// Opacity is interpolated from 1 to 0 when player is expanded
|
||||||
opacity: 1 - percentExpandedMiniPlayer,
|
opacity: 1 - percentExpandedMiniPlayer,
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ flutter:
|
||||||
flutter_intl:
|
flutter_intl:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
# dart run flutter_launcher_icons
|
||||||
flutter_launcher_icons:
|
flutter_launcher_icons:
|
||||||
android: false # 如果只为iOS配置,可关闭Android
|
android: false # 如果只为iOS配置,可关闭Android
|
||||||
ios: true
|
ios: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue