@@ -2105,12 +2105,9 @@ class Codec extends NativeFieldWrapperClass1 {
21052105 /// [FrameInfo.image] on the returned object.
21062106 Future <FrameInfo > getNextFrame () async {
21072107 final Completer <FrameInfo > completer = Completer <FrameInfo >.sync ();
2108- final String ? error = _getNextFrame ((_Image ? image, int durationMilliseconds, String decodeError ) {
2108+ final String ? error = _getNextFrame ((_Image ? image, int durationMilliseconds) {
21092109 if (image == null ) {
2110- if (decodeError.isEmpty) {
2111- decodeError = 'Codec failed to produce an image, possibly due to invalid image data.' ;
2112- }
2113- completer.completeError (Exception (decodeError));
2110+ completer.completeError (Exception ('Codec failed to produce an image, possibly due to invalid image data.' ));
21142111 } else {
21152112 completer.complete (FrameInfo ._(
21162113 image: Image ._(image, image.width, image.height),
@@ -2126,7 +2123,7 @@ class Codec extends NativeFieldWrapperClass1 {
21262123
21272124 /// Returns an error message on failure, null on success.
21282125 @Native < Handle Function (Pointer <Void >, Handle )> (symbol: 'Codec::getNextFrame' )
2129- external String ? _getNextFrame (void Function (_Image ? , int , String ) callback);
2126+ external String ? _getNextFrame (void Function (_Image ? , int ) callback);
21302127
21312128 /// Release the resources used by this object. The object is no longer usable
21322129 /// after this method is called.
0 commit comments