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