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

Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'. #173

Open
vaghelamax opened this issue Jun 23, 2024 · 1 comment

Comments

@vaghelamax
Copy link

Version

5.2.3

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.2.1 23C71 darwin-arm64, locale
    en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.85.2)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for M’s iPhone. Ensure the
      device is unlocked and attached with a cable or associated with the same
      local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code
      -27)
[✓] Network resources

What platforms are you seeing the problem on?

iOS

What happened?

When we try to run the app, it gives error

Failed to build iOS app
Could not build the precompiled application for the device.
Error (Xcode): ../../../../.pub-cache/hosted/pub.dev/persistent_bottom_nav_bar_v2-4.2.8/lib/neumorphic-package-by-serge-software/neumorphic-card.dart:57:57: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'.

Error launching application on iPhone.

Steps to reproduce

Just run the app

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Code to reproduce the problem

PersistentTabView(
      context,
      onWillPop: backConfirm,
      screens: _buildScreens(),
      items: _navBarsItems(),
      padding: const NavBarPadding.all(10),
      controller: controller,
      navBarHeight: 70,
      confineInSafeArea: true,
      decoration: const NavBarDecoration(
        colorBehindNavBar: Colors.white,
        gradient: LinearGradient(
          colors: [
            Color(0xFF3c2789),
            Color(0xFFad21af),
          ],
          begin: Alignment.centerLeft,
          end: Alignment.centerRight,
        ),
      ),
      backgroundColor: Colors.white,
      handleAndroidBackButtonPress: true,

      stateManagement: true,
      hideNavigationBarWhenKeyboardShows: true,
      popAllScreensOnTapOfSelectedTab: true,
      popActionScreens: PopActionScreensType.all,
      itemAnimationProperties: const ItemAnimationProperties(
        duration: Duration(milliseconds: 200),
        curve: Curves.ease,
      ),
      navBarStyle: NavBarStyle.style8,
    )

Relevant log output

No response

Screenshots

No response

@jb3rndt
Copy link
Owner

jb3rndt commented Jun 30, 2024

This got fixed some while ago. Please upgrade your dependencies by running dart pub upgrade or pin the version of this package by replacing persistent_bottom_nav_bar_v2: ^5.x.x with persistent_bottom_nav_bar_v2: 5.2.3 in your pubspec.yaml (note the missing caret).

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