Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSelectionChange is not providing updated values for initTime and endTime #11

Open
SaadArdati opened this issue Aug 22, 2019 · 0 comments

Comments

@SaadArdati
Copy link

SaadArdati commented Aug 22, 2019

2019-08-22_13-51-31

DoubleCircularSlider(
  48,
  0,
  10,
  height: 230.0,
  width: 230.0,
  primarySectors: 4,
  secondarySectors: 12,
  baseColor: Color.fromRGBO(255, 255, 255, 0.1),
  selectionColor: Theme.of(context).primaryColor,
  handlerColor: Color(0xFFEEEEEE),
  onSelectionChange: (int initTime, int endTime, int laps) {
    setState(() {
      this.initTime = initTime;
      this.endTime = endTime;
    });
  },
  child: Padding(
    padding: const EdgeInsets.all(42.0),
    child: Center(
        child: Text('${_formatIntervalTime(initTime, endTime)}',
            style: TextStyle(fontSize: 36.0, color: Colors.white))),
  ),
),

Hot reloading properly updates the state (updates the time)

@SaadArdati SaadArdati changed the title onSelectionChange is not updating to the new times onSelectionChange is not updating the state Aug 22, 2019
@SaadArdati SaadArdati changed the title onSelectionChange is not updating the state onSelectionChange is not triggering Aug 22, 2019
@SaadArdati SaadArdati changed the title onSelectionChange is not triggering onSelectionChange is not providing updated values for initTime and endTime Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant