Skip to content

Compatibility Issue: bodyText2 is deprecated in TextTheme for Flutter 3.0+ #287

@suojae

Description

@suojae
image

Error (Xcode): ../../.pub-cache/hosted/pub.dev/flutter_neumorphic-3.2.0/lib/src/widget/container.dart:121:69: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.


Description

The flutter_neumorphic package is currently using the deprecated bodyText2 property in TextTheme. This causes a build failure with Flutter 3.0 and newer versions, where bodyText2 has been replaced with bodyMedium.

Steps to Reproduce

Install the flutter_neumorphic package (version 3.2.0).
Create a project with Flutter SDK 3.0.0 or later.
Use a Neumorphic widget (e.g., NeumorphicText or NeumorphicContainer) in your application.
Attempt to build the application.

Expected Behavior

The package should build and work seamlessly with the latest Flutter SDK versions.

Actual Behavior

The build fails with the following error:

Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.5, on macOS 14.5 23F79 darwin-arm64, locale en-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] Connected device (4 available)
    ! Error: Browsing on the local area network for Jonghyuck’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

• No issues found!

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