navbar_router
navbar_router copied to clipboard
Null check operator used on a null value
═══════ Exception caught by widgets library ═══════════════════════════════════
The following _TypeError was thrown building AnimatedBuilder(listenable: Instance of 'NavbarNotifier', state: _AnimatedState#46d47):
Null check operator used on a null value
The relevant error-causing widget was:
NavbarRouter NavbarRouter:file:///Users/mahesh/Development/Projects/vocabhub/lib/base_home.dart:249:17
When the exception was thrown, this was the stack:
#0 NavbarNotifier.length (package:navbar_router/src/navbar_notifier.dart:23:35)
navbar_notifier.dart:23
#1 _NavbarRouterState.build.<anonymous closure> (package:navbar_router/src/navbar_router.dart:360:58)
navbar_router.dart:360
Exception occurs at this place when checking for .length
AnimatedPadding(
/// same duration as [_AnimatedNavbar]'s animation duration
duration: const Duration(milliseconds: 500),
padding: EdgeInsets.only(left: getPadding()),
child: Stack(children: [
for (int i = 0; i < NavbarNotifier.length; i++)
_buildIndexedStackItem(i, context)
]),
),