Wait 2 sec before refresh ressources (on create)
This commit is contained in:
parent
8824609fad
commit
fb0a8674d1
@ -42,17 +42,21 @@ class _SliderInputContainerState extends State<SliderInputContainer> {
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Slider(
|
||||
value: currentValue!,
|
||||
onChanged: (value) {
|
||||
setState(() => currentValue = value);
|
||||
widget.onChanged(value);
|
||||
},
|
||||
divisions: widget.max - widget.min,
|
||||
min: widget.min.toDouble(),
|
||||
max: widget.max.toDouble(),
|
||||
label: "$currentValue",
|
||||
activeColor: widget.color,
|
||||
child: SliderTheme(
|
||||
data: SliderThemeData(
|
||||
showValueIndicator: ShowValueIndicator.always),
|
||||
child: Slider(
|
||||
value: currentValue!,
|
||||
onChanged: (value) {
|
||||
setState(() => currentValue = value);
|
||||
widget.onChanged(value);
|
||||
},
|
||||
divisions: widget.max - widget.min,
|
||||
min: widget.min.toDouble(),
|
||||
max: widget.max.toDouble(),
|
||||
label: "$currentValue",
|
||||
activeColor: widget.color,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@ -68,7 +68,10 @@ class _ResourcesScreenState extends State<ResourcesScreen> {
|
||||
if (result != null)
|
||||
{
|
||||
await create(result[0], result[1], result[2], appContext, context);
|
||||
setState(() {}); // For refresh
|
||||
Future.delayed(Duration(seconds: 2), () {
|
||||
setState(() {});
|
||||
});
|
||||
// For refresh
|
||||
}
|
||||
} else {
|
||||
var result = await showResource(value, appContext, context, size);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user