opt reply item

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-10 20:17:15 +08:00
parent 3655c31a48
commit f4d3ec39a0
45 changed files with 71 additions and 74 deletions

View File

@@ -134,7 +134,7 @@ class _NineGridViewState extends State<NineGridView> {
return Rect.fromLTRB(0, 0, padding.horizontal, padding.vertical);
}
double width = widget.width ??
(MediaQuery.of(context).size.width - widget.margin.horizontal);
(MediaQuery.sizeOf(context).width - widget.margin.horizontal);
width = width - padding.horizontal;
double space = widget.space;
double itemW;
@@ -389,11 +389,11 @@ class _NineGridViewState extends State<NineGridView> {
/// get big image size.
Rect _getBigImgSize(double originalWidth, double originalHeight) {
double width = widget.width ??
(MediaQuery.of(context).size.width - widget.margin.horizontal);
(MediaQuery.sizeOf(context).width - widget.margin.horizontal);
width = width - widget.padding.horizontal;
double itemW = (width - widget.space * 2) / 3;
//double devicePixelRatio = MediaQuery.of(context)?.devicePixelRatio ?? 3;
// double devicePixelRatio = MediaQuery.devicePixelRatioOf(context);
double devicePixelRatio = 1.0;
double tempWidth = originalWidth / devicePixelRatio;
double tempHeight = originalHeight / devicePixelRatio;