Как прикрепить флиптер swiper к любому виду прокрутки? У меня есть горизонтальный swiper, я прокручиваю свой пользовательский интерфейс, а затем прокручиваю назад (вверх), в результате я получаю исключение «ScrollController не привязан ни к одному виду прокрутки». Что я должен сделать, чтобы это исправить. Не могли бы вы мне помочь?
class SwiperTop extends StatelessWidget {
MBloc _Bloc = BlocProvider.getBloc<MBloc>();
@override
Widget build(BuildContext context) {
return Container(
height: 284.0,
child: StreamBuilder(
initialData: List<MEntity>(),
stream: _mBloc.listMoviesFlux,
builder: (BuildContext context, AsyncSnapshot snapshot) {
if (!snapshot.hasData) return Container(height: 1, width: 1);
return Swiper(
loop: true,
itemCount: snapshot.data.length,
itemBuilder: (BuildContext context, int index) {
return _itemM(snapshot.data[index], context, index);
},
viewportFraction: 0.8,
scale: 0.8,
autoplay: true,
duration: 300,
autoplayDelay: 3000,
index: 0,
);
}),
);
}
}