Open
Description
Thank you for the awsome package!
When trying to create a list of characters from links and display them carousel slider, or a grid list, Flutter3DViewer take a bit of time when scrolling, it also reload the old file after user scroll back.
Similar to precacheImage can we use it for Flutter3DController so it will download the 3d model from the URL locally to improve loading time?
_avatars = _assets
.map((e) => Flutter3DViewer(
progressBarColor: Colors.transparent,
src: e,
))
.toList();
CarouselSlider.builder(
disableGesture: true,
options: CarouselOptions(
viewportFraction: 0.55,
height: context.width * 0.7,
initialPage: 0,
enableInfiniteScroll: true,
reverse: false,
autoPlay: false,
autoPlayCurve: Curves.fastOutSlowIn,
enlargeCenterPage: true,
scrollDirection: Axis.horizontal,
onPageChanged: (index, reason) {
setState(() {
selectedAvatar = index;
});
},
),
itemCount: _assets.length,
itemBuilder: (BuildContext context,
int itemIndex, int pageViewIndex) =>
IgnorePointer(
ignoring: true,
child: Center(
child: _avatars[itemIndex],
),
),
)),