Skip to content

Flutter 3.22.2-stable The getter 'backgroundColor' isn't defined for the class 'ThemeData' #368

@sniperxenocide

Description

@sniperxenocide

I encountered this error while building my app for android.

/C:/Users/DELL/AppData/Local/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' ('flutter_windows_3.22.2-stable/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;
    ^^^^^^^^^^^^^^^

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