Skip to content

Create multiple timers at the same time, display exception #40

@ShylockGao

Description

@ShylockGao

Create multiple timers at the same time, display exception
The previous timer will reset the time, and the next one will inherit the remaining time of the previous one

  Widget _timerCountDown() {
    return Countdown(
      // controller: timerController,
      seconds: 120,
      build: (BuildContext context, double time) {
        if (time < 5.0) {
          return Text("ღ( ´・ᴗ・` )",style: TextStyle(color: Colors.white),);
        }else{
          return Text(time.toString(),style: TextStyle(color: Colors.white),);
        }
      },
      interval: Duration(milliseconds: 100),
      onFinished: () {
        print('Timer is done!');
      },
    );
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions