Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 'NavigationNotification' isn't a type. #143

Open
shashankflutter opened this issue Apr 12, 2024 · 1 comment
Open

[Bug]: 'NavigationNotification' isn't a type. #143

shashankflutter opened this issue Apr 12, 2024 · 1 comment

Comments

@shashankflutter
Copy link

shashankflutter commented Apr 12, 2024

Version

5.2.2

What platforms are you seeing the problem on?

Android

What happened?

On Run app

Code to reproduce the problem

NotificationListener<NavigationNotification>(
          onNotification: (notification) {
            final newCanPop =
                calcCanPop(subtreeCantHandlePop: !notification.canHandlePop);
            if (newCanPop != canPop) {
              setState(() {
                canPop = newCanPop;
              });
            }
            return false;
          },
          child: navigationBarWidget(),
        ),

Relevant log output

../../.pub-cache/hosted/pub.dev/persistent_bottom_nav_bar_v2-5.2.2/lib/components/persistent_tab_view.dart:361:37: Error: 'NavigationNotification' isn't a type.
        child: NotificationListener<NavigationNotification>(
                                    ^^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/persistent_bottom_nav_bar_v2-5.2.2/lib/components/persistent_tab_view.dart:344:14: Error: The method 'PopScope' isn't defined for the class '_PersistentTabViewState'.
 - '_PersistentTabViewState' is from 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart' ('../../.pub-cache/hosted/pub.dev/persistent_bottom_nav_bar_v2-5.2.2/lib/persistent_bottom_nav_bar_v2.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PopScope'.
      return PopScope(
             ^^^^^^^^
../../.pub-cache/hosted/pub.dev/persistent_bottom_nav_bar_v2-5.2.2/lib/components/persistent_tab_view.dart:364:64: Error: The getter 'canHandlePop' isn't defined for the class 'Object?'.
 - 'Object' is from 'dart:core'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'canHandlePop'.
                calcCanPop(subtreeCantHandlePop: !notification.canHandlePop);

Screenshots

No response

@jb3rndt
Copy link
Owner

jb3rndt commented Apr 12, 2024

Which version of flutter are you using? Please paste the output of flutter doctor -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants