mirror of
https://github.com/Iconica-Development/flutter_start.git
synced 2025-05-18 18:13:45 +02:00
fix: add mounted check to navigation after async gap for navigator version
This commit is contained in:
parent
51046aff1f
commit
6ecc2f0992
1 changed files with 10 additions and 6 deletions
|
@ -50,18 +50,22 @@ Widget _splashScreen(
|
||||||
|
|
||||||
if (configuration.useKillswitch && isAllowedToPassThrough) return;
|
if (configuration.useKillswitch && isAllowedToPassThrough) return;
|
||||||
|
|
||||||
if (!configuration.showIntroduction || introductionSeen) {
|
if ((!configuration.showIntroduction || introductionSeen) &&
|
||||||
|
context.mounted) {
|
||||||
await navigator.pushReplacement(
|
await navigator.pushReplacement(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => _home(configuration, context),
|
builder: (context) => _home(configuration, context),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
await navigator.pushReplacement(
|
|
||||||
MaterialPageRoute(
|
if (context.mounted) {
|
||||||
builder: (context) => _introduction(configuration, context),
|
await navigator.pushReplacement(
|
||||||
),
|
MaterialPageRoute(
|
||||||
);
|
builder: (context) => _introduction(configuration, context),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return configuration.splashScreenBuilder?.call(
|
return configuration.splashScreenBuilder?.call(
|
||||||
|
|
Loading…
Reference in a new issue