Remove ExcludeSemantics widgets which exists down the tree from a Parent ExcludeSemantics widget

This commit is contained in:
ashilkn 2023-07-10 12:11:23 +05:30
parent 21e836643b
commit 0f6eb2f2c2
3 changed files with 13 additions and 13 deletions

View file

@ -185,7 +185,9 @@ class HugeListViewState<T> extends State<HugeListView<T>> {
: ListView.builder(
itemCount: max(widget.totalCount, 0),
itemBuilder: (context, index) {
return widget.itemBuilder(context, index);
return ExcludeSemantics(
child: widget.itemBuilder(context, index),
);
},
);
}

View file

@ -31,17 +31,15 @@ class GalleryGridViewWidget extends StatelessWidget {
physics: const NeverScrollableScrollPhysics(),
// to disable GridView's scrolling
itemBuilder: (context, index) {
return ExcludeSemantics(
child: GalleryFileWidget(
file: filesInGroup[index],
selectedFiles: selectedFiles,
limitSelectionToOne: limitSelectionToOne,
tag: tag,
photoGridSize: photoGridSize,
currentUserID: currentUserID,
filesInGroup: filesInGroup,
asyncLoader: asyncLoader,
),
return GalleryFileWidget(
file: filesInGroup[index],
selectedFiles: selectedFiles,
limitSelectionToOne: limitSelectionToOne,
tag: tag,
photoGridSize: photoGridSize,
currentUserID: currentUserID,
filesInGroup: filesInGroup,
asyncLoader: asyncLoader,
);
},
itemCount: filesInGroup.length,

View file

@ -32,7 +32,7 @@ class PlaceHolderGridViewWidget extends StatelessWidget {
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
return ExcludeSemantics(child: Container(color: faintColor));
return Container(color: faintColor);
},
itemCount: limitCount,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(