flutter_tex
flutter_tex copied to clipboard
Unable to load asset: $key | flutter_tex: ^4.0.3+4
I don't know exactly which part this problem refers to, but when I use this widget on a page, I encounter the following error.
await ServicesBinding.instance.defaultBinaryMessenger.send('flutter/assets', encoded.buffer.asByteData()); if (asset == null) { throw FlutterError('Unable to load asset: $key'); } return asset; }
And in file webView_flutter_plus.dart :
body = (await rootBundle.load(path)).buffer.asUint8List();
const String _texText = r'''<img src="/assets/images/image.svg"> <br>$$ a^2 = b^2 + c^2 - 2 \, b \, c \cos \alpha $$''';
just add folder assets in yaml and put /assets/images/image.svg OR png