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,14 @@
import 'package:flutter/widgets.dart';
double computeDetailScrollProgress(
BuildContext context,
double offset, {
double? collapseExtent,
}) {
final mq = MediaQuery.of(context);
if (mq.disableAnimations) return offset > 10 ? 1.0 : 0.0;
final maxScroll = collapseExtent ?? mq.size.height * 0.8;
final raw = (offset / maxScroll).clamp(0.0, 1.0);
return (raw * 100).roundToDouble() / 100;
}