feat(flutter): 重构四 Tab 与浏览页
This commit is contained in:
1 parent
99c72e2c32
commit
959edc0a32
41 files changed
+2148
-1179
No files matched your search
@@ -42,6 +42,8 @@ abstract final class AppDimens {
|
||||
static const double buttonMedium = 40;
|
||||
static const double buttonLarge = 44;
|
||||
static const double tapTarget = 44;
|
||||
static const double contentHeaderHeight = 46;
|
||||
static const double filterChipHeight = 34;
|
||||
|
||||
static const double navHeight = 54;
|
||||
static const double navIcon = 17;
|
||||
@@ -58,4 +60,12 @@ abstract final class AppDimens {
|
||||
static const double accountLabel = 11;
|
||||
|
||||
static const double watchPlaceholderHeight = 114;
|
||||
static const double heroBannerHeight = 176;
|
||||
static const double continueCoverWidth = 52;
|
||||
static const double continueCoverHeight = 66;
|
||||
|
||||
static const double cardMeta = 9;
|
||||
static const double cardViews = 9;
|
||||
static const double createIcon = 22;
|
||||
static const double createArrow = 18;
|
||||
}
|
||||
@@ -26,7 +26,7 @@ class AppBottomNavItem {
|
||||
final bool selected;
|
||||
}
|
||||
|
||||
/// Shared 3-tab navigation used by all root tabs and the player fallback.
|
||||
/// Shared bottom navigation used by the root shell and standalone tabs.
|
||||
class AppBottomNav extends StatelessWidget {
|
||||
const AppBottomNav({
|
||||
super.key,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../config/app_config.dart';
|
||||
@@ -13,6 +15,7 @@ class RemoteImage extends StatelessWidget {
|
||||
this.fit = BoxFit.cover,
|
||||
this.showFallbackIcon = false,
|
||||
this.fallbackIconKey,
|
||||
this.fallbackAspectRatio,
|
||||
});
|
||||
|
||||
final String path;
|
||||
@@ -21,6 +24,7 @@ class RemoteImage extends StatelessWidget {
|
||||
final BoxFit fit;
|
||||
final bool showFallbackIcon;
|
||||
final Key? fallbackIconKey;
|
||||
final double? fallbackAspectRatio;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -40,7 +44,7 @@ class RemoteImage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _fallback() {
|
||||
return Container(
|
||||
final fallback = Container(
|
||||
width: width,
|
||||
height: height,
|
||||
color: AppColors.bar,
|
||||
@@ -54,5 +58,8 @@ class RemoteImage extends StatelessWidget {
|
||||
)
|
||||
: null,
|
||||
);
|
||||
final ratio = fallbackAspectRatio;
|
||||
if (ratio == null) return fallback;
|
||||
return AspectRatio(aspectRatio: ratio, child: fallback);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user