Skip to content

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

@shashankflutter

Description

@shashankflutter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions