Closed TolgaYld closed 2 years ago
I think this was a limitation by flutter at that time. It appears to be fixed now.
If I understand you correctly, you meant something like this?
String _startText = "init";
String _endText = "init";
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title!),
),
body: ListView(children: [
TimeRangePicker(
hideButtons: true,
hideTimes: true,
backgroundWidget: Column(
children: [
Text(_startText),
Text(_endText),
],
),
onStartChange: (time) {
setState(() {
_startText = "Start: " + time.format(context).toString();
});
},
onEndChange: (time) {
setState(() {
_endText = "End: " + time.format(context).toString();
});
},
),
]),
);
I will close this issue. If you referred to something different or have other issues, feel free to reopen it or create a new one.
Hi,
If the values in the variables change, the variables in the background widget method do not change, although they were changed in the SetState.
thanks in advance! :)