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

issue in build after add package #17

Closed
AbbasAsadi opened this issue Aug 21, 2021 · 2 comments
Closed

issue in build after add package #17

AbbasAsadi opened this issue Aug 21, 2021 · 2 comments

Comments

@AbbasAsadi
Copy link

hello, this is my log when I want to build the application:
E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:89:48: Error: The getter 'display1' isn't defined for the class 'TextTheme'.

  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'display1'.
    final TextStyle dayStyle = headerTextTheme.display1!
    ^^^^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:92:25: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'subhead'.
    headerTextTheme.subhead!.copyWith(color: yearColor, height: 1.4);
    ^^^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:452:52: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'.
    TextStyle? itemStyle = themeData.textTheme.body1;
    ^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:460:49: Error: The getter 'body2' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'body2'.
    itemStyle = themeData.accentTextTheme.body2;
    ^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:464:43: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'.
    itemStyle = themeData.textTheme.body1!
    ^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:471:35: Error: The getter 'body2' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'body2'.
    themeData.textTheme.body2!.copyWith(color: themeData.accentColor);
    ^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:474:43: Error: The getter 'body2' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'body2'.
    itemStyle = themeData.textTheme.body2!.copyWith(color: Colors.red);
    ^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:522:50: Error: The getter 'subhead' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'subhead'.
    style: themeData.textTheme.subhead,
    ^^^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:883:50: Error: The getter 'body1' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'.
    final TextStyle? style = themeData.textTheme.body1;
    ^^^^^
    /E:/android/flutter/.pub-cache/hosted/pub.dartlang.org/jalali_calendar-1.0.4/lib/src/jalalicalendarpicker.dart:896:35: Error: The getter 'headline' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/E:/android/flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline'.
    ? themeData.textTheme.headline!
    ^^^^^^^^

FAILURE: Build failed with an exception.

  • Where:
    Script 'E:\android\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'E:\android\flutter\bin\flutter.bat'' finished with non-zero exit value 1

and this is my flutter doctor -v:

[√] Flutter (Channel beta, 2.5.0-5.2.pre, on Microsoft Windows [Version 10.0.19042.1165], locale fa-IR)
• Flutter version 2.5.0-5.2.pre at E:\android\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 19c61fed0d (2 days ago), 2021-08-18 17:10:31 -0700
• Engine revision 7a4c4505f6
• Dart version 2.14.0 (build 2.14.0-377.7.beta)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at E:\android\SDK
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = E:\android\SDK\bin
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
X Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] Connected device (4 available)
• SM A515F (mobile) • R58N90ERNEY • android-arm64 • Android 11 (API 30)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.1165]
• Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.159
• Edge (web) • edge • web-javascript • Microsoft Edge 92.0.902.67

! Doctor found issues in 2 categories.

Would you please help me?

@erfanegtfi
Copy link

Please use this #18 (comment)

@AbbasAsadi
Copy link
Author

Thank you.

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

2 participants