Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart(134,45): error GD65BB2B6: The getter 'body1' isn't defined for the class 'TextTheme'. #676

Closed
lucasjinreal opened this issue Sep 7, 2021 · 14 comments

Comments

@lucasjinreal
Copy link

charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart(134,45): error GD65BB2B6: The getter 'body1' isn't defined for the class 'TextTheme'.

@vladimir-popolitov
Copy link

vladimir-popolitov commented Sep 8, 2021

Hi!

Try like this:
pubspec.yaml ->

  charts_flutter:
    git:
      url: git://github.com/google/charts.git
      path: charts_flutter

Something seems to be wrong with pub.dartlang.org version.

@Rajat130
Copy link

.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart:134:45: Error: The getter 'body1' isn't defined for the class 'TextTheme'.

  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart'
  • /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'.
    color ??= Theme.of(context).textTheme.body1!.color;
    After upgrading to 2.5 version of flutter it shows error in flutter chart

@a15056478
Copy link

Did anyone find out solution for this?

@Rajat130
Copy link

Rajat130 commented Sep 13, 2021

Yes, you can follow this one, instead of putting charts_flutter: ^version, you can use this below one

charts_flutter:
    git:
      url: git://github.com/google/charts.git
      path: charts_flutter

@a15056478
Copy link

@Rajat130 Thanks.

@suniltadepalli
Copy link

Works well. Thanks

@alexrok21
Copy link

alexrok21 commented Sep 17, 2021

I got the following error after trying the solution
Git error. Command: git clone --mirror git://github.com/google/charts.git C:\src\flutter\.pub-cache\git\cache\charts-f75ec2521ca060cfcc11580685b340e91a3437a0 stdout: stderr: Cloning into bare repository 'C:\src\flutter\.pub-cache\git\cache\charts-f75ec2521ca060cfcc11580685b340e91a3437a0'... fatal: unable to connect to github.com

@malaschitz
Copy link

Is better for me:

 charts_flutter:
    git:
      url: https://github.com/google/charts.git
      path: charts_flutter

@olivierkastel
Copy link

Suggested solution doesn't work for me. The command flutter pub get gets stuck. After few minutes it returned:

Git error. Command: `git rev-list --max-count=1 HEAD`
stdout: 
stderr: usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
[...truncated...]
exit code: 129
pub get failed (server unavailable) -- attempting retry 9 in 64 seconds...

@mbcode64
Copy link

mbcode64 commented Nov 4, 2021

Suggested solution doesn't work for me. The command flutter pub get gets stuck. After few minutes it returned:

Git error. Command: `git rev-list --max-count=1 HEAD`
stdout: 
stderr: usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
[...truncated...]
exit code: 129
pub get failed (server unavailable) -- attempting retry 9 in 64 seconds...

I got the same error. Running these commands in the terminal fixed the error:

git config --global http.postBuffer 500M
git config --global http.maxRequestBuffer 100M
git config --global core.compression 0

@rolandgeider
Copy link

charts 0.12 was released, you don't need the workaround anymore

@domesticmouse
Copy link
Member

As per @rolandgeider, please use charts_flutter: ^0.12.0.

@KittuPatel
Copy link

As mentioned by @vladimir-popolitov adding the following code to pubspec.yaml file works.

@7Berci
Copy link

7Berci commented Oct 1, 2022

That doesn't work for me !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests