Initial commit

This commit is contained in:
admin1
2026-07-14 11:11:36 +08:00
commit 656499cf94
604 changed files with 119518 additions and 0 deletions
@@ -0,0 +1,27 @@
import 'dart:math' as math;
import 'package:flutter/material.dart';
const double androidDetailDesktopTitleBarHeight = 38.0;
const double androidDetailNavigationContentHeight = 30.0;
double computeAndroidDetailNavigationHeight(BuildContext context) {
final topInset = MediaQuery.paddingOf(context).top;
return math.max(topInset, androidDetailDesktopTitleBarHeight) +
androidDetailNavigationContentHeight;
}
double computeAndroidDetailBannerHeight(BuildContext context) {
final mediaQuery = MediaQuery.of(context);
final bodyHeight = mediaQuery.size.height - mediaQuery.padding.top;
final preferredHeight = (bodyHeight * 0.46).clamp(300.0, 390.0);
final landscapeSafeHeight = bodyHeight * 0.55;
return math.min(preferredHeight, landscapeSafeHeight);
}
double computeAndroidDetailCollapseExtent(BuildContext context) {
final bannerHeight = computeAndroidDetailBannerHeight(context);
final navigationHeight = computeAndroidDetailNavigationHeight(context);
return math.max(1.0, bannerHeight - navigationHeight);
}