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

'_fontFamily' method not found Receiver: Instance of 'TextStyleRef' Arguments: [] #6

Closed
nullrocket opened this issue Dec 12, 2021 · 1 comment

Comments

@nullrocket
Copy link

Upgrading to Flutter 2.8.0 causes the following error. You can reproduce it running the example app.

======== Exception caught by widgets library =======================================================
The following NoSuchMethodError was thrown building Text("This is some text!", inherit: true
, color: ColorRef(0xffffffff), size: 16.0, weight: 400, dirty, dependencies: [DefaultTextStyle]):
'_fontFamily'
method not found
Receiver: Instance of 'TextStyleRef'
Arguments: []

The relevant error-causing widget was: 
  Text Text:file:///home/doug/IdeaProjects/themed/example/lib/main.dart:80:34
When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49     throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 735:3  defaultNoSuchMethod
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 60:17                noSuchMethod
packages/themed/src/themed.dart 838:3                                            get [_fontFamily]
packages/flutter/src/painting/text_style.dart 1026:24                            merge

After digging around a bit I tried changing the following and extending instead of implementing, that fixed it but I'm not sure of what further issues that may cause.

//class TextStyleRef implements TextStyle, ThemeRef {

class TextStyleRef extends TextStyle with ThemeRef {
...
@marcglasberg
Copy link
Owner

Fixed in version [3.0.0].

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