The method ‘_TextStyleProxy.getTextStyle’ has fewer named arguments than those of overridden method ‘TextStyle.getTextStyle’.

I got this error today when I tried to build my project, my project was running fine before upgrading my AndroidStudio to Android Studio Hedgehog | 2023.1.1.

I found Dart and Flutter plugins also were not working on my AndroidStudio, after running `brew upgrade` both Dart and Flutter plugins started to work again.

But I got this weird error “The method ‘_TextStyleProxy.getTextStyle’ has fewer named arguments than those of overridden method ‘TextStyle.getTextStyle’.”

It seemed something was broken in a 3rd party plugin that used this flutter package “fwfh_text_style” but I was not sure which package used this and I never used it before.

So I added this package “fwfh_text_style” by running the command

flutter pub add fwfh_text_style

and everything was running again. You can find this package here https://pub.dev/packages/fwfh_text_style.

This is my flutter and dart versions.

flutter --version
Flutter 3.16.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db7ef5bf9f (3 weeks ago) • 2023-11-15 11:25:44 -0800
Engine • revision 74d16627b9
Tools • Dart 3.2.0 • DevTools 2.28.2

If you found this useful, please share with fellow developers.

Spread the love

Leave a comment