The getter 'labelLarge' isn't defined for the class 'TextTheme'

43 views Asked by At

can you please help me with this issue in flutter when running my application I'm getting this error message: /C:/Users/admin/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/chewie_audio-1.4.0/lib/src/material_controls.dart:82:51: Error: The getter 'labelLarge' isn't defined for the class 'TextTheme'.

  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/src/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 'labelLarge'. final iconColor = Theme.of(context).textTheme.labelLarge!.color;

enter image description here

I tried downloading the sdk commandline latest but it still won't work for me.

1

There are 1 answers

0
Tung Ha On

It looks like the chewie_audio package is using the labelLarge from the TextTheme class, which is the replacement for caption that was deprecated after v3.1.0-0.0.pre.

But the material library in your Flutter SDK is out updated leading to an error: The getter 'labelLarge' isn't defined for the class 'TextTheme'

My suggestion to solve this issue is to upgrade your Flutter SDK and try again.