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

The getter 'backgroundColor' isn't defined for the class 'ThemeData #361

Open
TuOnyxtec opened this issue May 6, 2024 · 16 comments
Open

Comments

@TuOnyxtec
Copy link

../../.pub-cache/hosted/pub.dev/persistent_bottom_nav_bar-5.0.2/lib/neumorphic_package_by_serge_software/neumorphic_card.dart:57:57: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'.

  • 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../snap/flutter/common/flutter/packages/flutter/lib/src/material/theme_data.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'backgroundColor'.
    final color = decoration.color ?? Theme.of(context).backgroundColor;
@VisionBao
Copy link

Same issue to me.

@leorachit
Copy link

Same issue

@ayusha259
Copy link

ayusha259 commented May 14, 2024

Same issue in xcode cloud logs during the build process, although when running it locally it is working fine.
image

@dedyksuntoro
Copy link

#364 I've helped make repairs

@leorachit
Copy link

#364 I've helped make repairs

When will it be pushed to the main branch?

@dedyksuntoro
Copy link

#364 I've helped make repairs

When will it be pushed to the main branch?

just wait until the homeowner does it 😊

@TuOnyxtec
Copy link
Author

TuOnyxtec commented May 15, 2024

Hey guys,

To fix this locally, I suggest making the neumorphic_card.dart file editable and allowing a static color to be passed. This should resolve the error.

final color = Colors.blue;

Thank you!

@ayusha259
Copy link

It's not creating a problem for me locally but the build process is being affected and forcing me to create a build manually to upload it to app store connect. Don't know why it is working locally without any extra change lol

@HamzaSamirAmmar
Copy link

@TuOnyxtec @VisionBao @leorachit

Solved!

You can just add the package in the pubspec.yaml file like this:

  persistent_bottom_nav_bar:
    git:
      url: https://github.com/HamzaSamirAmmar/PersistentBottomNavBar.git 

@m-akbarfauzi
Copy link

@TuOnyxtec @VisionBao @leorachit

Solved!

You can just add the package in the pubspec.yaml file like this:

  persistent_bottom_nav_bar:
    git:
      url: https://github.com/HamzaSamirAmmar/PersistentBottomNavBar.git 

thanks

@vikram120
Copy link

Hello Still adding this is not working for me can someone help me?

@vikram120
Copy link

@TuOnyxtec @VisionBao @leorachit

Solved!

You can just add the package in the pubspec.yaml file like this:

  persistent_bottom_nav_bar:
    git:
      url: https://github.com/HamzaSamirAmmar/PersistentBottomNavBar.git 

Hello I did but still the problem exists

@AbdullahHussein17
Copy link

from neumorph_card change this line : final color = decoration.color ?? Theme.of(context).BackgroundColor; to final color = decoration.color ?? Theme.of(context).scaffoldBackgroundColor;
it work with me.

@hrshere
Copy link

hrshere commented Jul 11, 2024

I got this same error but for Getx package. Using the latest version solved the issue.

@Nouman-Tasif
Copy link

Solved
persistent_bottom_nav_bar:
git:
url: https://github.com/HamzaSamirAmmar/PersistentBottomNavBar.git

@naidu199
Copy link

naidu199 commented Aug 2, 2024

go to this pub cache file and replace it

Replace:

final color = decoration.color ?? Theme.of(context).backgroundColor;

With:

final color = decoration.color ?? Theme.of(context).colorScheme.background;

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