nav bar: prevent single frame flash during hero
This commit is contained in:
parent
398e1cc89a
commit
c119760bf4
1 changed files with 12 additions and 2 deletions
|
@ -184,10 +184,20 @@ class _AvesFloatingBarState extends State<AvesFloatingBar> with RouteAware {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didPopNext() => _isBlurAllowedNotifier.value = true;
|
void didPopNext() {
|
||||||
|
// post to prevent single frame flash during hero
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
_isBlurAllowedNotifier.value = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didPushNext() => _isBlurAllowedNotifier.value = false;
|
void didPushNext() {
|
||||||
|
// post to prevent single frame flash during hero
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
_isBlurAllowedNotifier.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
Loading…
Reference in a new issue