joseph-grabinger / flutter_to_pdf

Create PDFs but work with normal Flutter Widgets.
MIT License
21 stars 17 forks source link

TextTheme not supported #79

Open pgainullin opened 4 months ago

pgainullin commented 4 months ago

Triggers an error:


file:///[...]/pdf-3.11.0/lib/src/widgets/text_style.dart:129:16
inherit || fontNormal != null```

Upon checking a few styles they return null values
joseph-grabinger commented 3 months ago

This error originates from the underlying pdf package.

Do you have a minimal way of reproducing the issue, e.g. a Text Widget configuration that will always produce the error?

Also could you please add your flutter doctor -v output here :)

joseph-grabinger commented 3 weeks ago

I just stumbled upon this error as well when fixing another issue related to fonts. In my specific use case, setting inherit to true solved the issue for me and didn't introduce any side effects (at least not that I'm aware of).

To resolve this issue it would be crucial that you add a concrete example of how you initialize your TextTheme and how you pass it into your Text widget.

pgainullin commented 3 weeks ago

thank you, this seems to have worked as far as the original error above is concerned!

The specific project I am working on then hit a new error which I'm not investigating:

RangeError: Offset is outside the bounds of the DataView
dart-sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart 453:53  [_getInt16]