@@ -114,35 +114,37 @@ class MediaGridState extends State<MediaAdaptor> {
114
114
duration: const Duration (milliseconds: 500 ),
115
115
child: Container (
116
116
constraints: const BoxConstraints (maxHeight: double .infinity),
117
- child: ListView .builder (
118
- shrinkWrap: true ,
119
- controller: widget.scrollController,
120
- itemCount: _mediaList.length,
121
- itemBuilder: (context, index) {
122
- return SlideAndScaleAnimation (
123
- initialScale: 0.0 ,
124
- finalScale: 1.0 ,
125
- initialOffset: const Offset (1.0 , 0.0 ),
126
- finalOffset: Offset .zero,
127
- duration: const Duration (milliseconds: 200 ),
128
- child: GestureDetector (
129
- onTap: () {
130
- if (widget.onMediaTap != null ) {
131
- widget.onMediaTap !(index);
132
- } else {
133
- navigateToPage (context, MediaInfoPage (_mediaList[index]));
134
- }
135
- },
136
- onLongPress: () => settingsBottomSheet (context),
137
- child: Container (
138
- width: double .infinity,
139
- margin:
140
- const EdgeInsets .symmetric (horizontal: 18 , vertical: 4 ),
141
- child: MediaPageLargeViewHolder (_mediaList[index]),
117
+ child: PrimaryScrollController (
118
+ controller: widget.scrollController ?? ScrollController (),
119
+ child: ListView .builder (
120
+ physics: const NeverScrollableScrollPhysics (),
121
+ shrinkWrap: true ,
122
+ itemCount: _mediaList.length,
123
+ itemBuilder: (context, index) {
124
+ return SlideAndScaleAnimation (
125
+ initialScale: 0.0 ,
126
+ finalScale: 1.0 ,
127
+ initialOffset: const Offset (0.0 , - 1.0 ),
128
+ finalOffset: const Offset (0.0 , 0.0 ),
129
+ duration: const Duration (milliseconds: 200 ),
130
+ child: GestureDetector (
131
+ onTap: () {
132
+ if (widget.onMediaTap != null ) {
133
+ widget.onMediaTap !(index);
134
+ } else {
135
+ navigateToPage (context, MediaInfoPage (_mediaList[index]));
136
+ }
137
+ },
138
+ onLongPress: () => settingsBottomSheet (context),
139
+ child: Container (
140
+ width: double .infinity,
141
+ margin: const EdgeInsets .symmetric (horizontal: 18 , vertical: 4 ),
142
+ child: MediaPageLargeViewHolder (_mediaList[index]),
143
+ ),
142
144
),
143
- ),
144
- );
145
- } ,
145
+ );
146
+ },
147
+ ) ,
146
148
),
147
149
),
148
150
);
0 commit comments