I have checkbox widget that I would like to hide for 24 hours after the user click it. I want to prevent then from continuously clicking on the the button.
How are can I do this in Flutter.
Thanks
CodePudding user response:
You can use SharedPreferences lib to store timestamp and then use ternary conditional operator to show or hide your button
yourBool ? RadioButton() : SizedBox()...
CodePudding user response:
You can use Visibility:
Visibility(
child: Widget,
visible: true,
),
make a bool to change this, if user click or logic happended, turn this to true
ther are other ways like Ternary Operators or Opacity like this question answer that you can follow