1

It is a simple flutter desktop app which has image and video player. it just simply display both one by one, by navigating it on that page. both images and videos are stored locally into the application asset folder. I am just iterating on the assetslist[] whish has file name and file type (isImage: true/false) application run prefectly for more than 24 hr, after that is stopes looping on the list and not navigating on the next page. screen froze on the same item,

I am using this to navigate to the naxt page

Future.delayed(Duration(seconds: 4), (){
          Navigator.pushReplacement(
            context,
            PageTransition(
              duration: Duration(milliseconds: 100),
              type: PageTransitionType.fade,
              child:(assetslist[currentIndex].isImage)?
              DisplayImagePage(currentIndex:currentIndex):
              DartVclPlayer(currentIndex: currentIndex),
            ),
          );

        });

All assets are fine indexing are correct file type are correct runs perfectly for more than 24hrs but then stops working , I tried this one also

Future.delayed(Duration(seconds: 4), () {
            Navigator.pushReplacement(
                context,
                MaterialPageRoute(
                  builder: (context) => (assetslist[currentIndex].isImage)
                      ? DisplayImagePage(currentIndex: currentIndex)
                      : DartVclPlayer(
                          currentIndex: currentIndex,
                ));
          });

0 Answers0