Flare-Flutter icon indicating copy to clipboard operation
Flare-Flutter copied to clipboard

Fix provider null return value

Open yuwen-yan opened this issue 6 years ago • 1 comments

Follow-up PR for https://github.com/2d-inc/Flare-Flutter/issues/202

yuwen-yan avatar Dec 31 '19 09:12 yuwen-yan

@luigi-rosso it's about error handling, AFAIK, there are two ways to fail:

  • Throw exception in AssetProvider.load() , in this case, we should raise this exception to client application and show nothing.
  • Return invalid ByteData (including null) by AssetProvider.load(), in this case, right now we will raise an exception when exec FlutterActor.loadFromByteData(data).

I was thinking that we should suppress the exception for invalid ByteData, but after a second thought, I think it's also ok to raise it, WDYT? So I'm going to hold this PR for now..

yuwen-yan avatar Jan 07 '20 00:01 yuwen-yan