opt: RepaintBoundary (#1840)

* opt: RepaintBoundary

* fix [skip ci]

* opt time width

* opt: video position

* update

---------

Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2026-02-20 21:04:34 +08:00
committed by GitHub
parent a63ca93762
commit d7d9655f81
12 changed files with 226 additions and 128 deletions

View File

@@ -66,22 +66,25 @@ class ActionItem extends StatelessWidget {
child = SizedBox.square(dimension: 28, child: child);
}
child = InkWell(
borderRadius: const BorderRadius.all(Radius.circular(6)),
onTap: _isThumbsUp ? null : onTap,
onLongPress: _isThumbsUp ? null : onLongPress,
onSecondaryTap: PlatformUtils.isMobile || _isThumbsUp
? null
: onLongPress,
onTapDown: _isThumbsUp ? (_) => onStartTriple!() : null,
onTapUp: _isThumbsUp ? (_) => onCancelTriple!(true) : null,
onTapCancel: _isThumbsUp ? onCancelTriple : null,
child: expand
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [child, _buildText(theme)],
)
: child,
child = Material(
type: .transparency,
child: InkWell(
borderRadius: const BorderRadius.all(Radius.circular(6)),
onTap: _isThumbsUp ? null : onTap,
onLongPress: _isThumbsUp ? null : onLongPress,
onSecondaryTap: PlatformUtils.isMobile || _isThumbsUp
? null
: onLongPress,
onTapDown: _isThumbsUp ? (_) => onStartTriple!() : null,
onTapUp: _isThumbsUp ? (_) => onCancelTriple!(true) : null,
onTapCancel: _isThumbsUp ? onCancelTriple : null,
child: expand
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [child, _buildText(theme)],
)
: child,
),
);
return expand ? Expanded(child: child) : child;
}