Я пытаюсь настроить заставку с помощью пакета CustomSplash для флаттера и получаю это исключение,
E/flutter ( 5256): Looking up a deactivated widget's ancestor is unsafe.
E/flutter ( 5256): At this point the state of the widget's element tree is no longer stable.
E/flutter ( 5256): To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling inheritFromWidgetOfExactType() in the widget's didChangeDependencies() method.
Я вставляю свой код ниже
MaterialApp(
home: CustomSplash(
imagePath: 'images/splash_logo.png',
backGroundColor: Colors.white,
animationEffect: 'fade-in',
logoSize: 200,
customFunction: customFunction,
duration: 2500,
type: CustomSplashType.StaticDuration,
home: AppHeader(),
),
) ;
Получаю то же исключение, покаиспользуя флаттер AnimatedSplash
Заранее спасибо.