I try to write a plugin for my Flutter project, I want to load an image from plugin Assets folder, do anyone know how can I load this frame.png from objective c native code?
I tried use: [[NSBundle mainBundle] pathForResource:@"frame" ofType:@"png"];
but it getting null. Anyone here know how to load this image?
Thanks
If you are developing a flutter plugin and need to have native assets these are the following things you have to do,
s.resources = 'Assets/*.png'
let bundle = Bundle(for: YourPlugin.self) let url = bundle.url(forResource: "frame", withExtension: "png")!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With