opt video bottomsheet

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-03 23:10:41 +08:00
parent 508384c016
commit af1cd30ed7
7 changed files with 18 additions and 34 deletions

View File

@@ -7,10 +7,10 @@ class CustomFractionallySizedBox extends FractionallySizedBox {
const CustomFractionallySizedBox({
super.key,
super.alignment,
super.widthFactor,
super.heightFactor,
super.child,
required double super.widthFactor,
required double super.heightFactor,
required this.maxWidth,
super.child,
});
final double maxWidth;
@@ -44,7 +44,10 @@ class CustomRenderFractionallySizedOverflowBox
double minWidth = constraints.minWidth;
double maxWidth = constraints.maxWidth;
if (widthFactor != null) {
final double width = math.min(_maxWidth, maxWidth * widthFactor!);
double width = maxWidth * widthFactor!;
if (maxWidth > constraints.maxHeight) {
width = math.min(_maxWidth, width);
}
minWidth = width;
maxWidth = width;
}