Skip to content

Compatibility Issues with Flutter SDK (accentColor and textTheme errors) #289

@mynoded

Description

@mynoded

I encountered compatibility issues between the flutter_neumorphic package and the latest Flutter SDK. The following errors occur when I try to run my project
Error Details:

1.accentColor is no longer available:

Error: No named parameter with the name 'accentColor'.
accentColor: theme.variantColor,

It seems accentColor was removed in Flutter 2.10+ and replaced by colorScheme.secondary.

2.textTheme.headline5 and textTheme.bodyText2 are undefined:

Error: The getter 'textTheme' isn't defined for the class 'AppBarTheme'.
style: (appBarTheme.textTheme?.headline5 ?? Theme.of(context).textTheme.headline5!)

These properties (headline5 and bodyText2) have been renamed to titleLarge and bodyMedium in newer versions of Flutter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions