Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8b9a090e0 | ||
|
|
3ad371aa9d | ||
|
|
7463d3ee26 | ||
|
|
59fbd33059 | ||
|
|
8c1662475a | ||
|
|
7f65fe4d48 | ||
|
|
613147c20c | ||
|
|
731638b31b | ||
|
|
c4adbd0665 | ||
|
|
a833d62c50 | ||
|
|
bc01716449 | ||
|
|
12b1a11bd3 | ||
|
|
66c03ee245 | ||
|
|
a3ac007759 | ||
|
|
8ec6df2be5 | ||
|
|
5ec4db151a | ||
|
|
525f58c150 | ||
|
|
a47af8c3ad | ||
|
|
0a02620564 | ||
|
|
2ddf9ee1c6 | ||
|
|
3bc79ad8e2 | ||
|
|
78a33cd4f1 | ||
|
|
c307903c42 | ||
|
|
c5b94633f1 | ||
|
|
fd2ba0bf43 | ||
|
|
aed9ee2b01 | ||
|
|
335e5dc286 | ||
|
|
e8610b7aed | ||
|
|
2f4593a46e | ||
|
|
7509cf2ecd | ||
|
|
501bc66282 | ||
|
|
19196ceb8e | ||
|
|
9ef8eb15b0 | ||
|
|
53e8c924a6 | ||
|
|
e7399fa3fd | ||
|
|
22cc669bbe | ||
|
|
26321e3348 | ||
|
|
3590cd0c55 | ||
|
|
c311985601 | ||
|
|
4dd37b2588 | ||
|
|
543d0aadd5 | ||
|
|
d5bcda54d3 | ||
|
|
79463e65c2 | ||
|
|
ad7aba3daf | ||
|
|
47fdd4a29d | ||
|
|
fe49527dd8 | ||
|
|
4aaa5bbd60 | ||
|
|
5649e4c3d4 | ||
|
|
9f7301305e | ||
|
|
63191b4692 | ||
|
|
0f777b19f2 | ||
|
|
fb9001a02d | ||
|
|
1b80f841be |
No files matched your search
@@ -0,0 +1,25 @@
|
|||||||
|
# Author: fruit.com.cn
|
||||||
|
# ReelShort 客户端 CI:静态分析 + 测试门禁
|
||||||
|
name: flutter-ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [develop, main]
|
||||||
|
pull_request:
|
||||||
|
branches: [develop, main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: stable
|
||||||
|
cache: true
|
||||||
|
- name: 依赖
|
||||||
|
run: flutter pub get
|
||||||
|
- name: 静态分析(零告警门禁)
|
||||||
|
run: dart analyze --fatal-infos
|
||||||
|
- name: 单元测试(全绿门禁)
|
||||||
|
run: flutter test -r expanded
|
||||||
@@ -65,3 +65,6 @@ app.*.map.json
|
|||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
!.env.example
|
!.env.example
|
||||||
|
|
||||||
|
# IDE 的 Flutter Widget Preview 生成目录。
|
||||||
|
.widget_preview/
|
||||||
@@ -81,12 +81,15 @@ Android 模拟器访问宿主机时,同样在调试条里填 `http://10.0.2.2:
|
|||||||
|
|
||||||
### iOS
|
### iOS
|
||||||
|
|
||||||
手机与 Mac 需在同一网络,首次启动允许“本地网络”权限:
|
iOS 模拟器直接访问 Mac 本机服务,默认地址为 `http://127.0.0.1:8081`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
flutter run -d <udid>
|
flutter run -d <simulator-udid>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
iPhone 真机不能用 `127.0.0.1` 访问 Mac;真机联调时需让手机与 Mac 位于同一网络,
|
||||||
|
并通过调试入口临时填写 Mac 的局域网地址。
|
||||||
|
|
||||||
### 服务地址配置
|
### 服务地址配置
|
||||||
|
|
||||||
地址是代码里的一个开关,**不做任何网络探测**,也不用传构建参数。两套环境各占
|
地址是代码里的一个开关,**不做任何网络探测**,也不用传构建参数。两套环境各占
|
||||||
@@ -94,7 +97,7 @@ flutter run -d <udid>
|
|||||||
|
|
||||||
| 文件 | 用途 | 默认值 |
|
| 文件 | 用途 | 默认值 |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `lib/core/config/dev_config.dart` | 开发 / 联调 | `http://192.168.31.243:8081` |
|
| `lib/core/config/dev_config.dart` | 开发 / 联调 | `http://127.0.0.1:8081` |
|
||||||
| `lib/core/config/prod_config.dart` | 生产 | `http://39.162.50.99:8081` |
|
| `lib/core/config/prod_config.dart` | 生产 | `http://39.162.50.99:8081` |
|
||||||
|
|
||||||
切换环境只改 `lib/core/config/app_config.dart` 里的一个布尔值:
|
切换环境只改 `lib/core/config/app_config.dart` 里的一个布尔值:
|
||||||
@@ -103,7 +106,7 @@ flutter run -d <udid>
|
|||||||
static const bool useDevConfig = true; // false 即用生产地址
|
static const bool useDevConfig = true; // false 即用生产地址
|
||||||
```
|
```
|
||||||
|
|
||||||
换 Wi-Fi 或换网段时只改 `dev_config.dart` 的 `baseUrl`。打生产包前把
|
真机或 Android 模拟器联调时,通过调试入口覆盖地址,不修改默认开发配置。打生产包前把
|
||||||
`useDevConfig` 改成 `false`;release 构建若仍为 `true` 会在启动时直接报错,
|
`useDevConfig` 改成 `false`;release 构建若仍为 `true` 会在启动时直接报错,
|
||||||
避免线上包连到开发机。
|
避免线上包连到开发机。
|
||||||
|
|
||||||
@@ -197,7 +200,7 @@ flutter test
|
|||||||
flutter build apk --debug
|
flutter build apk --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
当前基线:`dart analyze` 仅 1 条既存 info(`intl` 未在 `pubspec.yaml` 声明);
|
当前基线:`dart analyze` 仅 1 条既存 info(`intl` 未在 `pubspec.yaml` 声明);
|
||||||
`flutter test` 全量 775 例通过。测试文件按模块放在 `test/` 下,用例名使用
|
`flutter test` 全量 775 例通过。测试文件按模块放在 `test/` 下,用例名使用
|
||||||
`should_<期望>_when_<条件>`。真实后端联调测试在服务未启动时会跳过。
|
`should_<期望>_when_<条件>`。真实后端联调测试在服务未启动时会跳过。
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||||
<application
|
<application
|
||||||
android:label="FruitShorts"
|
android:label="ymb"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
|
|||||||
|
After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 156 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 113 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 623 B |
@@ -8,7 +8,7 @@
|
|||||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||||
<item name="android:windowSplashScreenBackground">#000000</item>
|
<item name="android:windowSplashScreenBackground">#000000</item>
|
||||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_brand</item>
|
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||||
<item name="android:windowSplashScreenAnimationDuration">0</item>
|
<item name="android:windowSplashScreenAnimationDuration">0</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||||
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
|
||||||
<item name="android:windowSplashScreenBackground">#000000</item>
|
<item name="android:windowSplashScreenBackground">#000000</item>
|
||||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_brand</item>
|
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
|
||||||
<item name="android:windowSplashScreenAnimationDuration">0</item>
|
<item name="android:windowSplashScreenAnimationDuration">0</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
|||||||
@@ -3,5 +3,5 @@
|
|||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<color name="splash_background">#000000</color>
|
<color name="splash_background">#000000</color>
|
||||||
<color name="ic_launcher_background">#FF6B2C</color>
|
<color name="ic_launcher_background">#000000</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -386,15 +386,29 @@ final class PipShadowCoordinator: NSObject, AVPictureInPictureControllerDelegate
|
|||||||
guard call.method == "shareText",
|
guard call.method == "shareText",
|
||||||
let arguments = call.arguments as? [String: Any],
|
let arguments = call.arguments as? [String: Any],
|
||||||
let text = arguments["text"] as? String,
|
let text = arguments["text"] as? String,
|
||||||
!text.isEmpty,
|
!text.isEmpty else {
|
||||||
let controller = self?.window?.rootViewController else {
|
|
||||||
result(FlutterError(code: "share_unavailable", message: "Share sheet is unavailable", details: nil))
|
result(FlutterError(code: "share_unavailable", message: "Share sheet is unavailable", details: nil))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let activity = UIActivityViewController(activityItems: [text], applicationActivities: nil)
|
DispatchQueue.main.async {
|
||||||
activity.popoverPresentationController?.sourceView = controller.view
|
guard let controller = self?.sharePresenter() else {
|
||||||
activity.completionWithItemsHandler = { _, _, _, _ in result(nil) }
|
result(FlutterError(code: "share_unavailable", message: "Share sheet is unavailable", details: nil))
|
||||||
controller.present(activity, animated: true)
|
return
|
||||||
|
}
|
||||||
|
let activity = UIActivityViewController(activityItems: [text], applicationActivities: nil)
|
||||||
|
if let popover = activity.popoverPresentationController {
|
||||||
|
popover.sourceView = controller.view
|
||||||
|
popover.sourceRect = CGRect(
|
||||||
|
x: controller.view.bounds.midX,
|
||||||
|
y: controller.view.bounds.midY,
|
||||||
|
width: 0,
|
||||||
|
height: 0
|
||||||
|
)
|
||||||
|
popover.permittedArrowDirections = []
|
||||||
|
}
|
||||||
|
activity.completionWithItemsHandler = { _, _, _, _ in result(nil) }
|
||||||
|
controller.present(activity, animated: true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let thumbnailChannel = FlutterMethodChannel(
|
let thumbnailChannel = FlutterMethodChannel(
|
||||||
@@ -459,6 +473,34 @@ final class PipShadowCoordinator: NSObject, AVPictureInPictureControllerDelegate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 当前前台 Scene 的根控制器之上,最适合展示系统分享面板的控制器。
|
||||||
|
private func sharePresenter() -> UIViewController? {
|
||||||
|
let keyWindow = UIApplication.shared.connectedScenes
|
||||||
|
.compactMap { $0 as? UIWindowScene }
|
||||||
|
.first { $0.activationState == .foregroundActive }?
|
||||||
|
.windows.first { $0.isKeyWindow }
|
||||||
|
guard let rootController = keyWindow?.rootViewController else { return nil }
|
||||||
|
let presenter = topPresentedController(from: rootController)
|
||||||
|
guard presenter.viewIfLoaded?.window != nil else { return nil }
|
||||||
|
return presenter
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 解析已展示页面、导航栈和标签页中的当前可见控制器。
|
||||||
|
private func topPresentedController(from controller: UIViewController) -> UIViewController {
|
||||||
|
if let presented = controller.presentedViewController {
|
||||||
|
return topPresentedController(from: presented)
|
||||||
|
}
|
||||||
|
if let navigation = controller as? UINavigationController,
|
||||||
|
let visible = navigation.visibleViewController {
|
||||||
|
return topPresentedController(from: visible)
|
||||||
|
}
|
||||||
|
if let tabs = controller as? UITabBarController,
|
||||||
|
let selected = tabs.selectedViewController {
|
||||||
|
return topPresentedController(from: selected)
|
||||||
|
}
|
||||||
|
return controller
|
||||||
|
}
|
||||||
|
|
||||||
/// iOS 画中画:影子播放器通道,与 Android 共用同一 channel 名。
|
/// iOS 画中画:影子播放器通道,与 Android 共用同一 channel 名。
|
||||||
private func registerPipChannel(_ engineBridge: FlutterImplicitEngineBridge) {
|
private func registerPipChannel(_ engineBridge: FlutterImplicitEngineBridge) {
|
||||||
let channel = FlutterMethodChannel(
|
let channel = FlutterMethodChannel(
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 907 B After Width: | Height: | Size: 799 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 587 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 907 B After Width: | Height: | Size: 799 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 20 KiB |
@@ -1,115 +1,115 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
|
<true/>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>ymb</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>ymb</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>NSAllowsLocalNetworking</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>FruitShorts</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>FruitShorts</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSExceptionDomains</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
<key>127.0.0.1</key>
|
||||||
<true/>
|
|
||||||
<key>NSAllowsLocalNetworking</key>
|
|
||||||
<true/>
|
|
||||||
<key>NSExceptionDomains</key>
|
|
||||||
<dict>
|
<dict>
|
||||||
<key>127.0.0.1</key>
|
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||||
<dict>
|
<true/>
|
||||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
<key>NSIncludesSubdomains</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSIncludesSubdomains</key>
|
</dict>
|
||||||
<true/>
|
<key>192.168.31.243</key>
|
||||||
</dict>
|
<dict>
|
||||||
<key>localhost</key>
|
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||||
<dict>
|
<true/>
|
||||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
<key>NSIncludesSubdomains</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSIncludesSubdomains</key>
|
</dict>
|
||||||
<true/>
|
<key>39.162.50.99</key>
|
||||||
</dict>
|
<dict>
|
||||||
<key>192.168.31.243</key>
|
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||||
<dict>
|
<true/>
|
||||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
<key>NSIncludesSubdomains</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSIncludesSubdomains</key>
|
</dict>
|
||||||
<true/>
|
<key>localhost</key>
|
||||||
</dict>
|
<dict>
|
||||||
<key>39.162.50.99</key>
|
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||||
<dict>
|
<true/>
|
||||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
<key>NSIncludesSubdomains</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSIncludesSubdomains</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSLocalNetworkUsageDescription</key>
|
|
||||||
<string>开发阶段需要访问同一局域网内的短剧内容服务。</string>
|
|
||||||
<key>UIApplicationSceneManifest</key>
|
|
||||||
<dict>
|
|
||||||
<key>UIApplicationSupportsMultipleScenes</key>
|
|
||||||
<false/>
|
|
||||||
<key>UISceneConfigurations</key>
|
|
||||||
<dict>
|
|
||||||
<key>UIWindowSceneSessionRoleApplication</key>
|
|
||||||
<array>
|
|
||||||
<dict>
|
|
||||||
<key>UISceneClassName</key>
|
|
||||||
<string>UIWindowScene</string>
|
|
||||||
<key>UISceneConfigurationName</key>
|
|
||||||
<string>flutter</string>
|
|
||||||
<key>UISceneDelegateClassName</key>
|
|
||||||
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
|
||||||
<key>UISceneStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
<key>UIBackgroundModes</key>
|
|
||||||
<array>
|
|
||||||
<string>audio</string>
|
|
||||||
</array>
|
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
|
||||||
<true/>
|
|
||||||
<key>UILaunchStoryboardName</key>
|
|
||||||
<string>LaunchScreen</string>
|
|
||||||
<key>UIMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UIStatusBarHidden</key>
|
|
||||||
<false/>
|
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>NSLocalNetworkUsageDescription</key>
|
||||||
|
<string>开发阶段需要访问同一局域网内的短剧内容服务。</string>
|
||||||
|
<key>UIApplicationSceneManifest</key>
|
||||||
|
<dict>
|
||||||
|
<key>UIApplicationSupportsMultipleScenes</key>
|
||||||
|
<false/>
|
||||||
|
<key>UISceneConfigurations</key>
|
||||||
|
<dict>
|
||||||
|
<key>UIWindowSceneSessionRoleApplication</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>UISceneClassName</key>
|
||||||
|
<string>UIWindowScene</string>
|
||||||
|
<key>UISceneConfigurationName</key>
|
||||||
|
<string>flutter</string>
|
||||||
|
<key>UISceneDelegateClassName</key>
|
||||||
|
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
||||||
|
<key>UISceneStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIBackgroundModes</key>
|
||||||
|
<array>
|
||||||
|
<string>audio</string>
|
||||||
|
</array>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIMainStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
<key>UIStatusBarHidden</key>
|
||||||
|
<false/>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -14,6 +14,7 @@ import 'core/data/remote/catalog_api.dart';
|
|||||||
import 'core/data/remote/category_api.dart';
|
import 'core/data/remote/category_api.dart';
|
||||||
import 'core/data/remote/comment_api.dart';
|
import 'core/data/remote/comment_api.dart';
|
||||||
import 'core/data/remote/commerce_api.dart';
|
import 'core/data/remote/commerce_api.dart';
|
||||||
|
import 'core/data/remote/config_api.dart';
|
||||||
import 'core/data/remote/device_profile.dart';
|
import 'core/data/remote/device_profile.dart';
|
||||||
import 'core/data/remote/download_api.dart';
|
import 'core/data/remote/download_api.dart';
|
||||||
import 'core/data/remote/interaction_api.dart';
|
import 'core/data/remote/interaction_api.dart';
|
||||||
@@ -35,6 +36,7 @@ import 'core/data/repositories/playlist_repository.dart';
|
|||||||
import 'core/data/repositories/search_repository.dart';
|
import 'core/data/repositories/search_repository.dart';
|
||||||
import 'core/data/repositories/store_repository.dart';
|
import 'core/data/repositories/store_repository.dart';
|
||||||
import 'core/data/repositories/watch_history_repository.dart';
|
import 'core/data/repositories/watch_history_repository.dart';
|
||||||
|
import 'core/data/services/app_config_controller.dart';
|
||||||
import 'core/data/services/auth_controller.dart';
|
import 'core/data/services/auth_controller.dart';
|
||||||
import 'core/data/services/auth_session_store.dart';
|
import 'core/data/services/auth_session_store.dart';
|
||||||
import 'core/data/services/catalog_controller.dart';
|
import 'core/data/services/catalog_controller.dart';
|
||||||
@@ -208,6 +210,11 @@ class _LumaDramaAppState extends State<LumaDramaApp> {
|
|||||||
|
|
||||||
late final LocaleController _localeController = LocaleController();
|
late final LocaleController _localeController = LocaleController();
|
||||||
|
|
||||||
|
/// 后台下发的启动配置(登录页背景等);拉不到就用本地默认。
|
||||||
|
late final AppConfigController _appConfigController = AppConfigController(
|
||||||
|
ConfigApi(_apiClient),
|
||||||
|
);
|
||||||
|
|
||||||
/// 登录期内共享的「已解锁收费集」:播放页进出、feed 与全屏切换都要沿用。
|
/// 登录期内共享的「已解锁收费集」:播放页进出、feed 与全屏切换都要沿用。
|
||||||
late final UnlockedEpisodeRegistry _unlockedEpisodes =
|
late final UnlockedEpisodeRegistry _unlockedEpisodes =
|
||||||
UnlockedEpisodeRegistry();
|
UnlockedEpisodeRegistry();
|
||||||
@@ -218,6 +225,7 @@ class _LumaDramaAppState extends State<LumaDramaApp> {
|
|||||||
// 恢复本地令牌与设备号;未登录也能正常浏览,不阻塞首屏
|
// 恢复本地令牌与设备号;未登录也能正常浏览,不阻塞首屏
|
||||||
_auth.load();
|
_auth.load();
|
||||||
unawaited(_localeController.load());
|
unawaited(_localeController.load());
|
||||||
|
unawaited(_appConfigController.load());
|
||||||
// 登录/登出时同步收藏状态:收藏属于账号,不能跨账号串联
|
// 登录/登出时同步收藏状态:收藏属于账号,不能跨账号串联
|
||||||
_auth.addListener(_onAuthChanged);
|
_auth.addListener(_onAuthChanged);
|
||||||
unawaited(_favoriteController.load());
|
unawaited(_favoriteController.load());
|
||||||
@@ -252,6 +260,7 @@ class _LumaDramaAppState extends State<LumaDramaApp> {
|
|||||||
_walletController.dispose();
|
_walletController.dispose();
|
||||||
_interactionController.dispose();
|
_interactionController.dispose();
|
||||||
_localeController.dispose();
|
_localeController.dispose();
|
||||||
|
_appConfigController.dispose();
|
||||||
_apiClient.close();
|
_apiClient.close();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
@@ -259,7 +268,9 @@ class _LumaDramaAppState extends State<LumaDramaApp> {
|
|||||||
CategoryController _createCategories() {
|
CategoryController _createCategories() {
|
||||||
final controller = CategoryController(_categoryRepository);
|
final controller = CategoryController(_categoryRepository);
|
||||||
if (widget.catalogRepository == null) {
|
if (widget.catalogRepository == null) {
|
||||||
controller.dramaPageLoader = CategoryApi(_apiClient).dramas;
|
final api = CategoryApi(_apiClient);
|
||||||
|
controller.dramaPageLoader = api.dramas;
|
||||||
|
controller.rankingLoader = api.ranking;
|
||||||
}
|
}
|
||||||
controller.load();
|
controller.load();
|
||||||
return controller;
|
return controller;
|
||||||
@@ -304,6 +315,7 @@ class _LumaDramaAppState extends State<LumaDramaApp> {
|
|||||||
ChangeNotifierProvider.value(value: _walletController),
|
ChangeNotifierProvider.value(value: _walletController),
|
||||||
ChangeNotifierProvider.value(value: _interactionController),
|
ChangeNotifierProvider.value(value: _interactionController),
|
||||||
ChangeNotifierProvider.value(value: _localeController),
|
ChangeNotifierProvider.value(value: _localeController),
|
||||||
|
ChangeNotifierProvider.value(value: _appConfigController),
|
||||||
ChangeNotifierProvider.value(value: _auth),
|
ChangeNotifierProvider.value(value: _auth),
|
||||||
],
|
],
|
||||||
child: Consumer<LocaleController>(
|
child: Consumer<LocaleController>(
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// Author: fruit.com.cn
|
// Author: fruit.com.cn
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
import 'dev_config.dart';
|
import 'dev_config.dart';
|
||||||
import 'prod_config.dart';
|
import 'prod_config.dart';
|
||||||
|
|
||||||
@@ -9,12 +11,10 @@ import 'prod_config.dart';
|
|||||||
/// - `dev_config.dart`:[DevConfig](本机联调)
|
/// - `dev_config.dart`:[DevConfig](本机联调)
|
||||||
/// - `prod_config.dart`:[ProdConfig](生产)
|
/// - `prod_config.dart`:[ProdConfig](生产)
|
||||||
///
|
///
|
||||||
/// 切换环境只改下面这一个布尔值,不用传任何构建参数、也不做网络探测。
|
/// Debug 使用开发环境,Release 自动使用生产环境,不做网络探测。
|
||||||
abstract final class AppConfig {
|
abstract final class AppConfig {
|
||||||
/// **环境开关**:true 用开发环境,false 用生产环境。
|
/// **环境开关**:Debug 使用开发环境,Release 使用生产环境。
|
||||||
///
|
static const bool useDevConfig = !kReleaseMode;
|
||||||
/// 打生产包前必须改成 false;release 构建若仍为 true 会在启动时直接报错。
|
|
||||||
static const bool useDevConfig = true;
|
|
||||||
|
|
||||||
/// 当前选中的环境地址。
|
/// 当前选中的环境地址。
|
||||||
static String get baseUrl =>
|
static String get baseUrl =>
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
/// 开发环境配置。
|
/// 开发环境配置。
|
||||||
///
|
///
|
||||||
/// 本机联调用:换 Wi-Fi、换网段后只改这里的 [baseUrl],地址不要带结尾斜杠。
|
/// 本机联调用:模拟器与桌面端可直接用回环地址,但 iOS/Android 真机必须用
|
||||||
|
/// 开发机的局域网 IP(真机上的 127.0.0.1 指向手机自己)。地址不要带结尾斜杠。
|
||||||
abstract final class DevConfig {
|
abstract final class DevConfig {
|
||||||
/// 开发机后端地址。
|
/// 开发机后端地址(Mac 当前 Wi-Fi 地址,换网络后需要同步修改)。
|
||||||
static const String baseUrl = 'http://192.168.31.243:8081';
|
static const String baseUrl = 'http://192.168.31.243:8081';
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
// Author: fruit.com.cn
|
||||||
|
|
||||||
|
import 'drama.dart';
|
||||||
|
import 'locale_text.dart';
|
||||||
|
|
||||||
|
/// 服务端推荐榜快照;顺序和排名均不可在客户端重算。
|
||||||
|
class CategoryRanking {
|
||||||
|
const CategoryRanking({
|
||||||
|
required this.id,
|
||||||
|
required this.code,
|
||||||
|
required this.revision,
|
||||||
|
required this.entries,
|
||||||
|
this.locales = const {},
|
||||||
|
this.generatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
final String id;
|
||||||
|
final String code;
|
||||||
|
final String revision;
|
||||||
|
final Map<String, String> locales;
|
||||||
|
final DateTime? generatedAt;
|
||||||
|
final List<CategoryRankingEntry> entries;
|
||||||
|
|
||||||
|
/// 解析 `GET /app/categories/{id}/ranking`。
|
||||||
|
factory CategoryRanking.fromJson(Map<String, dynamic> json) {
|
||||||
|
final rawList = json['list'];
|
||||||
|
final entries = rawList is List
|
||||||
|
? rawList
|
||||||
|
.whereType<Map>()
|
||||||
|
.map(
|
||||||
|
(item) =>
|
||||||
|
CategoryRankingEntry.fromJson(item.cast<String, dynamic>()),
|
||||||
|
)
|
||||||
|
.toList(growable: false)
|
||||||
|
: const <CategoryRankingEntry>[];
|
||||||
|
return CategoryRanking(
|
||||||
|
id: (json['id'] ?? '').toString(),
|
||||||
|
code: json['code'] as String? ?? '',
|
||||||
|
revision: (json['revision'] ?? '1').toString(),
|
||||||
|
locales: localeMap(json['locales']),
|
||||||
|
generatedAt: DateTime.tryParse(json['generatedAt'] as String? ?? ''),
|
||||||
|
entries: entries,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 推荐榜中的一部短剧及其服务端排名。
|
||||||
|
class CategoryRankingEntry {
|
||||||
|
const CategoryRankingEntry({required this.rank, required this.drama});
|
||||||
|
|
||||||
|
final int rank;
|
||||||
|
final Drama drama;
|
||||||
|
|
||||||
|
factory CategoryRankingEntry.fromJson(Map<String, dynamic> json) {
|
||||||
|
final rawDrama = json['drama'];
|
||||||
|
return CategoryRankingEntry(
|
||||||
|
rank: (json['rank'] as num?)?.toInt() ?? 0,
|
||||||
|
drama: Drama.fromCardJson(
|
||||||
|
rawDrama is Map<String, dynamic>
|
||||||
|
? rawDrama
|
||||||
|
: rawDrama is Map
|
||||||
|
? rawDrama.cast<String, dynamic>()
|
||||||
|
: const <String, dynamic>{},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,10 +7,19 @@ class ContentCategory {
|
|||||||
const ContentCategory({
|
const ContentCategory({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.name,
|
required this.name,
|
||||||
|
this.code = '',
|
||||||
|
this.layoutType = gridLayout,
|
||||||
|
this.revision = '1',
|
||||||
this.locales = const {},
|
this.locales = const {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
static const String gridLayout = 'GRID';
|
||||||
|
static const String rankingLayout = 'RANKING';
|
||||||
|
|
||||||
final String id;
|
final String id;
|
||||||
|
final String code;
|
||||||
|
final String layoutType;
|
||||||
|
final String revision;
|
||||||
|
|
||||||
/// 中文名称,与 locales 里的 zh 相同。
|
/// 中文名称,与 locales 里的 zh 相同。
|
||||||
final String name;
|
final String name;
|
||||||
@@ -20,9 +29,18 @@ class ContentCategory {
|
|||||||
factory ContentCategory.fromJson(Map<String, dynamic> json) {
|
factory ContentCategory.fromJson(Map<String, dynamic> json) {
|
||||||
final locales = localeMap(json['locales']);
|
final locales = localeMap(json['locales']);
|
||||||
final name = json['name'] as String? ?? locales['zh'] ?? '';
|
final name = json['name'] as String? ?? locales['zh'] ?? '';
|
||||||
return ContentCategory(id: (json['id'] ?? '').toString(), name: name, locales: locales);
|
return ContentCategory(
|
||||||
|
id: (json['id'] ?? '').toString(),
|
||||||
|
name: name,
|
||||||
|
code: json['code'] as String? ?? '',
|
||||||
|
layoutType: json['layoutType'] as String? ?? gridLayout,
|
||||||
|
revision: (json['revision'] ?? '1').toString(),
|
||||||
|
locales: locales,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get isRanking => layoutType == rankingLayout;
|
||||||
|
|
||||||
/// 按界面语言取名称。缺对应语言时回落到中文。
|
/// 按界面语言取名称。缺对应语言时回落到中文。
|
||||||
String localizedName(String languageCode) {
|
String localizedName(String languageCode) {
|
||||||
return localizedText(languageCode, name, locales);
|
return localizedText(languageCode, name, locales);
|
||||||
|
|||||||
@@ -97,11 +97,13 @@ class Drama {
|
|||||||
required this.title,
|
required this.title,
|
||||||
required this.synopsis,
|
required this.synopsis,
|
||||||
required this.posterUrl,
|
required this.posterUrl,
|
||||||
|
this.coverLandscape = '',
|
||||||
this.episodes = const [],
|
this.episodes = const [],
|
||||||
this.titleLocales = const {},
|
this.titleLocales = const {},
|
||||||
this.synopsisLocales = const {},
|
this.synopsisLocales = const {},
|
||||||
this.tag = '',
|
this.tag = '',
|
||||||
this.tagLocales = const {},
|
this.tagLocales = const {},
|
||||||
|
this.tagCode = '',
|
||||||
this.tagColor = '',
|
this.tagColor = '',
|
||||||
this.category = '',
|
this.category = '',
|
||||||
this.categoryLocales = const {},
|
this.categoryLocales = const {},
|
||||||
@@ -127,8 +129,14 @@ class Drama {
|
|||||||
final Map<String, String> synopsisLocales;
|
final Map<String, String> synopsisLocales;
|
||||||
final String tag;
|
final String tag;
|
||||||
final Map<String, String> tagLocales;
|
final Map<String, String> tagLocales;
|
||||||
|
|
||||||
|
/// 标签语义码(如 `NEW_ARRIVAL`)。文案会随语言变,语义判断只认这个码。
|
||||||
|
final String tagCode;
|
||||||
final String tagColor;
|
final String tagColor;
|
||||||
final String posterUrl;
|
final String posterUrl;
|
||||||
|
|
||||||
|
/// 横版封面,用于继续观看横幅等横向展示位;为空时回退竖版 `posterUrl`。
|
||||||
|
final String coverLandscape;
|
||||||
final List<Episode> episodes;
|
final List<Episode> episodes;
|
||||||
final String category;
|
final String category;
|
||||||
final Map<String, String> categoryLocales;
|
final Map<String, String> categoryLocales;
|
||||||
@@ -172,8 +180,10 @@ class Drama {
|
|||||||
synopsisLocales: text.synopsisLocales,
|
synopsisLocales: text.synopsisLocales,
|
||||||
tag: text.tag,
|
tag: text.tag,
|
||||||
tagLocales: text.tagLocales,
|
tagLocales: text.tagLocales,
|
||||||
|
tagCode: (json['tagCode'] as String? ?? '').trim(),
|
||||||
tagColor: json['tagColor'] as String? ?? '',
|
tagColor: json['tagColor'] as String? ?? '',
|
||||||
posterUrl: json['cover'] as String? ?? '',
|
posterUrl: json['cover'] as String? ?? '',
|
||||||
|
coverLandscape: json['coverLandscape'] as String? ?? '',
|
||||||
episodes: preview is Map<String, dynamic>
|
episodes: preview is Map<String, dynamic>
|
||||||
? [Episode.fromJson(preview)]
|
? [Episode.fromJson(preview)]
|
||||||
: const [],
|
: const [],
|
||||||
@@ -204,8 +214,10 @@ class Drama {
|
|||||||
synopsisLocales: text.synopsisLocales,
|
synopsisLocales: text.synopsisLocales,
|
||||||
tag: text.tag,
|
tag: text.tag,
|
||||||
tagLocales: text.tagLocales,
|
tagLocales: text.tagLocales,
|
||||||
|
tagCode: (json['tagCode'] as String? ?? '').trim(),
|
||||||
tagColor: json['tagColor'] as String? ?? '',
|
tagColor: json['tagColor'] as String? ?? '',
|
||||||
posterUrl: json['cover'] as String? ?? '',
|
posterUrl: json['cover'] as String? ?? '',
|
||||||
|
coverLandscape: json['coverLandscape'] as String? ?? '',
|
||||||
category: text.category,
|
category: text.category,
|
||||||
categoryLocales: text.categoryLocales,
|
categoryLocales: text.categoryLocales,
|
||||||
types: text.types,
|
types: text.types,
|
||||||
@@ -315,7 +327,10 @@ class _DramaText {
|
|||||||
final category = _firstText(categoryLocales, json['category'], types);
|
final category = _firstText(categoryLocales, json['category'], types);
|
||||||
return _DramaText(
|
return _DramaText(
|
||||||
title: _firstText(titleLocales, json['title']),
|
title: _firstText(titleLocales, json['title']),
|
||||||
synopsis: _firstText(synopsisLocales, json['synopsis'] ?? json['description']),
|
synopsis: _firstText(
|
||||||
|
synopsisLocales,
|
||||||
|
json['synopsis'] ?? json['description'],
|
||||||
|
),
|
||||||
titleLocales: titleLocales,
|
titleLocales: titleLocales,
|
||||||
synopsisLocales: synopsisLocales,
|
synopsisLocales: synopsisLocales,
|
||||||
tag: _firstText(tagLocales, json['tag']),
|
tag: _firstText(tagLocales, json['tag']),
|
||||||
@@ -328,7 +343,11 @@ class _DramaText {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _firstText(Map<String, String> locales, Object? fallback, [List<Map<String, String>>? types]) {
|
String _firstText(
|
||||||
|
Map<String, String> locales,
|
||||||
|
Object? fallback, [
|
||||||
|
List<Map<String, String>>? types,
|
||||||
|
]) {
|
||||||
final chinese = locales['zh'] ?? '';
|
final chinese = locales['zh'] ?? '';
|
||||||
if (chinese.isNotEmpty) return chinese;
|
if (chinese.isNotEmpty) return chinese;
|
||||||
if (types != null && types.isNotEmpty) {
|
if (types != null && types.isNotEmpty) {
|
||||||
@@ -339,7 +358,9 @@ String _firstText(Map<String, String> locales, Object? fallback, [List<Map<Strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
String _genreText(List<Map<String, String>> types, Object? fallback) {
|
String _genreText(List<Map<String, String>> types, Object? fallback) {
|
||||||
final names = types.map((item) => item['zh'] ?? '').where((value) => value.isNotEmpty);
|
final names = types
|
||||||
|
.map((item) => item['zh'] ?? '')
|
||||||
|
.where((value) => value.isNotEmpty);
|
||||||
final joined = names.join(' / ');
|
final joined = names.join(' / ');
|
||||||
if (joined.isNotEmpty) return joined;
|
if (joined.isNotEmpty) return joined;
|
||||||
return fallback is String ? fallback : '';
|
return fallback is String ? fallback : '';
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ Map<String, String> localeMap(Object? raw) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// 按当前语言取文案。没有对应语言时用中文,中文也没有时用 fallback。
|
/// 按当前语言取文案。没有对应语言时用中文,中文也没有时用 fallback。
|
||||||
String localizedText(String languageCode, String fallback, Map<String, String> locales) {
|
String localizedText(
|
||||||
|
String languageCode,
|
||||||
|
String fallback,
|
||||||
|
Map<String, String> locales,
|
||||||
|
) {
|
||||||
final selected = locales[languageCode] ?? '';
|
final selected = locales[languageCode] ?? '';
|
||||||
if (selected.isNotEmpty) return selected;
|
if (selected.isNotEmpty) return selected;
|
||||||
final chinese = locales['zh'] ?? '';
|
final chinese = locales['zh'] ?? '';
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class WatchProgress {
|
|||||||
this.dramaTitle,
|
this.dramaTitle,
|
||||||
this.titleLocales = const {},
|
this.titleLocales = const {},
|
||||||
this.dramaCover,
|
this.dramaCover,
|
||||||
|
this.dramaCoverLandscape,
|
||||||
this.episodeNumber,
|
this.episodeNumber,
|
||||||
this.totalEpisodes,
|
this.totalEpisodes,
|
||||||
this.finished = false,
|
this.finished = false,
|
||||||
@@ -29,6 +30,9 @@ class WatchProgress {
|
|||||||
final String? dramaTitle;
|
final String? dramaTitle;
|
||||||
final Map<String, String> titleLocales;
|
final Map<String, String> titleLocales;
|
||||||
final String? dramaCover;
|
final String? dramaCover;
|
||||||
|
|
||||||
|
/// 横版封面,用于继续观看横幅等横向位;为空时回退 [dramaCover]。
|
||||||
|
final String? dramaCoverLandscape;
|
||||||
final int? episodeNumber;
|
final int? episodeNumber;
|
||||||
final int? totalEpisodes;
|
final int? totalEpisodes;
|
||||||
final Duration position;
|
final Duration position;
|
||||||
@@ -60,6 +64,7 @@ class WatchProgress {
|
|||||||
dramaTitle: json['dramaTitle']?.toString(),
|
dramaTitle: json['dramaTitle']?.toString(),
|
||||||
titleLocales: localeMap(json['titleLocales']),
|
titleLocales: localeMap(json['titleLocales']),
|
||||||
dramaCover: json['dramaCover']?.toString(),
|
dramaCover: json['dramaCover']?.toString(),
|
||||||
|
dramaCoverLandscape: json['dramaCoverLandscape']?.toString(),
|
||||||
episodeNumber: json['episodeNumber'] == null
|
episodeNumber: json['episodeNumber'] == null
|
||||||
? null
|
? null
|
||||||
: jsonToInt(json['episodeNumber']),
|
: jsonToInt(json['episodeNumber']),
|
||||||
@@ -83,6 +88,7 @@ class WatchProgress {
|
|||||||
if (dramaTitle != null) 'dramaTitle': dramaTitle,
|
if (dramaTitle != null) 'dramaTitle': dramaTitle,
|
||||||
if (titleLocales.isNotEmpty) 'titleLocales': titleLocales,
|
if (titleLocales.isNotEmpty) 'titleLocales': titleLocales,
|
||||||
if (dramaCover != null) 'dramaCover': dramaCover,
|
if (dramaCover != null) 'dramaCover': dramaCover,
|
||||||
|
if (dramaCoverLandscape != null) 'dramaCoverLandscape': dramaCoverLandscape,
|
||||||
if (episodeNumber != null) 'episodeNumber': episodeNumber,
|
if (episodeNumber != null) 'episodeNumber': episodeNumber,
|
||||||
if (totalEpisodes != null) 'totalEpisodes': totalEpisodes,
|
if (totalEpisodes != null) 'totalEpisodes': totalEpisodes,
|
||||||
'positionMs': position.inMilliseconds,
|
'positionMs': position.inMilliseconds,
|
||||||
|
|||||||
@@ -46,6 +46,14 @@ class WatchRecord {
|
|||||||
return pageCover.isNotEmpty ? pageCover : drama?.posterUrl ?? '';
|
return pageCover.isNotEmpty ? pageCover : drama?.posterUrl ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 横向展示位(继续观看横幅)优先用横版封面,缺省回退竖版。
|
||||||
|
String get displayLandscapeCover {
|
||||||
|
final pageLandscape = progress.dramaCoverLandscape?.trim() ?? '';
|
||||||
|
if (pageLandscape.isNotEmpty) return pageLandscape;
|
||||||
|
final landscape = drama?.coverLandscape.trim() ?? '';
|
||||||
|
return landscape.isNotEmpty ? landscape : displayCover;
|
||||||
|
}
|
||||||
|
|
||||||
/// 分页接口已带展示字段时无需等待详情加载。
|
/// 分页接口已带展示字段时无需等待详情加载。
|
||||||
bool get hasDisplayMetadata =>
|
bool get hasDisplayMetadata =>
|
||||||
displayTitle.isNotEmpty ||
|
displayTitle.isNotEmpty ||
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Author: fruit.com.cn
|
// Author: fruit.com.cn
|
||||||
|
|
||||||
import '../models/content_category.dart';
|
import '../models/content_category.dart';
|
||||||
|
import '../models/category_ranking.dart';
|
||||||
import '../models/drama.dart';
|
import '../models/drama.dart';
|
||||||
import '../models/page_result.dart';
|
import '../models/page_result.dart';
|
||||||
import 'api_client.dart';
|
import 'api_client.dart';
|
||||||
@@ -30,11 +31,14 @@ class CategoryApi {
|
|||||||
}) async {
|
}) async {
|
||||||
final data = await _client.get(
|
final data = await _client.get(
|
||||||
'/app/categories/$categoryId/dramas',
|
'/app/categories/$categoryId/dramas',
|
||||||
query: {
|
query: {'pageIndex': '$pageIndex', 'pageSize': '$pageSize'},
|
||||||
'pageIndex': '$pageIndex',
|
|
||||||
'pageSize': '$pageSize',
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
return PageResult.parse(data, Drama.fromCardJson);
|
return PageResult.parse(data, Drama.fromCardJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 推荐榜快照,服务端已确定内容顺序和连续排名。
|
||||||
|
Future<CategoryRanking> ranking(String categoryId) async {
|
||||||
|
final data = await _client.get('/app/categories/$categoryId/ranking');
|
||||||
|
return CategoryRanking.fromJson(ResponseDecoders.asMap(data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Author: fruit.com.cn
|
||||||
|
|
||||||
|
import 'api_client.dart';
|
||||||
|
|
||||||
|
/// 启动配置:`GET /app/config`(匿名,后台只下发白名单键)。
|
||||||
|
class ConfigApi {
|
||||||
|
const ConfigApi(this._client);
|
||||||
|
|
||||||
|
final ApiClient _client;
|
||||||
|
|
||||||
|
/// 白名单配置表;结构异常时返回空表,调用方按本地默认处理。
|
||||||
|
Future<Map<String, dynamic>> appConfig() async {
|
||||||
|
final data = await _client.get('/app/config');
|
||||||
|
return data is Map<String, dynamic> ? data : const <String, dynamic>{};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
// Author: fruit.com.cn
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
|
import '../remote/config_api.dart';
|
||||||
|
|
||||||
|
/// 后台下发的启动配置。
|
||||||
|
///
|
||||||
|
/// 失败一律静默:拿不到就用 App 内置默认,不阻塞启动、不弹错。
|
||||||
|
class AppConfigController extends ChangeNotifier {
|
||||||
|
AppConfigController(this._api);
|
||||||
|
|
||||||
|
final ConfigApi _api;
|
||||||
|
|
||||||
|
String _loginBackgroundUrl = '';
|
||||||
|
|
||||||
|
/// 登录页整屏背景图;空串表示用本地默认图。
|
||||||
|
String get loginBackgroundUrl => _loginBackgroundUrl;
|
||||||
|
|
||||||
|
Future<void> load() async {
|
||||||
|
try {
|
||||||
|
final config = await _api.appConfig();
|
||||||
|
final url = (config['loginBackgroundUrl'] as String? ?? '').trim();
|
||||||
|
if (url == _loginBackgroundUrl) return;
|
||||||
|
_loginBackgroundUrl = url;
|
||||||
|
notifyListeners();
|
||||||
|
} catch (error) {
|
||||||
|
debugPrint('[config] load failed: $error');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart';
|
|||||||
|
|
||||||
import '../../config/app_config.dart';
|
import '../../config/app_config.dart';
|
||||||
import '../models/content_category.dart';
|
import '../models/content_category.dart';
|
||||||
|
import '../models/category_ranking.dart';
|
||||||
import '../models/drama.dart';
|
import '../models/drama.dart';
|
||||||
import '../models/home_feed.dart';
|
import '../models/home_feed.dart';
|
||||||
import '../models/page_result.dart';
|
import '../models/page_result.dart';
|
||||||
@@ -21,10 +22,15 @@ class CategoryController extends ChangeNotifier {
|
|||||||
String categoryId, {
|
String categoryId, {
|
||||||
int pageIndex,
|
int pageIndex,
|
||||||
int pageSize,
|
int pageSize,
|
||||||
})? dramaPageLoader;
|
})?
|
||||||
|
dramaPageLoader;
|
||||||
|
|
||||||
|
/// 生产环境推荐榜加载器,测试与本地数据模式可不注入。
|
||||||
|
Future<CategoryRanking> Function(String categoryId)? rankingLoader;
|
||||||
|
|
||||||
List<ContentCategory> categories = const [];
|
List<ContentCategory> categories = const [];
|
||||||
final Map<String, CategoryDramaSlot> _slots = {};
|
final Map<String, CategoryDramaSlot> _slots = {};
|
||||||
|
final Map<String, CategoryRankingSlot> _rankingSlots = {};
|
||||||
HomeFeed feed = const HomeFeed();
|
HomeFeed feed = const HomeFeed();
|
||||||
bool loading = false;
|
bool loading = false;
|
||||||
String? error;
|
String? error;
|
||||||
@@ -36,6 +42,29 @@ class CategoryController extends ChangeNotifier {
|
|||||||
return _slots.putIfAbsent(categoryId, CategoryDramaSlot.new);
|
return _slots.putIfAbsent(categoryId, CategoryDramaSlot.new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CategoryRankingSlot rankingSlotOf(String categoryId) {
|
||||||
|
return _rankingSlots.putIfAbsent(categoryId, CategoryRankingSlot.new);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 打开推荐榜并获取当前服务端快照。
|
||||||
|
Future<void> openRanking(String categoryId) async {
|
||||||
|
final loader = rankingLoader;
|
||||||
|
if (loader == null) return;
|
||||||
|
final slot = rankingSlotOf(categoryId);
|
||||||
|
slot.loading = true;
|
||||||
|
slot.error = null;
|
||||||
|
_notify();
|
||||||
|
try {
|
||||||
|
slot.ranking = await loader(categoryId);
|
||||||
|
} catch (exception) {
|
||||||
|
slot.error = exception;
|
||||||
|
if (kDebugMode) debugPrint('[category-ranking] $exception');
|
||||||
|
} finally {
|
||||||
|
slot.loading = false;
|
||||||
|
_notify();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// 打开分类并加载第一页短剧。
|
/// 打开分类并加载第一页短剧。
|
||||||
Future<void> openCategory(String categoryId) async {
|
Future<void> openCategory(String categoryId) async {
|
||||||
final loader = dramaPageLoader;
|
final loader = dramaPageLoader;
|
||||||
@@ -126,8 +155,14 @@ class CategoryController extends ChangeNotifier {
|
|||||||
loading = false;
|
loading = false;
|
||||||
_notify();
|
_notify();
|
||||||
}
|
}
|
||||||
if (error == null && dramaPageLoader != null && categories.isNotEmpty) {
|
final hasRemoteLoader = dramaPageLoader != null || rankingLoader != null;
|
||||||
await openCategory(categories.first.id);
|
if (error == null && hasRemoteLoader && categories.isNotEmpty) {
|
||||||
|
final first = categories.first;
|
||||||
|
if (first.isRanking) {
|
||||||
|
await openRanking(first.id);
|
||||||
|
} else {
|
||||||
|
await openCategory(first.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,3 +187,10 @@ class CategoryDramaSlot {
|
|||||||
|
|
||||||
bool get hasMore => dramas.length < total;
|
bool get hasMore => dramas.length < total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 单个推荐榜的快照状态。
|
||||||
|
class CategoryRankingSlot {
|
||||||
|
CategoryRanking? ranking;
|
||||||
|
Object? error;
|
||||||
|
bool loading = false;
|
||||||
|
}
|
||||||
@@ -120,7 +120,9 @@ class DownloadController extends ChangeNotifier {
|
|||||||
String episodeId, {
|
String episodeId, {
|
||||||
DownloadLicense? license,
|
DownloadLicense? license,
|
||||||
}) async {
|
}) async {
|
||||||
if (_downloading.contains(episodeId)) return const DownloadActionResult(ok: true);
|
if (_downloading.contains(episodeId)) {
|
||||||
|
return const DownloadActionResult(ok: true);
|
||||||
|
}
|
||||||
final source = license ?? _licenseFor(episodeId);
|
final source = license ?? _licenseFor(episodeId);
|
||||||
if (source == null) return const DownloadActionResult(ok: false);
|
if (source == null) return const DownloadActionResult(ok: false);
|
||||||
_beginDownload(episodeId);
|
_beginDownload(episodeId);
|
||||||
@@ -129,7 +131,8 @@ class DownloadController extends ChangeNotifier {
|
|||||||
final media = await _storage.download(
|
final media = await _storage.download(
|
||||||
episodeId: episodeId,
|
episodeId: episodeId,
|
||||||
url: resolved,
|
url: resolved,
|
||||||
onProgress: (received, total) => _onProgress(episodeId, received, total),
|
onProgress: (received, total) =>
|
||||||
|
_onProgress(episodeId, received, total),
|
||||||
);
|
);
|
||||||
_localPaths[episodeId] = media.filePath;
|
_localPaths[episodeId] = media.filePath;
|
||||||
_progress[episodeId] = 1;
|
_progress[episodeId] = 1;
|
||||||
|
|||||||
@@ -33,10 +33,15 @@ class PlaybackPositionCache {
|
|||||||
PlaybackPositionCache({
|
PlaybackPositionCache({
|
||||||
DateTime Function()? now,
|
DateTime Function()? now,
|
||||||
this.maxAge = _defaultMaxAge,
|
this.maxAge = _defaultMaxAge,
|
||||||
|
this.maxEntries = defaultMaxEntries,
|
||||||
}) : _now = now ?? DateTime.now;
|
}) : _now = now ?? DateTime.now;
|
||||||
|
|
||||||
|
/// 最多保留的集数:长会话连看几十部剧也不至于让 Map 无限增长。
|
||||||
|
static const int defaultMaxEntries = 100;
|
||||||
|
|
||||||
final DateTime Function() _now;
|
final DateTime Function() _now;
|
||||||
final Duration maxAge;
|
final Duration maxAge;
|
||||||
|
final int maxEntries;
|
||||||
final Map<String, CachedPlaybackPosition> _positions = {};
|
final Map<String, CachedPlaybackPosition> _positions = {};
|
||||||
|
|
||||||
/// 保存最近有效播放位置;零位置不会覆盖已有记录。
|
/// 保存最近有效播放位置;零位置不会覆盖已有记录。
|
||||||
@@ -57,6 +62,24 @@ class PlaybackPositionCache {
|
|||||||
duration: duration,
|
duration: duration,
|
||||||
updatedAt: _now(),
|
updatedAt: _now(),
|
||||||
);
|
);
|
||||||
|
_evictOverflow();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 超出上限时按写入时间淘汰最旧的一条,避免长会话内存只增不减。
|
||||||
|
void _evictOverflow() {
|
||||||
|
while (maxEntries > 0 && _positions.length > maxEntries) {
|
||||||
|
String? oldestKey;
|
||||||
|
DateTime? oldestAt;
|
||||||
|
for (final entry in _positions.entries) {
|
||||||
|
final at = entry.value.updatedAt;
|
||||||
|
if (oldestAt == null || at.isBefore(oldestAt)) {
|
||||||
|
oldestAt = at;
|
||||||
|
oldestKey = entry.key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (oldestKey == null) return;
|
||||||
|
_positions.remove(oldestKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 读取同剧同集且未过期的最近位置。
|
/// 读取同剧同集且未过期的最近位置。
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import 'package:dio/dio.dart';
|
|||||||
|
|
||||||
import '../../config/app_config.dart';
|
import '../../config/app_config.dart';
|
||||||
|
|
||||||
const int spriteThumbnailDecodeMaxDimension = 2048;
|
/// 雪碧图解码上限:擦洗预览只占很小一块区域,2048 会让单张位图膨胀到 16MB。
|
||||||
|
const int spriteThumbnailDecodeMaxDimension = 1024;
|
||||||
|
|
||||||
/// VTT 资源拒绝访问,服务层据此清缓存并重试一次。
|
/// VTT 资源拒绝访问,服务层据此清缓存并重试一次。
|
||||||
class SpriteThumbnailForbiddenException implements Exception {
|
class SpriteThumbnailForbiddenException implements Exception {
|
||||||
|
|||||||
@@ -21,23 +21,29 @@ class WalletController extends ChangeNotifier {
|
|||||||
String? unlockError;
|
String? unlockError;
|
||||||
String? unlockingEpisodeId;
|
String? unlockingEpisodeId;
|
||||||
bool _disposed = false;
|
bool _disposed = false;
|
||||||
|
int _requestSeq = 0;
|
||||||
|
|
||||||
int get balance => snapshot?.wallet.coinBalance ?? 0;
|
int get balance => snapshot?.wallet.coinBalance ?? 0;
|
||||||
List<CoinLedgerEntry> get ledger => snapshot?.ledger ?? const [];
|
List<CoinLedgerEntry> get ledger => snapshot?.ledger ?? const [];
|
||||||
|
|
||||||
Future<void> load() async {
|
Future<void> load() async {
|
||||||
|
if (_disposed) return;
|
||||||
|
final request = ++_requestSeq;
|
||||||
loading = true;
|
loading = true;
|
||||||
error = null;
|
error = null;
|
||||||
_notify();
|
_notify();
|
||||||
try {
|
try {
|
||||||
snapshot = await _repository.fetchWallet();
|
final result = await _repository.fetchWallet();
|
||||||
|
if (_isCurrent(request)) snapshot = result;
|
||||||
} on ApiException catch (exception) {
|
} on ApiException catch (exception) {
|
||||||
error = exception.message;
|
if (_isCurrent(request)) error = exception.message;
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
error = 'walletLoadFailed';
|
if (_isCurrent(request)) error = 'walletLoadFailed';
|
||||||
} finally {
|
} finally {
|
||||||
loading = false;
|
if (_isCurrent(request)) {
|
||||||
_notify();
|
loading = false;
|
||||||
|
_notify();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,6 +81,7 @@ class WalletController extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void reset() {
|
void reset() {
|
||||||
|
_requestSeq += 1;
|
||||||
snapshot = null;
|
snapshot = null;
|
||||||
loading = false;
|
loading = false;
|
||||||
unlocking = false;
|
unlocking = false;
|
||||||
@@ -88,6 +95,8 @@ class WalletController extends ChangeNotifier {
|
|||||||
if (!_disposed) notifyListeners();
|
if (!_disposed) notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _isCurrent(int request) => !_disposed && request == _requestSeq;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_disposed = true;
|
_disposed = true;
|
||||||
|
|||||||
@@ -227,14 +227,17 @@ class WatchRecordsController extends PagedListController<WatchRecord> {
|
|||||||
);
|
);
|
||||||
return detail;
|
return detail;
|
||||||
} catch (failure, stackTrace) {
|
} catch (failure, stackTrace) {
|
||||||
debugPrint(
|
// 弱网时详情会成批失败,release 下不需要逐条打堆栈。
|
||||||
'[WatchRecordsController] detail failed dramaId=$dramaId '
|
if (kDebugMode) {
|
||||||
'${failure.runtimeType}: $failure',
|
debugPrint(
|
||||||
);
|
'[WatchRecordsController] detail failed dramaId=$dramaId '
|
||||||
debugPrintStack(
|
'${failure.runtimeType}: $failure',
|
||||||
stackTrace: stackTrace,
|
);
|
||||||
label: '[WatchRecordsController] detail failed dramaId=$dramaId',
|
debugPrintStack(
|
||||||
);
|
stackTrace: stackTrace,
|
||||||
|
label: '[WatchRecordsController] detail failed dramaId=$dramaId',
|
||||||
|
);
|
||||||
|
}
|
||||||
if (isDisposed) return null;
|
if (isDisposed) return null;
|
||||||
final current = _recordIndex(dramaId);
|
final current = _recordIndex(dramaId);
|
||||||
if (current < 0) return null;
|
if (current < 0) return null;
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ abstract final class AppColors {
|
|||||||
static const overlaySecondary = Color(0xFFC7C7CC);
|
static const overlaySecondary = Color(0xFFC7C7CC);
|
||||||
static const overlayLabel = Color(0xFFE6E6EB);
|
static const overlayLabel = Color(0xFFE6E6EB);
|
||||||
|
|
||||||
|
/// 首页及剧集播放页视频信息文案:参考设计图的 65% 半透明白。
|
||||||
|
static const homeFeedVideoCopy = Color(0xA6FFFFFF);
|
||||||
|
|
||||||
/// 主操作、选中态、播放进度。旧品牌橙已全量映射为品牌红(2026-10 改版)。
|
/// 主操作、选中态、播放进度。旧品牌橙已全量映射为品牌红(2026-10 改版)。
|
||||||
static const blue = Color(0xFFF04E4E);
|
static const blue = Color(0xFFF04E4E);
|
||||||
static const primary = blue;
|
static const primary = blue;
|
||||||
@@ -48,10 +51,20 @@ abstract final class AppColors {
|
|||||||
static const vipGoldStart = Color(0xFFF5D9A0);
|
static const vipGoldStart = Color(0xFFF5D9A0);
|
||||||
static const vipGoldEnd = Color(0xFFE8B65A);
|
static const vipGoldEnd = Color(0xFFE8B65A);
|
||||||
|
|
||||||
/// 「我的」页 VIP 卡的浅香槟金(见设计稿,接近纯色)。
|
/// 「我的」页 VIP 卡:品牌酒红、暖黑与香槟金共同形成会员层级。
|
||||||
static const vipCardStart = Color(0xFFF6E8C6);
|
static const vipCardStart = Color(0xFF351318);
|
||||||
static const vipCardEnd = Color(0xFFEDD9A8);
|
static const vipCardMiddle = Color(0xFF1B1112);
|
||||||
static const vipBadgeSurface = Color(0x1F3D2408);
|
static const vipCardEnd = Color(0xFF0D0B0C);
|
||||||
|
static const vipCardBorder = Color(0x66F5D9A0);
|
||||||
|
static const vipCardRedGlow = Color(0x52F04E4E);
|
||||||
|
static const vipCardGoldGlow = Color(0x38F3B34C);
|
||||||
|
static const vipCardText = Color(0xFFFFF5E6);
|
||||||
|
static const vipCardMuted = Color(0xB3F5D9A0);
|
||||||
|
static const vipBadgeSurface = Color(0x24FFFFFF);
|
||||||
|
static const vipBenefitSurface = Color(0x12FFFFFF);
|
||||||
|
static const vipBenefitBorder = Color(0x33F5D9A0);
|
||||||
|
static const vipButtonStart = brandRed;
|
||||||
|
static const vipButtonEnd = Color(0xFFFF745E);
|
||||||
static const bronze = Color(0xFFCD7F32);
|
static const bronze = Color(0xFFCD7F32);
|
||||||
static const bronzeDeep = Color(0xFFA9713A);
|
static const bronzeDeep = Color(0xFFA9713A);
|
||||||
static const rankSilver = Color(0xFFC0C0C0);
|
static const rankSilver = Color(0xFFC0C0C0);
|
||||||
@@ -113,9 +126,18 @@ abstract final class AppColors {
|
|||||||
static const mineGridSurface = Color(0x99101010);
|
static const mineGridSurface = Color(0x99101010);
|
||||||
static const minePanelSurface = Color(0xFF101010);
|
static const minePanelSurface = Color(0xFF101010);
|
||||||
static const mineMoreDivider = Color(0xFF1C1C1E);
|
static const mineMoreDivider = Color(0xFF1C1C1E);
|
||||||
static const mineGridDivider = Color(0xFF2A2A2A);
|
static const mineGridDivider = Color(0x10FFFFFF);
|
||||||
static const mineGridIconSurface = Color(0xFF1C1C1E);
|
static const mineGridIconSurface = Color(0xFF1C1C1E);
|
||||||
static const mineGridLabel = Color(0xFFE6E6EB);
|
static const mineGridLabel = Color(0xFFE6E6EB);
|
||||||
|
static const mineGridIconAccent = brandRed;
|
||||||
|
|
||||||
|
/// 个人数据图标:品牌红的亮面、暗部与暖白反光。
|
||||||
|
static const mineStatHighlight = Color(0xFFFFAAA3);
|
||||||
|
static const mineStatShade = Color(0xFFAF263C);
|
||||||
|
static const mineStatDepth = Color(0xFF681D2B);
|
||||||
|
static const mineStatGlint = Color(0xFFFFE8E2);
|
||||||
|
static const mineStatEdge = Color(0x80FFD1CB);
|
||||||
|
static const mineStatGlow = Color(0x24F04E4E);
|
||||||
static const mineIconWallet = Color(0xFFF5C451);
|
static const mineIconWallet = Color(0xFFF5C451);
|
||||||
static const mineIconDownloads = Color(0xFF4DA3FF);
|
static const mineIconDownloads = Color(0xFF4DA3FF);
|
||||||
static const mineIconHistory = Color(0xFF4ADE80);
|
static const mineIconHistory = Color(0xFF4ADE80);
|
||||||
@@ -134,6 +156,10 @@ abstract final class AppColors {
|
|||||||
/// 列表底部「没有更多了」这类弱提示。
|
/// 列表底部「没有更多了」这类弱提示。
|
||||||
static const textHint = Color(0xFF5C5C60);
|
static const textHint = Color(0xFF5C5C60);
|
||||||
static const textTabInactive = Color(0xFFB0B0B0);
|
static const textTabInactive = Color(0xFFB0B0B0);
|
||||||
|
|
||||||
|
/// 首页顶部三项导航未选中文字,略暗于选中白色但保持清晰。
|
||||||
|
static const homeTabInactive = Color(0xFFC7C7CC);
|
||||||
|
|
||||||
static const textFilterIcon = Color(0xFF7A7A7E);
|
static const textFilterIcon = Color(0xFF7A7A7E);
|
||||||
static const searchResultMeta = Color(0xFF9E9E9E);
|
static const searchResultMeta = Color(0xFF9E9E9E);
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ abstract final class AppDimens {
|
|||||||
static const double previewSectionTitle = 14;
|
static const double previewSectionTitle = 14;
|
||||||
static const double chipFont = 10;
|
static const double chipFont = 10;
|
||||||
static const double navLabel = 13;
|
static const double navLabel = 13;
|
||||||
static const double navLabelGap = 5;
|
static const double navLabelGap = 1;
|
||||||
|
|
||||||
static const double buttonHeight = 48;
|
static const double buttonHeight = 48;
|
||||||
static const double primaryButtonHeight = 52;
|
static const double primaryButtonHeight = 52;
|
||||||
@@ -141,7 +141,7 @@ abstract final class AppDimens {
|
|||||||
static const double homePrimarySecondaryGap = 8;
|
static const double homePrimarySecondaryGap = 8;
|
||||||
static const double homeSecondaryGridGap = 10;
|
static const double homeSecondaryGridGap = 10;
|
||||||
static const double homeHeaderIcon = 22;
|
static const double homeHeaderIcon = 22;
|
||||||
static const double homeActionSlot = 40;
|
static const double homeActionSlot = tapTarget;
|
||||||
static const double homeActionIcon = 30;
|
static const double homeActionIcon = 30;
|
||||||
static const double homeActionGap = 6;
|
static const double homeActionGap = 6;
|
||||||
|
|
||||||
@@ -150,24 +150,16 @@ abstract final class AppDimens {
|
|||||||
static const double recommendSectionTitle = 17;
|
static const double recommendSectionTitle = 17;
|
||||||
static const double recommendSectionSubtitle = 11;
|
static const double recommendSectionSubtitle = 11;
|
||||||
static const double recommendSectionMore = 12;
|
static const double recommendSectionMore = 12;
|
||||||
// 封面 122*(4/3)≈163 + 间距6 + 两行标题39 + 间距6 + 标签13 ≈ 227。
|
// 封面 122*(4/3)≈163 + 间距6 + 两行标题≈42 + 间距6 + 标签≈13 ≈ 230,留 6 余量。
|
||||||
static const double recommendRowHeight = 228;
|
static const double recommendRowHeight = 236;
|
||||||
static const double recommendCardWidth = 122;
|
static const double recommendCardWidth = 122;
|
||||||
|
|
||||||
/// 首页热播榜。
|
/// 首页热播榜。
|
||||||
static const double rankingHeroTitle = 22;
|
static const double rankingHeroTitle = 22;
|
||||||
static const double rankingHeroSubtitle = 11;
|
static const double rankingHeroSubtitle = 11;
|
||||||
static const double rankingPodiumChampionWidth = 110;
|
|
||||||
static const double rankingPodiumChampionHeight = 146;
|
|
||||||
static const double rankingPodiumWidth = 92;
|
|
||||||
static const double rankingPodiumHeight = 122;
|
|
||||||
static const double rankingPodiumRadius = 10;
|
|
||||||
static const double rankingRowHeight = 96;
|
|
||||||
static const double rankingNumberWidth = 56;
|
|
||||||
static const double rankingNumberFont = 48;
|
|
||||||
static const double rankingCoverWidth = 60;
|
|
||||||
static const double rankingCoverHeight = 80;
|
|
||||||
static const double rankingCoverRadius = 6;
|
static const double rankingCoverRadius = 6;
|
||||||
|
static const double rankingCardCoverWidth = 96;
|
||||||
|
static const double rankingCardCoverHeight = 128;
|
||||||
|
|
||||||
/// 全部短剧筛选与追剧双列。
|
/// 全部短剧筛选与追剧双列。
|
||||||
static const double filterChipFont = 16;
|
static const double filterChipFont = 16;
|
||||||
@@ -184,14 +176,14 @@ abstract final class AppDimens {
|
|||||||
static const double followingTabFont = 18;
|
static const double followingTabFont = 18;
|
||||||
static const double followingTabGap = 24;
|
static const double followingTabGap = 24;
|
||||||
static const double followingEditIconSize = 20;
|
static const double followingEditIconSize = 20;
|
||||||
static const double followingEditHitSize = 40;
|
static const double followingEditHitSize = tapTarget;
|
||||||
static const double followingAddIconSize = 20;
|
static const double followingAddIconSize = 20;
|
||||||
static const double followingAddIconStroke = 1.5;
|
static const double followingAddIconStroke = 1.5;
|
||||||
static const double followingGridGap = 6;
|
static const double followingGridGap = 6;
|
||||||
static const double followingGridRowGap = 12;
|
static const double followingGridRowGap = 12;
|
||||||
// 单行标题 16*1.3=20.8 + 间距 6+4 + 副标题行高约 18.6 ≈ 49.4,留 0.6 余量;
|
|
||||||
// 按 48 估算在副标题行高偏高的字体下会溢出 1~2px。
|
/// 追剧网格卡文字区:间距 6 + 两行剧名 16*1.3*2=41.6 ≈ 48,留 4 余量。
|
||||||
static const double followingCardTextExtent = 50;
|
static const double followingCardTextExtent = 52;
|
||||||
static const double followingSubtitleFont = 12;
|
static const double followingSubtitleFont = 12;
|
||||||
static const double followingSubtitleGap = 4;
|
static const double followingSubtitleGap = 4;
|
||||||
static const double followingProgressHeight = 2;
|
static const double followingProgressHeight = 2;
|
||||||
@@ -269,32 +261,44 @@ abstract final class AppDimens {
|
|||||||
static const double mineGridIconSurface = 44;
|
static const double mineGridIconSurface = 44;
|
||||||
static const double mineGridIcon = 22;
|
static const double mineGridIcon = 22;
|
||||||
static const double mineGridLabel = 12;
|
static const double mineGridLabel = 12;
|
||||||
|
static const double mineGridLabelLineHeight = 1.15;
|
||||||
static const double mineGridDividerWidth = 1;
|
static const double mineGridDividerWidth = 1;
|
||||||
|
|
||||||
|
/// 宫格内部分隔线:0.5pt 发丝线,深色底上比 1pt 更轻。
|
||||||
|
static const double mineGridHairline = 0.5;
|
||||||
|
static const int mineGridRows = 2;
|
||||||
|
static const double mineGridHeight =
|
||||||
|
mineGridCellHeight * mineGridRows + mineGridHairline;
|
||||||
static const double mineSectionTitleFont = 16;
|
static const double mineSectionTitleFont = 16;
|
||||||
static const double mineSectionLinkFont = 12;
|
static const double mineSectionLinkFont = 12;
|
||||||
static const double mineSectionGap = 12;
|
static const double mineSectionGap = 12;
|
||||||
|
|
||||||
/// 「我的」页新版:快捷图标行与服务列表。
|
/// 「我的」页会员卡。高度由内容撑开,上下内边距恒为 [mineVipPadding]。
|
||||||
static const double mineQuickActionIcon = 28;
|
static const double mineVipRadius = 18;
|
||||||
static const double mineQuickActionLabelFont = 14;
|
static const double mineVipPadding = 16;
|
||||||
static const double mineQuickActionGap = 8;
|
static const double mineVipTitleFont = 22;
|
||||||
static const double mineServiceRowHeight = 56;
|
static const double mineVipSubtitleFont = 12;
|
||||||
static const double mineServiceIcon = 24;
|
static const double mineVipEmblem = 48;
|
||||||
static const double mineServiceTitleFont = 16;
|
static const double mineVipEmblemIcon = 28;
|
||||||
static const double mineServiceValueFont = 14;
|
static const double mineVipActionWidth = 100;
|
||||||
static const double mineVipBenefitFont = 14;
|
static const double mineVipBenefitFont = 10.5;
|
||||||
static const double mineVipBenefitIcon = 20;
|
static const double mineVipBenefitBox = 34;
|
||||||
static const double mineVipBenefitBox = 30;
|
static const double mineVipBenefitBoxRadius = 11;
|
||||||
static const double mineVipBenefitBoxRadius = 7;
|
static const double mineVipBenefitGlyph = 19;
|
||||||
static const double mineVipBenefitGlyph = 17;
|
static const double mineVipBenefitRowGap = 6;
|
||||||
static const double mineVipBenefitRowGap = 4;
|
static const double mineVipButtonHeight = tapTarget;
|
||||||
static const double mineVipButtonHeight = 36;
|
|
||||||
static const double mineContinueCardWidth = 96;
|
static const double mineContinueCardWidth = 96;
|
||||||
static const double mineContinueRowHeight = 172;
|
static const double mineContinueRowHeight = 172;
|
||||||
static const double mineContinueTitleFont = 13;
|
static const double mineContinueTitleFont = 13;
|
||||||
static const double mineContinueMetaFont = 11;
|
static const double mineContinueMetaFont = 11;
|
||||||
static const double mineStatsValueFont = 18;
|
static const double mineStatsValueFont = 24;
|
||||||
static const double mineStatsLabelFont = 11;
|
static const double mineStatsLabelFont = 12;
|
||||||
|
static const double mineStatsIcon = 42;
|
||||||
|
static const double mineStatsMinHeight = 104;
|
||||||
|
static const double mineStatsDividerHeight = 32;
|
||||||
|
static const double mineStatsDividerWidth = 0.5;
|
||||||
|
static const double mineStatsValueLineHeight = 1.1;
|
||||||
|
static const double mineStatsLabelLineHeight = 1.25;
|
||||||
static const double minePanelPadding = 12;
|
static const double minePanelPadding = 12;
|
||||||
static const double mineMoreRowHeight = 52;
|
static const double mineMoreRowHeight = 52;
|
||||||
static const double mineMoreFont = 15;
|
static const double mineMoreFont = 15;
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
// Author: fruit.com.cn
|
||||||
|
// 职责:固定顶部导航文字排版,以绘制缩放和颜色插值实现选中切换。
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../theme/app_colors.dart';
|
||||||
|
import '../theme/app_dimens.dart';
|
||||||
|
|
||||||
|
const double _inactiveScale = 0.9;
|
||||||
|
|
||||||
|
/// 保留最大字号、固定字重与占位,避免选中动画触发相邻标签重新布局。
|
||||||
|
class AnimatedNavLabel extends StatelessWidget {
|
||||||
|
/// [style] 指定选中态字号与颜色;字重固定,未指定时默认加粗。
|
||||||
|
const AnimatedNavLabel({
|
||||||
|
super.key,
|
||||||
|
required this.label,
|
||||||
|
required this.selected,
|
||||||
|
required this.style,
|
||||||
|
this.alignment = Alignment.bottomCenter,
|
||||||
|
this.selectionProgress,
|
||||||
|
this.inactiveColor = AppColors.textTabInactive,
|
||||||
|
});
|
||||||
|
|
||||||
|
final String label;
|
||||||
|
final bool selected;
|
||||||
|
final TextStyle style;
|
||||||
|
final Alignment alignment;
|
||||||
|
|
||||||
|
/// 未选中文字颜色;默认保持通用导航原有灰色。
|
||||||
|
final Color inactiveColor;
|
||||||
|
|
||||||
|
/// 页面拖动时直接使用连续进度,避免再叠加一层延迟动画。
|
||||||
|
final double? selectionProgress;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final target = selected ? 1.0 : 0.0;
|
||||||
|
final reduceMotion = MediaQuery.disableAnimationsOf(context);
|
||||||
|
return Semantics(
|
||||||
|
selected: selected,
|
||||||
|
child: selectionProgress != null
|
||||||
|
? _label(selectionProgress!.clamp(0.0, 1.0))
|
||||||
|
: TweenAnimationBuilder<double>(
|
||||||
|
tween: Tween(begin: target, end: target),
|
||||||
|
duration: reduceMotion
|
||||||
|
? Duration.zero
|
||||||
|
: AppDimens.homePrimaryTabAnimationDuration,
|
||||||
|
curve: Curves.easeOut,
|
||||||
|
builder: (context, progress, _) => _label(progress),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _label(double progress) => Transform.scale(
|
||||||
|
scale: _inactiveScale + (1 - _inactiveScale) * progress,
|
||||||
|
alignment: alignment,
|
||||||
|
child: Text(
|
||||||
|
label,
|
||||||
|
maxLines: 1,
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
style: style.copyWith(
|
||||||
|
fontWeight: style.fontWeight ?? FontWeight.w700,
|
||||||
|
letterSpacing: 0,
|
||||||
|
color: Color.lerp(
|
||||||
|
inactiveColor,
|
||||||
|
style.color ?? AppColors.textPrimary,
|
||||||
|
progress,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -5,6 +5,8 @@ import 'package:flutter/material.dart';
|
|||||||
import '../theme/app_colors.dart';
|
import '../theme/app_colors.dart';
|
||||||
import '../theme/app_dimens.dart';
|
import '../theme/app_dimens.dart';
|
||||||
|
|
||||||
|
const double _maxNavigationTextScale = 1.3;
|
||||||
|
|
||||||
/// 底部导航普通目的地。
|
/// 底部导航普通目的地。
|
||||||
class AppBottomNavItem {
|
class AppBottomNavItem {
|
||||||
const AppBottomNavItem({
|
const AppBottomNavItem({
|
||||||
@@ -16,6 +18,7 @@ class AppBottomNavItem {
|
|||||||
this.selected = false,
|
this.selected = false,
|
||||||
this.assetPath,
|
this.assetPath,
|
||||||
this.selectedAssetPath,
|
this.selectedAssetPath,
|
||||||
|
this.customIcon,
|
||||||
});
|
});
|
||||||
|
|
||||||
final Key tabKey;
|
final Key tabKey;
|
||||||
@@ -23,6 +26,7 @@ class AppBottomNavItem {
|
|||||||
final IconData selectedIcon;
|
final IconData selectedIcon;
|
||||||
final String? assetPath;
|
final String? assetPath;
|
||||||
final String? selectedAssetPath;
|
final String? selectedAssetPath;
|
||||||
|
final Widget? customIcon;
|
||||||
final String label;
|
final String label;
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
final bool selected;
|
final bool selected;
|
||||||
@@ -41,14 +45,17 @@ class AppBottomNav extends StatelessWidget {
|
|||||||
key: barKey,
|
key: barKey,
|
||||||
height: AppDimens.navHeight,
|
height: AppDimens.navHeight,
|
||||||
color: AppColors.navBackground,
|
color: AppColors.navBackground,
|
||||||
child: Row(
|
child: MediaQuery.withClampedTextScaling(
|
||||||
children: [
|
maxScaleFactor: _maxNavigationTextScale,
|
||||||
for (final item in items)
|
child: Row(
|
||||||
_NavDestination(
|
children: [
|
||||||
item: item,
|
for (final item in items)
|
||||||
unselectedColor: AppColors.navUnselected,
|
_NavDestination(
|
||||||
),
|
item: item,
|
||||||
],
|
unselectedColor: AppColors.navUnselected,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
return ColoredBox(
|
return ColoredBox(
|
||||||
@@ -88,26 +95,31 @@ class _NavDestination extends StatelessWidget {
|
|||||||
duration: const Duration(milliseconds: 160),
|
duration: const Duration(milliseconds: 160),
|
||||||
curve: Curves.easeOut,
|
curve: Curves.easeOut,
|
||||||
scale: item.selected ? 1 : 0.96,
|
scale: item.selected ? 1 : 0.96,
|
||||||
child: assetPath == null
|
child:
|
||||||
? Icon(
|
item.customIcon ??
|
||||||
fallbackIcon,
|
(assetPath == null
|
||||||
size: AppDimens.navIcon,
|
? Icon(
|
||||||
color: color,
|
|
||||||
)
|
|
||||||
: ColorFiltered(
|
|
||||||
colorFilter: ColorFilter.mode(color, BlendMode.srcIn),
|
|
||||||
child: Image.asset(
|
|
||||||
assetPath,
|
|
||||||
width: AppDimens.navIcon,
|
|
||||||
height: AppDimens.navIcon,
|
|
||||||
fit: BoxFit.contain,
|
|
||||||
errorBuilder: (_, _, _) => Icon(
|
|
||||||
fallbackIcon,
|
fallbackIcon,
|
||||||
size: AppDimens.navIcon,
|
size: AppDimens.navIcon,
|
||||||
color: color,
|
color: color,
|
||||||
),
|
)
|
||||||
),
|
: ColorFiltered(
|
||||||
),
|
colorFilter: ColorFilter.mode(
|
||||||
|
color,
|
||||||
|
BlendMode.srcIn,
|
||||||
|
),
|
||||||
|
child: Image.asset(
|
||||||
|
assetPath,
|
||||||
|
width: AppDimens.navIcon,
|
||||||
|
height: AppDimens.navIcon,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
errorBuilder: (_, _, _) => Icon(
|
||||||
|
fallbackIcon,
|
||||||
|
size: AppDimens.navIcon,
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
),
|
),
|
||||||
const SizedBox(height: AppDimens.navLabelGap),
|
const SizedBox(height: AppDimens.navLabelGap),
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../theme/app_dimens.dart';
|
||||||
import '../../l10n/app_localizations.dart';
|
import '../../l10n/app_localizations.dart';
|
||||||
import 'app_bottom_nav.dart';
|
import 'app_bottom_nav.dart';
|
||||||
|
import 'root_nav_glyph.dart';
|
||||||
|
|
||||||
/// 客户端根导航的固定顺序。
|
/// 客户端根导航的固定顺序。
|
||||||
enum AppRootTab {
|
enum AppRootTab {
|
||||||
@@ -16,6 +18,13 @@ enum AppRootTab {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension AppRootTabUi on AppRootTab {
|
extension AppRootTabUi on AppRootTab {
|
||||||
|
RootNavGlyphKind get glyphKind => switch (this) {
|
||||||
|
AppRootTab.home => RootNavGlyphKind.home,
|
||||||
|
AppRootTab.recommend => RootNavGlyphKind.recommend,
|
||||||
|
AppRootTab.following => RootNavGlyphKind.following,
|
||||||
|
AppRootTab.mine => RootNavGlyphKind.mine,
|
||||||
|
};
|
||||||
|
|
||||||
Key get tabKey => switch (this) {
|
Key get tabKey => switch (this) {
|
||||||
AppRootTab.home => const Key('tab-home'),
|
AppRootTab.home => const Key('tab-home'),
|
||||||
AppRootTab.recommend => const Key('tab-recommend'),
|
AppRootTab.recommend => const Key('tab-recommend'),
|
||||||
@@ -25,14 +34,14 @@ extension AppRootTabUi on AppRootTab {
|
|||||||
|
|
||||||
IconData get icon => switch (this) {
|
IconData get icon => switch (this) {
|
||||||
AppRootTab.home => Icons.home_outlined,
|
AppRootTab.home => Icons.home_outlined,
|
||||||
AppRootTab.recommend => Icons.celebration_outlined,
|
AppRootTab.recommend => Icons.smart_display_outlined,
|
||||||
AppRootTab.following => Icons.bookmark_border_rounded,
|
AppRootTab.following => Icons.bookmark_border_rounded,
|
||||||
AppRootTab.mine => Icons.person_outline_rounded,
|
AppRootTab.mine => Icons.person_outline_rounded,
|
||||||
};
|
};
|
||||||
|
|
||||||
IconData get selectedIcon => switch (this) {
|
IconData get selectedIcon => switch (this) {
|
||||||
AppRootTab.home => Icons.home_rounded,
|
AppRootTab.home => Icons.home_rounded,
|
||||||
AppRootTab.recommend => Icons.celebration_rounded,
|
AppRootTab.recommend => Icons.smart_display_rounded,
|
||||||
AppRootTab.following => Icons.bookmark_rounded,
|
AppRootTab.following => Icons.bookmark_rounded,
|
||||||
AppRootTab.mine => Icons.person_rounded,
|
AppRootTab.mine => Icons.person_rounded,
|
||||||
};
|
};
|
||||||
@@ -71,6 +80,11 @@ class AppRootBottomNav extends StatelessWidget {
|
|||||||
selectedIcon: tab.selectedIcon,
|
selectedIcon: tab.selectedIcon,
|
||||||
label: tab.label(l10n),
|
label: tab.label(l10n),
|
||||||
selected: tab == selected,
|
selected: tab == selected,
|
||||||
|
customIcon: RootNavGlyph(
|
||||||
|
kind: tab.glyphKind,
|
||||||
|
selected: tab == selected,
|
||||||
|
size: AppDimens.navIcon,
|
||||||
|
),
|
||||||
onTap: () => onSelected(tab),
|
onTap: () => onSelected(tab),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import 'package:flutter/material.dart';
|
|||||||
import '../theme/app_colors.dart';
|
import '../theme/app_colors.dart';
|
||||||
import '../theme/app_dimens.dart';
|
import '../theme/app_dimens.dart';
|
||||||
|
|
||||||
const double _regularIconSize = 72;
|
const double _iconSize = 72;
|
||||||
const double _compactIconSize = 44;
|
|
||||||
const double _maxContentWidth = 260;
|
const double _maxContentWidth = 260;
|
||||||
const double _regularHorizontal = 24;
|
const double _regularHorizontal = 24;
|
||||||
const double _regularVertical = 28;
|
const double _regularVertical = 28;
|
||||||
const double _compactPad = 16;
|
const double _compactHorizontal = 16;
|
||||||
|
const double _compactVertical = 4;
|
||||||
const double _regularGap = 20;
|
const double _regularGap = 20;
|
||||||
const double _compactGap = 12;
|
const double _compactGap = 12;
|
||||||
const double _actionMinHeight = 44;
|
const double _actionMinHeight = 44;
|
||||||
@@ -27,6 +27,7 @@ class EmptyState extends StatelessWidget {
|
|||||||
this.onAction,
|
this.onAction,
|
||||||
this.footer,
|
this.footer,
|
||||||
this.compact = false,
|
this.compact = false,
|
||||||
|
this.stretchContent = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
@@ -38,6 +39,9 @@ class EmptyState extends StatelessWidget {
|
|||||||
final Widget? footer;
|
final Widget? footer;
|
||||||
final bool compact;
|
final bool compact;
|
||||||
|
|
||||||
|
/// 让图标和文案占满内容宽度,适用于需要严格居中的宽版空状态。
|
||||||
|
final bool stretchContent;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final hasAction = actionLabel != null && onAction != null;
|
final hasAction = actionLabel != null && onAction != null;
|
||||||
@@ -48,28 +52,33 @@ class EmptyState extends StatelessWidget {
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
key: const Key('empty-state-padding'),
|
key: const Key('empty-state-padding'),
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: compact ? _compactPad : _regularHorizontal,
|
horizontal: compact ? _compactHorizontal : _regularHorizontal,
|
||||||
vertical: compact ? _compactPad : _regularVertical,
|
vertical: compact ? _compactVertical : _regularVertical,
|
||||||
),
|
),
|
||||||
child: Semantics(
|
child: SizedBox(
|
||||||
container: true,
|
width: stretchContent ? double.infinity : null,
|
||||||
label: title,
|
child: Semantics(
|
||||||
child: Column(
|
container: true,
|
||||||
mainAxisSize: MainAxisSize.min,
|
label: title,
|
||||||
children: [
|
child: Column(
|
||||||
ExcludeSemantics(
|
mainAxisSize: MainAxisSize.min,
|
||||||
child: _EmptyMark(icon: icon, compact: compact),
|
children: [
|
||||||
),
|
ExcludeSemantics(child: _EmptyMark(icon: icon)),
|
||||||
SizedBox(height: compact ? _compactGap : _regularGap),
|
SizedBox(height: compact ? _compactGap : _regularGap),
|
||||||
_EmptyCopy(
|
SizedBox(
|
||||||
title: title,
|
width: stretchContent ? double.infinity : null,
|
||||||
subtitle: subtitle,
|
child: _EmptyCopy(
|
||||||
actionLabel: hasAction ? actionLabel : null,
|
title: title,
|
||||||
actionKey: actionKey,
|
subtitle: subtitle,
|
||||||
onAction: hasAction ? onAction : null,
|
actionLabel: hasAction ? actionLabel : null,
|
||||||
footer: footer,
|
actionKey: actionKey,
|
||||||
),
|
onAction: hasAction ? onAction : null,
|
||||||
],
|
footer: footer,
|
||||||
|
stretchContent: stretchContent,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -80,17 +89,16 @@ class EmptyState extends StatelessWidget {
|
|||||||
|
|
||||||
/// 空列表只放一枚大图标,不画线框,也不铺底色。
|
/// 空列表只放一枚大图标,不画线框,也不铺底色。
|
||||||
class _EmptyMark extends StatelessWidget {
|
class _EmptyMark extends StatelessWidget {
|
||||||
const _EmptyMark({required this.icon, required this.compact});
|
const _EmptyMark({required this.icon});
|
||||||
|
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final bool compact;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Icon(
|
return Icon(
|
||||||
icon,
|
icon,
|
||||||
key: const Key('empty-state-icon'),
|
key: const Key('empty-state-icon'),
|
||||||
size: compact ? _compactIconSize : _regularIconSize,
|
size: _iconSize,
|
||||||
color: AppColors.subtle,
|
color: AppColors.subtle,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -104,6 +112,7 @@ class _EmptyCopy extends StatelessWidget {
|
|||||||
required this.actionKey,
|
required this.actionKey,
|
||||||
required this.onAction,
|
required this.onAction,
|
||||||
required this.footer,
|
required this.footer,
|
||||||
|
required this.stretchContent,
|
||||||
});
|
});
|
||||||
|
|
||||||
final String title;
|
final String title;
|
||||||
@@ -112,11 +121,15 @@ class _EmptyCopy extends StatelessWidget {
|
|||||||
final Key? actionKey;
|
final Key? actionKey;
|
||||||
final VoidCallback? onAction;
|
final VoidCallback? onAction;
|
||||||
final Widget? footer;
|
final Widget? footer;
|
||||||
|
final bool stretchContent;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: stretchContent
|
||||||
|
? CrossAxisAlignment.stretch
|
||||||
|
: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
ExcludeSemantics(
|
ExcludeSemantics(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// Author: fruit.com.cn
|
// Author: fruit.com.cn
|
||||||
|
// 职责:统一网络图片入口,补服务地址,并在加载中/失败时显示纯色占位块。
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -31,10 +32,9 @@ class RemoteImage extends StatelessWidget {
|
|||||||
this.width,
|
this.width,
|
||||||
this.height,
|
this.height,
|
||||||
this.fit = BoxFit.cover,
|
this.fit = BoxFit.cover,
|
||||||
this.showFallbackIcon = false,
|
|
||||||
this.fallbackIconKey,
|
|
||||||
this.fallbackAspectRatio,
|
this.fallbackAspectRatio,
|
||||||
this.fallbackColor = AppColors.raised,
|
this.fallbackColor = AppColors.raised,
|
||||||
|
this.fallbackWidget,
|
||||||
this.decodeWidth,
|
this.decodeWidth,
|
||||||
this.decodeHeight,
|
this.decodeHeight,
|
||||||
});
|
});
|
||||||
@@ -43,17 +43,18 @@ class RemoteImage extends StatelessWidget {
|
|||||||
final double? width;
|
final double? width;
|
||||||
final double? height;
|
final double? height;
|
||||||
final BoxFit fit;
|
final BoxFit fit;
|
||||||
final bool showFallbackIcon;
|
|
||||||
final Key? fallbackIconKey;
|
|
||||||
final double? fallbackAspectRatio;
|
final double? fallbackAspectRatio;
|
||||||
final Color fallbackColor;
|
final Color fallbackColor;
|
||||||
|
|
||||||
|
/// 自定义占位:地址为空、加载中、加载失败时都显示它(优先于 [fallbackColor])。
|
||||||
|
final Widget? fallbackWidget;
|
||||||
final int? decodeWidth;
|
final int? decodeWidth;
|
||||||
final int? decodeHeight;
|
final int? decodeHeight;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final url = AppConfig.mediaUrl(path);
|
final url = AppConfig.mediaUrl(path);
|
||||||
if (url.isEmpty) return _fallback(brand: showFallbackIcon);
|
if (url.isEmpty) return _fallback();
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
final pixelRatio = MediaQuery.devicePixelRatioOf(context);
|
final pixelRatio = MediaQuery.devicePixelRatioOf(context);
|
||||||
@@ -77,9 +78,9 @@ class RemoteImage extends StatelessWidget {
|
|||||||
// cover/contain 本身会保持宽高比,此时若同时强制 cacheWidth 和
|
// cover/contain 本身会保持宽高比,此时若同时强制 cacheWidth 和
|
||||||
// cacheHeight,解码会把竖版图强行拉成横版像素。只在显式指定了
|
// cacheHeight,解码会把竖版图强行拉成横版像素。只在显式指定了
|
||||||
// decodeHeight、或 fit 不保持宽高比时才限定解码高度。
|
// decodeHeight、或 fit 不保持宽高比时才限定解码高度。
|
||||||
final keepsAspectRatio =
|
final keepsAspectRatio = fit == BoxFit.cover || fit == BoxFit.contain;
|
||||||
fit == BoxFit.cover || fit == BoxFit.contain;
|
final cacheHeight =
|
||||||
final cacheHeight = decodeHeight ??
|
decodeHeight ??
|
||||||
(keepsAspectRatio || inferredHeight == null
|
(keepsAspectRatio || inferredHeight == null
|
||||||
? null
|
? null
|
||||||
: resolveImageDecodePixels(inferredHeight, pixelRatio));
|
: resolveImageDecodePixels(inferredHeight, pixelRatio));
|
||||||
@@ -95,43 +96,23 @@ class RemoteImage extends StatelessWidget {
|
|||||||
?.clamp(_minImageDecodePixels, _maxImageDecodePixels)
|
?.clamp(_minImageDecodePixels, _maxImageDecodePixels)
|
||||||
.toInt(),
|
.toInt(),
|
||||||
gaplessPlayback: true,
|
gaplessPlayback: true,
|
||||||
errorBuilder: (_, _, _) => _fallback(brand: showFallbackIcon),
|
errorBuilder: (_, _, _) => _fallback(),
|
||||||
frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
|
frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
|
||||||
if (wasSynchronouslyLoaded || frame != null) return child;
|
if (wasSynchronouslyLoaded || frame != null) return child;
|
||||||
return _fallback(brand: showFallbackIcon);
|
return _fallback();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _fallback({required bool brand}) {
|
Widget _fallback() {
|
||||||
final mark = brand
|
final custom = fallbackWidget;
|
||||||
? LayoutBuilder(
|
final content = custom != null
|
||||||
builder: (context, constraints) {
|
? SizedBox(width: width, height: height, child: custom)
|
||||||
final width = constraints.maxWidth.isFinite
|
: Container(width: width, height: height, color: fallbackColor);
|
||||||
? constraints.maxWidth
|
|
||||||
: 120.0;
|
|
||||||
return Center(
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/icon/splash_logo.png',
|
|
||||||
key: fallbackIconKey,
|
|
||||||
width: width * 0.72,
|
|
||||||
fit: BoxFit.contain,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: null;
|
|
||||||
final fallback = Container(
|
|
||||||
width: width,
|
|
||||||
height: height,
|
|
||||||
color: brand ? AppColors.mediaBlack : fallbackColor,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: mark,
|
|
||||||
);
|
|
||||||
final ratio = fallbackAspectRatio;
|
final ratio = fallbackAspectRatio;
|
||||||
if (ratio == null) return fallback;
|
if (ratio == null) return content;
|
||||||
return AspectRatio(aspectRatio: ratio, child: fallback);
|
return AspectRatio(aspectRatio: ratio, child: content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,180 @@
|
|||||||
|
// Author: fruit.com.cn
|
||||||
|
// 职责:绘制根导航使用的饱满品牌插画图标。
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../theme/app_colors.dart';
|
||||||
|
|
||||||
|
const double _designSize = 30;
|
||||||
|
|
||||||
|
/// 根导航四个入口对应的图标种类。
|
||||||
|
enum RootNavGlyphKind { home, recommend, following, mine }
|
||||||
|
|
||||||
|
/// 根导航插画图标,根据选中态使用品牌红和中性灰白配色。
|
||||||
|
class RootNavGlyph extends StatelessWidget {
|
||||||
|
const RootNavGlyph({
|
||||||
|
super.key,
|
||||||
|
required this.kind,
|
||||||
|
required this.selected,
|
||||||
|
required this.size,
|
||||||
|
});
|
||||||
|
|
||||||
|
final RootNavGlyphKind kind;
|
||||||
|
final bool selected;
|
||||||
|
final double size;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CustomPaint(
|
||||||
|
size: Size.square(size),
|
||||||
|
painter: _RootNavGlyphPainter(kind: kind, selected: selected),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RootNavGlyphPainter extends CustomPainter {
|
||||||
|
const _RootNavGlyphPainter({required this.kind, required this.selected});
|
||||||
|
|
||||||
|
final RootNavGlyphKind kind;
|
||||||
|
final bool selected;
|
||||||
|
|
||||||
|
Color get _main => selected ? AppColors.navSelected : const Color(0xFFD0D0D2);
|
||||||
|
Color get _light => selected ? AppColors.homeCrownGold : Colors.white;
|
||||||
|
Color get _shade =>
|
||||||
|
selected ? const Color(0xFF9F2935) : const Color(0xFF858589);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void paint(Canvas canvas, Size size) {
|
||||||
|
canvas.save();
|
||||||
|
canvas.scale(size.width / _designSize);
|
||||||
|
switch (kind) {
|
||||||
|
case RootNavGlyphKind.home:
|
||||||
|
_paintHome(canvas);
|
||||||
|
case RootNavGlyphKind.recommend:
|
||||||
|
_paintRecommend(canvas);
|
||||||
|
case RootNavGlyphKind.following:
|
||||||
|
_paintFollowing(canvas);
|
||||||
|
case RootNavGlyphKind.mine:
|
||||||
|
_paintMine(canvas);
|
||||||
|
}
|
||||||
|
canvas.restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _paintHome(Canvas canvas) {
|
||||||
|
final roof = Path()
|
||||||
|
..moveTo(3, 13)
|
||||||
|
..lineTo(15, 3)
|
||||||
|
..lineTo(27, 13)
|
||||||
|
..lineTo(24, 16)
|
||||||
|
..lineTo(15, 8.5)
|
||||||
|
..lineTo(6, 16)
|
||||||
|
..close();
|
||||||
|
canvas.drawShadow(roof, AppColors.shadow, 2, false);
|
||||||
|
canvas.drawPath(roof, _gradient(const Rect.fromLTWH(3, 3, 24, 13)));
|
||||||
|
final body = RRect.fromRectAndRadius(
|
||||||
|
const Rect.fromLTRB(6, 13, 24, 27),
|
||||||
|
const Radius.circular(3),
|
||||||
|
);
|
||||||
|
canvas.drawRRect(body, _gradient(const Rect.fromLTWH(6, 13, 18, 14)));
|
||||||
|
canvas.drawRRect(
|
||||||
|
RRect.fromRectAndRadius(
|
||||||
|
const Rect.fromLTRB(12, 18, 18, 27),
|
||||||
|
const Radius.circular(2),
|
||||||
|
),
|
||||||
|
Paint()..color = _shade,
|
||||||
|
);
|
||||||
|
canvas.drawRRect(
|
||||||
|
RRect.fromRectAndRadius(
|
||||||
|
const Rect.fromLTRB(8, 16, 11, 19),
|
||||||
|
const Radius.circular(1),
|
||||||
|
),
|
||||||
|
Paint()..color = _light,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _paintRecommend(Canvas canvas) {
|
||||||
|
final body = RRect.fromRectAndRadius(
|
||||||
|
const Rect.fromLTRB(6, 4, 24, 27),
|
||||||
|
const Radius.circular(5),
|
||||||
|
);
|
||||||
|
canvas.drawShadow(Path()..addRRect(body), AppColors.shadow, 2, false);
|
||||||
|
canvas.drawRRect(body, _gradient(const Rect.fromLTWH(6, 4, 18, 23)));
|
||||||
|
for (var index = 0; index < 3; index++) {
|
||||||
|
final left = 9.0 + index * 5;
|
||||||
|
canvas.drawRRect(
|
||||||
|
RRect.fromRectAndRadius(
|
||||||
|
Rect.fromLTWH(left, 7, 3, 2.5),
|
||||||
|
const Radius.circular(1),
|
||||||
|
),
|
||||||
|
Paint()..color = _light,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
final play = Path()
|
||||||
|
..moveTo(12, 13)
|
||||||
|
..quadraticBezierTo(12, 11.5, 13.5, 12.3)
|
||||||
|
..lineTo(19.5, 15.7)
|
||||||
|
..quadraticBezierTo(21, 16.5, 19.5, 17.3)
|
||||||
|
..lineTo(13.5, 20.7)
|
||||||
|
..quadraticBezierTo(12, 21.5, 12, 20)
|
||||||
|
..close();
|
||||||
|
canvas.drawPath(play, Paint()..color = _light);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _paintFollowing(Canvas canvas) {
|
||||||
|
final page = RRect.fromRectAndRadius(
|
||||||
|
const Rect.fromLTRB(5, 4, 25, 27),
|
||||||
|
const Radius.circular(4),
|
||||||
|
);
|
||||||
|
canvas.drawShadow(Path()..addRRect(page), AppColors.shadow, 2, false);
|
||||||
|
canvas.drawRRect(page, _gradient(const Rect.fromLTWH(5, 4, 20, 23)));
|
||||||
|
canvas.drawRRect(
|
||||||
|
RRect.fromRectAndRadius(
|
||||||
|
const Rect.fromLTRB(8, 9, 17, 10.5),
|
||||||
|
const Radius.circular(0.7),
|
||||||
|
),
|
||||||
|
Paint()..color = _light,
|
||||||
|
);
|
||||||
|
canvas.drawRRect(
|
||||||
|
RRect.fromRectAndRadius(
|
||||||
|
const Rect.fromLTRB(8, 13, 16, 14.5),
|
||||||
|
const Radius.circular(0.7),
|
||||||
|
),
|
||||||
|
Paint()..color = _light,
|
||||||
|
);
|
||||||
|
final bookmark = Path()
|
||||||
|
..moveTo(18, 7)
|
||||||
|
..lineTo(22, 7)
|
||||||
|
..lineTo(22, 20)
|
||||||
|
..lineTo(20, 18)
|
||||||
|
..lineTo(18, 20)
|
||||||
|
..close();
|
||||||
|
canvas.drawPath(bookmark, Paint()..color = _light);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _paintMine(Canvas canvas) {
|
||||||
|
final bounds = Rect.fromCircle(center: const Offset(15, 15), radius: 13);
|
||||||
|
canvas.drawShadow(Path()..addOval(bounds), AppColors.shadow, 2, false);
|
||||||
|
canvas.drawCircle(const Offset(15, 15), 13, _gradient(bounds));
|
||||||
|
canvas.drawCircle(const Offset(15, 11), 4, Paint()..color = _light);
|
||||||
|
final shoulders = Path()
|
||||||
|
..moveTo(7, 24)
|
||||||
|
..cubicTo(7.5, 19, 10.5, 17, 15, 17)
|
||||||
|
..cubicTo(19.5, 17, 22.5, 19, 23, 24)
|
||||||
|
..quadraticBezierTo(15, 29, 7, 24)
|
||||||
|
..close();
|
||||||
|
canvas.drawPath(shoulders, Paint()..color = _light);
|
||||||
|
canvas.drawCircle(const Offset(13.5, 11), 0.55, Paint()..color = _shade);
|
||||||
|
canvas.drawCircle(const Offset(16.5, 11), 0.55, Paint()..color = _shade);
|
||||||
|
}
|
||||||
|
|
||||||
|
Paint _gradient(Rect bounds) => Paint()
|
||||||
|
..shader = LinearGradient(
|
||||||
|
begin: Alignment.topLeft,
|
||||||
|
end: Alignment.bottomRight,
|
||||||
|
colors: [_light, _main, _shade],
|
||||||
|
).createShader(bounds);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool shouldRepaint(covariant _RootNavGlyphPainter oldDelegate) =>
|
||||||
|
oldDelegate.kind != kind || oldDelegate.selected != selected;
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
"appName": "FruitShorts",
|
"appName": "ymb",
|
||||||
"demo": "DEMO",
|
"demo": "DEMO",
|
||||||
"homeHeadline": "Watch now",
|
"homeHeadline": "Watch now",
|
||||||
"homeSubtitle": "Free short drama preview.",
|
"homeSubtitle": "Free short drama preview.",
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
"searchCancel": "Cancel",
|
"searchCancel": "Cancel",
|
||||||
"featured": "Featured",
|
"featured": "Featured",
|
||||||
"recommended": "Recommended",
|
"recommended": "Recommended",
|
||||||
"fruitShortsBrand": "FruitShorts",
|
"fruitShortsBrand": "ymb",
|
||||||
"comingSoon": "Coming soon",
|
"comingSoon": "Coming soon",
|
||||||
"authLegal": "By continuing, you agree to the Terms of Service and Privacy Policy.",
|
"authLegal": "By continuing, you agree to the Terms of Service and Privacy Policy.",
|
||||||
"authLegalLead": "By continuing, you agree to the",
|
"authLegalLead": "By continuing, you agree to the",
|
||||||
@@ -83,6 +83,12 @@
|
|||||||
"count": {"type": "String"}
|
"count": {"type": "String"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"likesLabel": "{count} likes",
|
||||||
|
"@likesLabel": {
|
||||||
|
"placeholders": {
|
||||||
|
"count": {"type": "String"}
|
||||||
|
}
|
||||||
|
},
|
||||||
"topCharts": "Hot Ranking",
|
"topCharts": "Hot Ranking",
|
||||||
"newReleases": "New Releases",
|
"newReleases": "New Releases",
|
||||||
"newDramas": "New",
|
"newDramas": "New",
|
||||||
@@ -316,6 +322,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"episodes": "Episodes",
|
"episodes": "Episodes",
|
||||||
|
"similarDramas": "More like this",
|
||||||
"synopsisTitle": "Synopsis",
|
"synopsisTitle": "Synopsis",
|
||||||
"watchEpisodeOne": "Watch episode 1",
|
"watchEpisodeOne": "Watch episode 1",
|
||||||
"continueEpisode": "Continue episode {number}",
|
"continueEpisode": "Continue episode {number}",
|
||||||
@@ -358,7 +365,7 @@
|
|||||||
"categoriesError": "Categories could not be loaded.",
|
"categoriesError": "Categories could not be loaded.",
|
||||||
"detailError": "The episode list could not be loaded.",
|
"detailError": "The episode list could not be loaded.",
|
||||||
"noMediaNotice": "This episode has no playable media yet.",
|
"noMediaNotice": "This episode has no playable media yet.",
|
||||||
"noStories": "No stories available yet.",
|
"noStories": "No stories available yet",
|
||||||
"notices": "Notices",
|
"notices": "Notices",
|
||||||
"noNotices": "No notices yet.",
|
"noNotices": "No notices yet.",
|
||||||
"noticesLoadFailed": "Notices could not be loaded.",
|
"noticesLoadFailed": "Notices could not be loaded.",
|
||||||
@@ -407,8 +414,8 @@
|
|||||||
"genreDramaMystery": "Drama · Mystery",
|
"genreDramaMystery": "Drama · Mystery",
|
||||||
"continueWatchingHeading": "CONTINUE WATCHING",
|
"continueWatchingHeading": "CONTINUE WATCHING",
|
||||||
"preferencesHeading": "PREFERENCES",
|
"preferencesHeading": "PREFERENCES",
|
||||||
"brandMark": "FRUITSHORTS",
|
"brandMark": "YMB",
|
||||||
"shareFooter": "FruitShorts",
|
"shareFooter": "ymb",
|
||||||
"shortsTab": "Shorts",
|
"shortsTab": "Shorts",
|
||||||
"myListTab": "My List",
|
"myListTab": "My List",
|
||||||
"watchFull": "Watch Full",
|
"watchFull": "Watch Full",
|
||||||
@@ -432,7 +439,7 @@
|
|||||||
"joinVip": "Join VIP",
|
"joinVip": "Join VIP",
|
||||||
"earnRewards": "Earn Rewards",
|
"earnRewards": "Earn Rewards",
|
||||||
"freeBonus": "Get Free Bonus",
|
"freeBonus": "Get Free Bonus",
|
||||||
"watchHistory": "Watch History",
|
"watchHistory": "History",
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"serverAddress": "Server address",
|
"serverAddress": "Server address",
|
||||||
"serverSettings": "Server settings",
|
"serverSettings": "Server settings",
|
||||||
@@ -492,7 +499,7 @@
|
|||||||
"progressError": "Your watch position could not be loaded.",
|
"progressError": "Your watch position could not be loaded.",
|
||||||
"favoritesError": "Your favorites could not be loaded.",
|
"favoritesError": "Your favorites could not be loaded.",
|
||||||
"favoriteToggleFailed": "Could not update favorites. Please retry.",
|
"favoriteToggleFailed": "Could not update favorites. Please retry.",
|
||||||
"myFavorites": "My favorites",
|
"myFavorites": "Favorites",
|
||||||
"noFavorites": "No favorites yet.",
|
"noFavorites": "No favorites yet.",
|
||||||
"downloads": "Downloads",
|
"downloads": "Downloads",
|
||||||
"downloadsError": "Download settings could not be loaded.",
|
"downloadsError": "Download settings could not be loaded.",
|
||||||
@@ -760,7 +767,7 @@
|
|||||||
"homeBadgeNew": "New",
|
"homeBadgeNew": "New",
|
||||||
"homeBadgeAnime": "Anime",
|
"homeBadgeAnime": "Anime",
|
||||||
"emptyContent": "No content yet",
|
"emptyContent": "No content yet",
|
||||||
"recommendTopTab": "Recommend",
|
"recommendTopTab": "Featured",
|
||||||
"playlistTopTab": "Playlists",
|
"playlistTopTab": "Playlists",
|
||||||
"allDramasTopTab": "All Dramas",
|
"allDramasTopTab": "All Dramas",
|
||||||
"weeklyHitsTitle": "This Week's Hits",
|
"weeklyHitsTitle": "This Week's Hits",
|
||||||
@@ -785,10 +792,10 @@
|
|||||||
"visitor": "Visitor",
|
"visitor": "Visitor",
|
||||||
"copyUid": "Copy UID",
|
"copyUid": "Copy UID",
|
||||||
"uidCopied": "UID copied",
|
"uidCopied": "UID copied",
|
||||||
"offlineDownloads": "Offline downloads",
|
"offlineDownloads": "Downloads",
|
||||||
"watchPreferences": "Watch preferences",
|
"watchPreferences": "Watch preferences",
|
||||||
"contactSupport": "Contact support",
|
"contactSupport": "Contact support",
|
||||||
"vipBrandName": "FruitShorts VIP",
|
"vipBrandName": "VIP",
|
||||||
"vipOpenNow": "Get VIP",
|
"vipOpenNow": "Get VIP",
|
||||||
"vipBenefitFree": "Free full access",
|
"vipBenefitFree": "Free full access",
|
||||||
"vipBenefitNoAds": "Ad-free viewing",
|
"vipBenefitNoAds": "Ad-free viewing",
|
||||||
@@ -803,7 +810,7 @@
|
|||||||
"total": { "type": "int" }
|
"total": { "type": "int" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"myFavorites": "My Favorites",
|
"myFavorites": "Favorites",
|
||||||
"manage": "Manage",
|
"manage": "Manage",
|
||||||
"continueWatching": "Continue Watching",
|
"continueWatching": "Continue Watching",
|
||||||
"continueWatchingSubtitle": "Episode {episode} of {total}",
|
"continueWatchingSubtitle": "Episode {episode} of {total}",
|
||||||
@@ -850,6 +857,7 @@
|
|||||||
"dataUnavailable": "—",
|
"dataUnavailable": "—",
|
||||||
"commonQuestions": "Common questions",
|
"commonQuestions": "Common questions",
|
||||||
"aboutUs": "About us",
|
"aboutUs": "About us",
|
||||||
|
"aboutBrandName": "Your mini business",
|
||||||
"aboutDescription": "A focused, immersive place to watch short dramas.",
|
"aboutDescription": "A focused, immersive place to watch short dramas.",
|
||||||
"versionLabel": "Version {version}",
|
"versionLabel": "Version {version}",
|
||||||
"@versionLabel": {
|
"@versionLabel": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"@@locale": "id",
|
"@@locale": "id",
|
||||||
"appName": "FruitShorts",
|
"appName": "ymb",
|
||||||
"demo": "Demo",
|
"demo": "Demo",
|
||||||
"homeHeadline": "Tonton sekarang",
|
"homeHeadline": "Tonton sekarang",
|
||||||
"homeSubtitle": "Pratinjau drama pendek gratis.",
|
"homeSubtitle": "Pratinjau drama pendek gratis.",
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
"searchCancel": "Batal",
|
"searchCancel": "Batal",
|
||||||
"featured": "Unggulan",
|
"featured": "Unggulan",
|
||||||
"recommended": "Rekomendasi",
|
"recommended": "Rekomendasi",
|
||||||
"fruitShortsBrand": "FruitShorts",
|
"fruitShortsBrand": "ymb",
|
||||||
"comingSoon": "Segera hadir",
|
"comingSoon": "Segera hadir",
|
||||||
"authLegal": "Dengan melanjutkan, Anda menyetujui Ketentuan Layanan dan Kebijakan Privasi.",
|
"authLegal": "Dengan melanjutkan, Anda menyetujui Ketentuan Layanan dan Kebijakan Privasi.",
|
||||||
"authLegalLead": "Dengan melanjutkan, Anda menyetujui",
|
"authLegalLead": "Dengan melanjutkan, Anda menyetujui",
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
"authorNoteLabel": "Catatan penulis",
|
"authorNoteLabel": "Catatan penulis",
|
||||||
"reserve": "Reservasi",
|
"reserve": "Reservasi",
|
||||||
"heatLabel": "{count} panas",
|
"heatLabel": "{count} panas",
|
||||||
|
"likesLabel": "{count} suka",
|
||||||
"topCharts": "Peringkat Populer",
|
"topCharts": "Peringkat Populer",
|
||||||
"newReleases": "Rilisan Baru",
|
"newReleases": "Rilisan Baru",
|
||||||
"newDramas": "Baru",
|
"newDramas": "Baru",
|
||||||
@@ -295,6 +296,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"episodes": "Episode",
|
"episodes": "Episode",
|
||||||
|
"similarDramas": "Rekomendasi Serupa",
|
||||||
"synopsisTitle": "Sinopsis",
|
"synopsisTitle": "Sinopsis",
|
||||||
"watchEpisodeOne": "Tonton episode 1",
|
"watchEpisodeOne": "Tonton episode 1",
|
||||||
"continueEpisode": "Lanjut episode {number}",
|
"continueEpisode": "Lanjut episode {number}",
|
||||||
@@ -337,7 +339,7 @@
|
|||||||
"categoriesError": "Kategori gagal dimuat.",
|
"categoriesError": "Kategori gagal dimuat.",
|
||||||
"detailError": "Daftar episode gagal dimuat.",
|
"detailError": "Daftar episode gagal dimuat.",
|
||||||
"noMediaNotice": "Episode ini belum punya media yang bisa diputar.",
|
"noMediaNotice": "Episode ini belum punya media yang bisa diputar.",
|
||||||
"noStories": "Belum ada cerita.",
|
"noStories": "Belum ada cerita",
|
||||||
"notices": "Notifikasi",
|
"notices": "Notifikasi",
|
||||||
"noNotices": "Belum ada notifikasi.",
|
"noNotices": "Belum ada notifikasi.",
|
||||||
"noticesLoadFailed": "Notifikasi tidak dapat dimuat.",
|
"noticesLoadFailed": "Notifikasi tidak dapat dimuat.",
|
||||||
@@ -386,8 +388,8 @@
|
|||||||
"genreDramaMystery": "Drama · Misteri",
|
"genreDramaMystery": "Drama · Misteri",
|
||||||
"continueWatchingHeading": "LANJUT TONTON",
|
"continueWatchingHeading": "LANJUT TONTON",
|
||||||
"preferencesHeading": "PREFERENSI",
|
"preferencesHeading": "PREFERENSI",
|
||||||
"brandMark": "FRUITSHORTS",
|
"brandMark": "YMB",
|
||||||
"shareFooter": "FruitShorts",
|
"shareFooter": "ymb",
|
||||||
"shortsTab": "Drama Pendek",
|
"shortsTab": "Drama Pendek",
|
||||||
"myListTab": "Daftar Saya",
|
"myListTab": "Daftar Saya",
|
||||||
"watchFull": "Tonton Penuh",
|
"watchFull": "Tonton Penuh",
|
||||||
@@ -411,7 +413,7 @@
|
|||||||
"joinVip": "Gabung VIP",
|
"joinVip": "Gabung VIP",
|
||||||
"earnRewards": "Dapatkan Hadiah",
|
"earnRewards": "Dapatkan Hadiah",
|
||||||
"freeBonus": "Bonus Gratis",
|
"freeBonus": "Bonus Gratis",
|
||||||
"watchHistory": "Riwayat Tontonan",
|
"watchHistory": "Riwayat",
|
||||||
"settings": "Pengaturan",
|
"settings": "Pengaturan",
|
||||||
"serverAddress": "Alamat server",
|
"serverAddress": "Alamat server",
|
||||||
"serverSettings": "Pengaturan server",
|
"serverSettings": "Pengaturan server",
|
||||||
@@ -471,7 +473,7 @@
|
|||||||
"progressError": "Posisi tonton gagal dimuat.",
|
"progressError": "Posisi tonton gagal dimuat.",
|
||||||
"favoritesError": "Daftar favorit gagal dimuat.",
|
"favoritesError": "Daftar favorit gagal dimuat.",
|
||||||
"favoriteToggleFailed": "Gagal memperbarui favorit. Coba lagi.",
|
"favoriteToggleFailed": "Gagal memperbarui favorit. Coba lagi.",
|
||||||
"myFavorites": "Favorit saya",
|
"myFavorites": "Favorit",
|
||||||
"noFavorites": "Belum ada favorit.",
|
"noFavorites": "Belum ada favorit.",
|
||||||
"downloads": "Unduhan",
|
"downloads": "Unduhan",
|
||||||
"downloadsError": "Pengaturan unduhan gagal dimuat.",
|
"downloadsError": "Pengaturan unduhan gagal dimuat.",
|
||||||
@@ -722,7 +724,7 @@
|
|||||||
"homeBadgeNew": "Baru",
|
"homeBadgeNew": "Baru",
|
||||||
"homeBadgeAnime": "Anime",
|
"homeBadgeAnime": "Anime",
|
||||||
"emptyContent": "Belum ada konten",
|
"emptyContent": "Belum ada konten",
|
||||||
"recommendTopTab": "Rekomendasi",
|
"recommendTopTab": "Unggulan",
|
||||||
"playlistTopTab": "Daftar Putar",
|
"playlistTopTab": "Daftar Putar",
|
||||||
"allDramasTopTab": "Semua",
|
"allDramasTopTab": "Semua",
|
||||||
"weeklyHitsTitle": "Hits Minggu Ini",
|
"weeklyHitsTitle": "Hits Minggu Ini",
|
||||||
@@ -747,10 +749,10 @@
|
|||||||
"visitor": "Pengunjung",
|
"visitor": "Pengunjung",
|
||||||
"copyUid": "Salin UID",
|
"copyUid": "Salin UID",
|
||||||
"uidCopied": "UID disalin",
|
"uidCopied": "UID disalin",
|
||||||
"offlineDownloads": "Unduhan offline",
|
"offlineDownloads": "Unduhan",
|
||||||
"watchPreferences": "Preferensi tontonan",
|
"watchPreferences": "Preferensi tontonan",
|
||||||
"contactSupport": "Hubungi dukungan",
|
"contactSupport": "Hubungi dukungan",
|
||||||
"vipBrandName": "FruitShorts VIP",
|
"vipBrandName": "VIP",
|
||||||
"vipOpenNow": "Buka VIP",
|
"vipOpenNow": "Buka VIP",
|
||||||
"vipBenefitFree": "Nonton semua gratis",
|
"vipBenefitFree": "Nonton semua gratis",
|
||||||
"vipBenefitNoAds": "Bebas iklan",
|
"vipBenefitNoAds": "Bebas iklan",
|
||||||
@@ -765,7 +767,7 @@
|
|||||||
"total": { "type": "int" }
|
"total": { "type": "int" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"myFavorites": "Favorit Saya",
|
"myFavorites": "Favorit",
|
||||||
"manage": "Kelola",
|
"manage": "Kelola",
|
||||||
"continueWatching": "Lanjutkan",
|
"continueWatching": "Lanjutkan",
|
||||||
"continueWatchingSubtitle": "Episode {episode} dari {total}",
|
"continueWatchingSubtitle": "Episode {episode} dari {total}",
|
||||||
@@ -812,6 +814,7 @@
|
|||||||
"dataUnavailable": "—",
|
"dataUnavailable": "—",
|
||||||
"commonQuestions": "Pertanyaan umum",
|
"commonQuestions": "Pertanyaan umum",
|
||||||
"aboutUs": "Tentang kami",
|
"aboutUs": "Tentang kami",
|
||||||
|
"aboutBrandName": "Your mini business",
|
||||||
"aboutDescription": "Tempat fokus dan imersif untuk menonton drama pendek.",
|
"aboutDescription": "Tempat fokus dan imersif untuk menonton drama pendek.",
|
||||||
"versionLabel": "Versi {version}",
|
"versionLabel": "Versi {version}",
|
||||||
"@versionLabel": {
|
"@versionLabel": {
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @appName.
|
/// No description provided for @appName.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'FruitShorts'**
|
/// **'ymb'**
|
||||||
String get appName;
|
String get appName;
|
||||||
|
|
||||||
/// No description provided for @demo.
|
/// No description provided for @demo.
|
||||||
@@ -217,7 +217,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @fruitShortsBrand.
|
/// No description provided for @fruitShortsBrand.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'FruitShorts'**
|
/// **'ymb'**
|
||||||
String get fruitShortsBrand;
|
String get fruitShortsBrand;
|
||||||
|
|
||||||
/// No description provided for @comingSoon.
|
/// No description provided for @comingSoon.
|
||||||
@@ -442,6 +442,12 @@ abstract class AppLocalizations {
|
|||||||
/// **'{count} heat'**
|
/// **'{count} heat'**
|
||||||
String heatLabel(String count);
|
String heatLabel(String count);
|
||||||
|
|
||||||
|
/// No description provided for @likesLabel.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'{count} likes'**
|
||||||
|
String likesLabel(String count);
|
||||||
|
|
||||||
/// No description provided for @topCharts.
|
/// No description provided for @topCharts.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
@@ -1276,6 +1282,12 @@ abstract class AppLocalizations {
|
|||||||
/// **'Episodes'**
|
/// **'Episodes'**
|
||||||
String get episodes;
|
String get episodes;
|
||||||
|
|
||||||
|
/// No description provided for @similarDramas.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'More like this'**
|
||||||
|
String get similarDramas;
|
||||||
|
|
||||||
/// No description provided for @synopsisTitle.
|
/// No description provided for @synopsisTitle.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
@@ -1387,7 +1399,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @noStories.
|
/// No description provided for @noStories.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'No stories available yet.'**
|
/// **'No stories available yet'**
|
||||||
String get noStories;
|
String get noStories;
|
||||||
|
|
||||||
/// No description provided for @notices.
|
/// No description provided for @notices.
|
||||||
@@ -1621,13 +1633,13 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @brandMark.
|
/// No description provided for @brandMark.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'FRUITSHORTS'**
|
/// **'YMB'**
|
||||||
String get brandMark;
|
String get brandMark;
|
||||||
|
|
||||||
/// No description provided for @shareFooter.
|
/// No description provided for @shareFooter.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'FruitShorts'**
|
/// **'ymb'**
|
||||||
String get shareFooter;
|
String get shareFooter;
|
||||||
|
|
||||||
/// No description provided for @shortsTab.
|
/// No description provided for @shortsTab.
|
||||||
@@ -1771,7 +1783,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @watchHistory.
|
/// No description provided for @watchHistory.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Watch History'**
|
/// **'History'**
|
||||||
String get watchHistory;
|
String get watchHistory;
|
||||||
|
|
||||||
/// No description provided for @settings.
|
/// No description provided for @settings.
|
||||||
@@ -2131,7 +2143,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @myFavorites.
|
/// No description provided for @myFavorites.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'My Favorites'**
|
/// **'Favorites'**
|
||||||
String get myFavorites;
|
String get myFavorites;
|
||||||
|
|
||||||
/// No description provided for @noFavorites.
|
/// No description provided for @noFavorites.
|
||||||
@@ -3265,7 +3277,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @recommendTopTab.
|
/// No description provided for @recommendTopTab.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Recommend'**
|
/// **'Featured'**
|
||||||
String get recommendTopTab;
|
String get recommendTopTab;
|
||||||
|
|
||||||
/// No description provided for @playlistTopTab.
|
/// No description provided for @playlistTopTab.
|
||||||
@@ -3415,7 +3427,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @offlineDownloads.
|
/// No description provided for @offlineDownloads.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Offline downloads'**
|
/// **'Downloads'**
|
||||||
String get offlineDownloads;
|
String get offlineDownloads;
|
||||||
|
|
||||||
/// No description provided for @watchPreferences.
|
/// No description provided for @watchPreferences.
|
||||||
@@ -3433,7 +3445,7 @@ abstract class AppLocalizations {
|
|||||||
/// No description provided for @vipBrandName.
|
/// No description provided for @vipBrandName.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'FruitShorts VIP'**
|
/// **'VIP'**
|
||||||
String get vipBrandName;
|
String get vipBrandName;
|
||||||
|
|
||||||
/// No description provided for @vipOpenNow.
|
/// No description provided for @vipOpenNow.
|
||||||
@@ -3586,6 +3598,12 @@ abstract class AppLocalizations {
|
|||||||
/// **'About us'**
|
/// **'About us'**
|
||||||
String get aboutUs;
|
String get aboutUs;
|
||||||
|
|
||||||
|
/// No description provided for @aboutBrandName.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Your mini business'**
|
||||||
|
String get aboutBrandName;
|
||||||
|
|
||||||
/// No description provided for @aboutDescription.
|
/// No description provided for @aboutDescription.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
AppLocalizationsEn([String locale = 'en']) : super(locale);
|
AppLocalizationsEn([String locale = 'en']) : super(locale);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get appName => 'FruitShorts';
|
String get appName => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get demo => 'DEMO';
|
String get demo => 'DEMO';
|
||||||
@@ -67,7 +67,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get recommended => 'Recommended';
|
String get recommended => 'Recommended';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get fruitShortsBrand => 'FruitShorts';
|
String get fruitShortsBrand => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get comingSoon => 'Coming soon';
|
String get comingSoon => 'Coming soon';
|
||||||
@@ -191,6 +191,11 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
return '$count heat';
|
return '$count heat';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String likesLabel(String count) {
|
||||||
|
return '$count likes';
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get topCharts => 'Hot Ranking';
|
String get topCharts => 'Hot Ranking';
|
||||||
|
|
||||||
@@ -644,6 +649,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get episodes => 'Episodes';
|
String get episodes => 'Episodes';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get similarDramas => 'More like this';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get synopsisTitle => 'Synopsis';
|
String get synopsisTitle => 'Synopsis';
|
||||||
|
|
||||||
@@ -706,7 +714,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get noMediaNotice => 'This episode has no playable media yet.';
|
String get noMediaNotice => 'This episode has no playable media yet.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get noStories => 'No stories available yet.';
|
String get noStories => 'No stories available yet';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get notices => 'Notices';
|
String get notices => 'Notices';
|
||||||
@@ -828,10 +836,10 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get preferencesHeading => 'PREFERENCES';
|
String get preferencesHeading => 'PREFERENCES';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get brandMark => 'FRUITSHORTS';
|
String get brandMark => 'YMB';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shareFooter => 'FruitShorts';
|
String get shareFooter => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shortsTab => 'Shorts';
|
String get shortsTab => 'Shorts';
|
||||||
@@ -903,7 +911,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get freeBonus => 'Get Free Bonus';
|
String get freeBonus => 'Get Free Bonus';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get watchHistory => 'Watch History';
|
String get watchHistory => 'History';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get settings => 'Settings';
|
String get settings => 'Settings';
|
||||||
@@ -1089,7 +1097,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
'Could not update favorites. Please retry.';
|
'Could not update favorites. Please retry.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get myFavorites => 'My Favorites';
|
String get myFavorites => 'Favorites';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get noFavorites => 'No favorites yet.';
|
String get noFavorites => 'No favorites yet.';
|
||||||
@@ -1708,7 +1716,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get emptyContent => 'No content yet';
|
String get emptyContent => 'No content yet';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get recommendTopTab => 'Recommend';
|
String get recommendTopTab => 'Featured';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get playlistTopTab => 'Playlists';
|
String get playlistTopTab => 'Playlists';
|
||||||
@@ -1783,7 +1791,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get uidCopied => 'UID copied';
|
String get uidCopied => 'UID copied';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get offlineDownloads => 'Offline downloads';
|
String get offlineDownloads => 'Downloads';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get watchPreferences => 'Watch preferences';
|
String get watchPreferences => 'Watch preferences';
|
||||||
@@ -1792,7 +1800,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
String get contactSupport => 'Contact support';
|
String get contactSupport => 'Contact support';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get vipBrandName => 'FruitShorts VIP';
|
String get vipBrandName => 'VIP';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get vipOpenNow => 'Get VIP';
|
String get vipOpenNow => 'Get VIP';
|
||||||
@@ -1883,6 +1891,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get aboutUs => 'About us';
|
String get aboutUs => 'About us';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get aboutBrandName => 'Your mini business';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get aboutDescription =>
|
String get aboutDescription =>
|
||||||
'A focused, immersive place to watch short dramas.';
|
'A focused, immersive place to watch short dramas.';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
AppLocalizationsId([String locale = 'id']) : super(locale);
|
AppLocalizationsId([String locale = 'id']) : super(locale);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get appName => 'FruitShorts';
|
String get appName => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get demo => 'Demo';
|
String get demo => 'Demo';
|
||||||
@@ -67,7 +67,7 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
String get recommended => 'Rekomendasi';
|
String get recommended => 'Rekomendasi';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get fruitShortsBrand => 'FruitShorts';
|
String get fruitShortsBrand => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get comingSoon => 'Segera hadir';
|
String get comingSoon => 'Segera hadir';
|
||||||
@@ -191,6 +191,11 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
return '$count panas';
|
return '$count panas';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String likesLabel(String count) {
|
||||||
|
return '$count suka';
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get topCharts => 'Peringkat Populer';
|
String get topCharts => 'Peringkat Populer';
|
||||||
|
|
||||||
@@ -645,6 +650,9 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get episodes => 'Episode';
|
String get episodes => 'Episode';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get similarDramas => 'Rekomendasi Serupa';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get synopsisTitle => 'Sinopsis';
|
String get synopsisTitle => 'Sinopsis';
|
||||||
|
|
||||||
@@ -709,7 +717,7 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
'Episode ini belum punya media yang bisa diputar.';
|
'Episode ini belum punya media yang bisa diputar.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get noStories => 'Belum ada cerita.';
|
String get noStories => 'Belum ada cerita';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get notices => 'Notifikasi';
|
String get notices => 'Notifikasi';
|
||||||
@@ -831,10 +839,10 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
String get preferencesHeading => 'PREFERENSI';
|
String get preferencesHeading => 'PREFERENSI';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get brandMark => 'FRUITSHORTS';
|
String get brandMark => 'YMB';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shareFooter => 'FruitShorts';
|
String get shareFooter => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shortsTab => 'Drama Pendek';
|
String get shortsTab => 'Drama Pendek';
|
||||||
@@ -906,7 +914,7 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
String get freeBonus => 'Bonus Gratis';
|
String get freeBonus => 'Bonus Gratis';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get watchHistory => 'Riwayat Tontonan';
|
String get watchHistory => 'Riwayat';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get settings => 'Pengaturan';
|
String get settings => 'Pengaturan';
|
||||||
@@ -1091,7 +1099,7 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
String get favoriteToggleFailed => 'Gagal memperbarui favorit. Coba lagi.';
|
String get favoriteToggleFailed => 'Gagal memperbarui favorit. Coba lagi.';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get myFavorites => 'Favorit Saya';
|
String get myFavorites => 'Favorit';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get noFavorites => 'Belum ada favorit.';
|
String get noFavorites => 'Belum ada favorit.';
|
||||||
@@ -1708,7 +1716,7 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
String get emptyContent => 'Belum ada konten';
|
String get emptyContent => 'Belum ada konten';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get recommendTopTab => 'Rekomendasi';
|
String get recommendTopTab => 'Unggulan';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get playlistTopTab => 'Daftar Putar';
|
String get playlistTopTab => 'Daftar Putar';
|
||||||
@@ -1785,7 +1793,7 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
String get uidCopied => 'UID disalin';
|
String get uidCopied => 'UID disalin';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get offlineDownloads => 'Unduhan offline';
|
String get offlineDownloads => 'Unduhan';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get watchPreferences => 'Preferensi tontonan';
|
String get watchPreferences => 'Preferensi tontonan';
|
||||||
@@ -1794,7 +1802,7 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
String get contactSupport => 'Hubungi dukungan';
|
String get contactSupport => 'Hubungi dukungan';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get vipBrandName => 'FruitShorts VIP';
|
String get vipBrandName => 'VIP';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get vipOpenNow => 'Buka VIP';
|
String get vipOpenNow => 'Buka VIP';
|
||||||
@@ -1885,6 +1893,9 @@ class AppLocalizationsId extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get aboutUs => 'Tentang kami';
|
String get aboutUs => 'Tentang kami';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get aboutBrandName => 'Your mini business';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get aboutDescription =>
|
String get aboutDescription =>
|
||||||
'Tempat fokus dan imersif untuk menonton drama pendek.';
|
'Tempat fokus dan imersif untuk menonton drama pendek.';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
AppLocalizationsZh([String locale = 'zh']) : super(locale);
|
AppLocalizationsZh([String locale = 'zh']) : super(locale);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get appName => 'FruitShorts';
|
String get appName => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get demo => '演示';
|
String get demo => '演示';
|
||||||
@@ -66,7 +66,7 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
String get recommended => '推荐';
|
String get recommended => '推荐';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get fruitShortsBrand => 'FruitShorts';
|
String get fruitShortsBrand => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get comingSoon => '即将上线';
|
String get comingSoon => '即将上线';
|
||||||
@@ -189,6 +189,11 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
return '$count热度';
|
return '$count热度';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String likesLabel(String count) {
|
||||||
|
return '$count次点赞';
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get topCharts => '热播榜';
|
String get topCharts => '热播榜';
|
||||||
|
|
||||||
@@ -638,6 +643,9 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get episodes => '选集';
|
String get episodes => '选集';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get similarDramas => '相似推荐';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get synopsisTitle => '简介';
|
String get synopsisTitle => '简介';
|
||||||
|
|
||||||
@@ -699,7 +707,7 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
String get noMediaNotice => '该剧集还没有可播放的片源。';
|
String get noMediaNotice => '该剧集还没有可播放的片源。';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get noStories => '暂无剧目。';
|
String get noStories => '暂无剧目';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get notices => '通知';
|
String get notices => '通知';
|
||||||
@@ -818,10 +826,10 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
String get preferencesHeading => '偏好设置';
|
String get preferencesHeading => '偏好设置';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get brandMark => 'FRUITSHORTS';
|
String get brandMark => 'YMB';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shareFooter => 'FruitShorts';
|
String get shareFooter => 'ymb';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get shortsTab => '短剧';
|
String get shortsTab => '短剧';
|
||||||
@@ -1683,7 +1691,7 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
String get emptyContent => '暂无内容';
|
String get emptyContent => '暂无内容';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get recommendTopTab => '推荐';
|
String get recommendTopTab => '精选';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get playlistTopTab => '剧单';
|
String get playlistTopTab => '剧单';
|
||||||
@@ -1767,7 +1775,7 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
String get contactSupport => '联系客服';
|
String get contactSupport => '联系客服';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get vipBrandName => 'FruitShorts VIP';
|
String get vipBrandName => 'VIP';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get vipOpenNow => '立即开通';
|
String get vipOpenNow => '立即开通';
|
||||||
@@ -1858,6 +1866,9 @@ class AppLocalizationsZh extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get aboutUs => '关于我们';
|
String get aboutUs => '关于我们';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get aboutBrandName => 'Your mini business';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get aboutDescription => '专注于短剧观看与沉浸式追剧体验。';
|
String get aboutDescription => '专注于短剧观看与沉浸式追剧体验。';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"@@locale": "zh",
|
"@@locale": "zh",
|
||||||
"appName": "FruitShorts",
|
"appName": "ymb",
|
||||||
"demo": "演示",
|
"demo": "演示",
|
||||||
"homeHeadline": "即刻观看",
|
"homeHeadline": "即刻观看",
|
||||||
"homeSubtitle": "免费短剧预览。",
|
"homeSubtitle": "免费短剧预览。",
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
"searchCancel": "取消",
|
"searchCancel": "取消",
|
||||||
"featured": "精选",
|
"featured": "精选",
|
||||||
"recommended": "推荐",
|
"recommended": "推荐",
|
||||||
"fruitShortsBrand": "FruitShorts",
|
"fruitShortsBrand": "ymb",
|
||||||
"comingSoon": "即将上线",
|
"comingSoon": "即将上线",
|
||||||
"authLegal": "继续即代表同意《用户协议》与《隐私政策》",
|
"authLegal": "继续即代表同意《用户协议》与《隐私政策》",
|
||||||
"authLegalLead": "继续即代表同意",
|
"authLegalLead": "继续即代表同意",
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
"authorNoteLabel": "作者声明",
|
"authorNoteLabel": "作者声明",
|
||||||
"reserve": "预约",
|
"reserve": "预约",
|
||||||
"heatLabel": "{count}热度",
|
"heatLabel": "{count}热度",
|
||||||
|
"likesLabel": "{count}次点赞",
|
||||||
"topCharts": "热播榜",
|
"topCharts": "热播榜",
|
||||||
"newReleases": "新剧",
|
"newReleases": "新剧",
|
||||||
"newDramas": "新剧",
|
"newDramas": "新剧",
|
||||||
@@ -281,6 +282,7 @@
|
|||||||
"episodeCount": "{count} 集",
|
"episodeCount": "{count} 集",
|
||||||
"technicalDemoCount": "免费试看 · {count} 集",
|
"technicalDemoCount": "免费试看 · {count} 集",
|
||||||
"episodes": "选集",
|
"episodes": "选集",
|
||||||
|
"similarDramas": "相似推荐",
|
||||||
"synopsisTitle": "简介",
|
"synopsisTitle": "简介",
|
||||||
"watchEpisodeOne": "观看第 1 集",
|
"watchEpisodeOne": "观看第 1 集",
|
||||||
"continueEpisode": "续看第 {number} 集",
|
"continueEpisode": "续看第 {number} 集",
|
||||||
@@ -299,7 +301,7 @@
|
|||||||
"categoriesError": "分类加载失败。",
|
"categoriesError": "分类加载失败。",
|
||||||
"detailError": "剧集信息加载失败。",
|
"detailError": "剧集信息加载失败。",
|
||||||
"noMediaNotice": "该剧集还没有可播放的片源。",
|
"noMediaNotice": "该剧集还没有可播放的片源。",
|
||||||
"noStories": "暂无剧目。",
|
"noStories": "暂无剧目",
|
||||||
"notices": "通知",
|
"notices": "通知",
|
||||||
"noNotices": "暂无通知。",
|
"noNotices": "暂无通知。",
|
||||||
"noticesLoadFailed": "通知加载失败,请重试。",
|
"noticesLoadFailed": "通知加载失败,请重试。",
|
||||||
@@ -348,8 +350,8 @@
|
|||||||
"genreDramaMystery": "剧情 · 悬疑",
|
"genreDramaMystery": "剧情 · 悬疑",
|
||||||
"continueWatchingHeading": "继续观看",
|
"continueWatchingHeading": "继续观看",
|
||||||
"preferencesHeading": "偏好设置",
|
"preferencesHeading": "偏好设置",
|
||||||
"brandMark": "FRUITSHORTS",
|
"brandMark": "YMB",
|
||||||
"shareFooter": "FruitShorts",
|
"shareFooter": "ymb",
|
||||||
"shortsTab": "短剧",
|
"shortsTab": "短剧",
|
||||||
"myListTab": "片单",
|
"myListTab": "片单",
|
||||||
"watchFull": "看全集",
|
"watchFull": "看全集",
|
||||||
@@ -684,7 +686,7 @@
|
|||||||
"homeBadgeNew": "新剧",
|
"homeBadgeNew": "新剧",
|
||||||
"homeBadgeAnime": "漫剧",
|
"homeBadgeAnime": "漫剧",
|
||||||
"emptyContent": "暂无内容",
|
"emptyContent": "暂无内容",
|
||||||
"recommendTopTab": "推荐",
|
"recommendTopTab": "精选",
|
||||||
"playlistTopTab": "剧单",
|
"playlistTopTab": "剧单",
|
||||||
"allDramasTopTab": "全部短剧",
|
"allDramasTopTab": "全部短剧",
|
||||||
"weeklyHitsTitle": "本週爆款推薦",
|
"weeklyHitsTitle": "本週爆款推薦",
|
||||||
@@ -712,7 +714,7 @@
|
|||||||
"offlineDownloads": "离线缓存",
|
"offlineDownloads": "离线缓存",
|
||||||
"watchPreferences": "观看偏好",
|
"watchPreferences": "观看偏好",
|
||||||
"contactSupport": "联系客服",
|
"contactSupport": "联系客服",
|
||||||
"vipBrandName": "FruitShorts VIP",
|
"vipBrandName": "VIP",
|
||||||
"vipOpenNow": "立即开通",
|
"vipOpenNow": "立即开通",
|
||||||
"vipBenefitFree": "全剧免费看",
|
"vipBenefitFree": "全剧免费看",
|
||||||
"vipBenefitNoAds": "免广告打扰",
|
"vipBenefitNoAds": "免广告打扰",
|
||||||
@@ -774,6 +776,7 @@
|
|||||||
"dataUnavailable": "—",
|
"dataUnavailable": "—",
|
||||||
"commonQuestions": "常见问题",
|
"commonQuestions": "常见问题",
|
||||||
"aboutUs": "关于我们",
|
"aboutUs": "关于我们",
|
||||||
|
"aboutBrandName": "Your mini business",
|
||||||
"aboutDescription": "专注于短剧观看与沉浸式追剧体验。",
|
"aboutDescription": "专注于短剧观看与沉浸式追剧体验。",
|
||||||
"versionLabel": "版本 {version}",
|
"versionLabel": "版本 {version}",
|
||||||
"@versionLabel": {
|
"@versionLabel": {
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ class _AuthBrand extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final copy = _brandCopy(context, centered: !compact);
|
final copy = _brandCopy(centered: !compact);
|
||||||
if (compact) {
|
if (compact) {
|
||||||
return Row(
|
return Row(
|
||||||
key: const Key('auth-brand'),
|
key: const Key('auth-brand'),
|
||||||
@@ -324,32 +324,14 @@ class _AuthBrand extends StatelessWidget {
|
|||||||
radius: compact ? _compactBrandMarkRadius : _brandMarkRadius,
|
radius: compact ? _compactBrandMarkRadius : _brandMarkRadius,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _brandCopy(BuildContext context, {required bool centered}) => Column(
|
Widget _brandCopy({required bool centered}) => Text(
|
||||||
crossAxisAlignment: centered
|
tagline,
|
||||||
? CrossAxisAlignment.center
|
textAlign: centered ? TextAlign.center : TextAlign.start,
|
||||||
: CrossAxisAlignment.start,
|
style: const TextStyle(
|
||||||
children: [
|
color: AppColors.muted,
|
||||||
Text(
|
fontSize: 13,
|
||||||
AppLocalizations.of(context)!.appName,
|
height: 1.35,
|
||||||
textAlign: centered ? TextAlign.center : TextAlign.start,
|
),
|
||||||
style: const TextStyle(
|
|
||||||
color: AppColors.onSurface,
|
|
||||||
fontSize: 24,
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
height: 1.1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 6),
|
|
||||||
Text(
|
|
||||||
tagline,
|
|
||||||
textAlign: centered ? TextAlign.center : TextAlign.start,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: AppColors.muted,
|
|
||||||
fontSize: 13,
|
|
||||||
height: 1.35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||