简体   繁体   中英

flutter countdown timer plugin not working, trying to set it to my own time but not working

I found a flutter plugin for a count down timer but I can't seem to edit the time property to my own time

here is the code for the plugin, it only works for this number 1576839556732 which sets the timer to two hundred days, I was trying to set it to 10 minutes

child:CountdownTimer(
    endTime: 1576839556732,
    textStyle: TextStyle(fontSize: 30, color: Colors.black,fontFamily:"Clan-Medium"),
     onEnd: (){
   print("Game Over");
    },
        
         
)

Try this package instead: https://pub.dev/packages/slide_countdown_clock

SlideCountdownClock(
          duration: Duration(days: 20, minutes: 1000000),
          slideDirection: SlideDirection.Up,
          separator: ":",
          textStyle: TextStyle(
            fontSize: 20,
            fontWeight: FontWeight.bold,
          ),
          shouldShowDay: true,
          onDone: () {
            _scaffoldKey.currentState.showSnackBar(SnackBar(content: Text('Clock 1 finished')));
          },
        ),

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM