1
Running Gradle task 'assembleDebug'...
../../../.pub-cache/hosted/pub.dev/flutter_neumorphic-3.2.0/lib/src/widget/app_bar.dart:183:29: Error: The getter 'textTheme' isn't defined for the class 'AppBarTheme'.
 - 'AppBarTheme' is from 'package:flutter/src/material/app_bar_theme.dart' ('../../../MycodingLibs/flutter/packages/flutter/lib/src/material/app_bar_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'textTheme'.
        style: (appBarTheme.textTheme?.headline5 ??
                            ^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_neumorphic-3.2.0/lib/src/widget/app.dart:89:7: Error: No named parameter with the name 'accentColor'.
      accentColor: theme.variantColor,
      ^^^^^^^^^^^
../../../MycodingLibs/flutter/packages/flutter/lib/src/material/theme_data.dart:290:11: Context: Found this candidate, but the arguments don't match.
  factory ThemeData({
          ^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script '/home/corecreater/MycodingLibs/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1201

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/corecreater/MycodingLibs/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 17s
Exception: Gradle task assembleDebug failed with exit code 1

It's old project in my opinion and i don't know what to do. I tried to update all packages in pubspec.yaml. there is no Code error as per Android Studio. I think it's problem of flutter version.

rocerBob
  • 11
  • 1
  • Does this answer your question? [Cannot apply textTheme inside AppBarTheme in flutter](https://stackoverflow.com/questions/72548446/cannot-apply-texttheme-inside-appbartheme-in-flutter) – Ivo Jun 20 '23 at 09:10

1 Answers1

-1

It can be a problem for your flutter_neumorphic package, which may be you used before another projects. If this issue happens, then you can run this command on your terminal.

flutter pub cache clean

After running the command, the pub cache on your computer will be cleared, and any previously downloaded packages will need to be re-downloaded when needed.

Note: If you are not using Flutter, you can replace 'flutter pub cache clean' with 'pub cache clean' to clear the pub cache for regular Dart packages.